This commit is contained in:
Dev Team
2025-06-02 17:18:11 +06:30
parent 1a373f0d2a
commit 174a232421
10 changed files with 72 additions and 176 deletions

View File

@@ -16,6 +16,19 @@ class KbzMerchant
api_url = "#{@url}/precreate"
payload = build_create_payload(amount, merch_order_id, timeout)
response = send_request(payload, api_url)
# audit
PaymentGatewayAuditJob.perform_later({
receipt_no: merch_order_id,
gateway_name: "MMQR",
endpoint_url: api_url,
event_type: "kbz.payment.precreate",
request_body: payload,
response_body: response,
request_method: "POST",
shop_code: Shop.current_shop.shop_code
})
handle_response(response)
end
@@ -23,6 +36,18 @@ class KbzMerchant
api_url = "#{@url}/closeorder"
payload = build_close_payload(merch_order_id)
response = send_request(payload, api_url)
PaymentGatewayAuditJob.perform_later({
receipt_no: merch_order_id,
gateway_name: "MMQR",
endpoint_url: api_url,
event_type: "kbz.payment.closeorder",
request_body: payload,
response_body: response,
request_method: "POST",
shop_code: Shop.current_shop.shop_code
})
handle_response(response)
end