feat(core): accept business profile in core functions for payments, refund, payout and disputes (#5498)

This commit is contained in:
Hrithikesh
2024-08-01 18:54:49 +05:30
committed by GitHub
parent 85209d12ae
commit fb32b61edf
16 changed files with 102 additions and 20 deletions

View File

@ -63,6 +63,7 @@ pub async fn payment_intents_create(
state,
req_state,
auth.merchant_account,
None,
auth.key_store,
payments::PaymentCreate,
req,
@ -123,6 +124,7 @@ pub async fn payment_intents_retrieve(
state,
req_state,
auth.merchant_account,
None,
auth.key_store,
payments::PaymentStatus,
payload,
@ -193,6 +195,7 @@ pub async fn payment_intents_retrieve_with_gateway_creds(
state,
req_state,
auth.merchant_account,
None,
auth.key_store,
payments::PaymentStatus,
req,
@ -259,6 +262,7 @@ pub async fn payment_intents_update(
state,
req_state,
auth.merchant_account,
None,
auth.key_store,
payments::PaymentUpdate,
req,
@ -331,6 +335,7 @@ pub async fn payment_intents_confirm(
state,
req_state,
auth.merchant_account,
None,
auth.key_store,
payments::PaymentConfirm,
req,
@ -392,6 +397,7 @@ pub async fn payment_intents_capture(
state,
req_state,
auth.merchant_account,
None,
auth.key_store,
payments::PaymentCapture,
payload,
@ -457,6 +463,7 @@ pub async fn payment_intents_cancel(
state,
req_state,
auth.merchant_account,
None,
auth.key_store,
payments::PaymentCancel,
req,
@ -499,7 +506,7 @@ pub async fn payment_intent_list(
&req,
payload,
|state, auth, req, _| {
payments::list_payments(state, auth.merchant_account, auth.key_store, req)
payments::list_payments(state, auth.merchant_account, None, auth.key_store, req)
},
&auth::HeaderAuth(auth::ApiKeyAuth),
api_locking::LockAction::NotApplicable,

View File

@ -50,7 +50,7 @@ pub async fn refund_create(
&req,
create_refund_req,
|state, auth, req, _| {
refunds::refund_create_core(state, auth.merchant_account, auth.key_store, req)
refunds::refund_create_core(state, auth.merchant_account, None, auth.key_store, req)
},
&auth::HeaderAuth(auth::ApiKeyAuth),
api_locking::LockAction::NotApplicable,
@ -97,6 +97,7 @@ pub async fn refund_retrieve_with_gateway_creds(
refunds::refund_response_wrapper(
state,
auth.merchant_account,
None,
auth.key_store,
refund_request,
refunds::refund_retrieve_core,
@ -139,6 +140,7 @@ pub async fn refund_retrieve(
refunds::refund_response_wrapper(
state,
auth.merchant_account,
None,
auth.key_store,
refund_request,
refunds::refund_retrieve_core,

View File

@ -64,6 +64,7 @@ pub async fn setup_intents_create(
state,
req_state,
auth.merchant_account,
None,
auth.key_store,
payments::PaymentCreate,
req,
@ -124,6 +125,7 @@ pub async fn setup_intents_retrieve(
state,
req_state,
auth.merchant_account,
None,
auth.key_store,
payments::PaymentStatus,
payload,
@ -196,6 +198,7 @@ pub async fn setup_intents_update(
state,
req_state,
auth.merchant_account,
None,
auth.key_store,
payments::PaymentUpdate,
req,
@ -269,6 +272,7 @@ pub async fn setup_intents_confirm(
state,
req_state,
auth.merchant_account,
None,
auth.key_store,
payments::PaymentConfirm,
req,