mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-02 12:06:56 +08:00
refactor: pass customer object to make_pm_data (#3246)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -43,6 +43,7 @@ pub trait PaymentMethodRetrieve {
|
||||
token: &storage::PaymentTokenData,
|
||||
payment_intent: &PaymentIntent,
|
||||
card_token_data: Option<&CardToken>,
|
||||
customer: &Option<domain::Customer>,
|
||||
) -> RouterResult<Option<(payments::PaymentMethodData, enums::PaymentMethod)>>;
|
||||
}
|
||||
|
||||
@ -126,6 +127,7 @@ impl PaymentMethodRetrieve for Oss {
|
||||
token_data: &storage::PaymentTokenData,
|
||||
payment_intent: &PaymentIntent,
|
||||
card_token_data: Option<&CardToken>,
|
||||
customer: &Option<domain::Customer>,
|
||||
) -> RouterResult<Option<(payments::PaymentMethodData, enums::PaymentMethod)>> {
|
||||
match token_data {
|
||||
storage::PaymentTokenData::TemporaryGeneric(generic_token) => {
|
||||
@ -178,6 +180,7 @@ impl PaymentMethodRetrieve for Oss {
|
||||
merchant_key_store,
|
||||
auth_token,
|
||||
payment_intent,
|
||||
customer,
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user