refactor: add payment_issuer and payment_experience in pa (#491)

This commit is contained in:
Narayan Bhat
2023-02-19 19:29:22 +05:30
committed by GitHub
parent c47619b5ea
commit 66563595df
54 changed files with 790 additions and 801 deletions

View File

@ -343,6 +343,66 @@ pub enum PaymentMethodIssuerCode {
JpBacs,
}
#[derive(
Clone,
Copy,
Debug,
Eq,
Hash,
PartialEq,
serde::Deserialize,
serde::Serialize,
frunk::LabelledGeneric,
ToSchema,
)]
#[serde(rename_all = "snake_case")]
pub enum PaymentIssuer {
Klarna,
Affirm,
AfterpayClearpay,
AmericanExpress,
BankOfAmerica,
Barclays,
CapitalOne,
Chase,
Citi,
Discover,
NavyFederalCreditUnion,
PentagonFederalCreditUnion,
SynchronyBank,
WellsFargo,
}
#[derive(
Eq,
PartialEq,
Hash,
Copy,
Clone,
Debug,
serde::Serialize,
serde::Deserialize,
ToSchema,
Default,
frunk::LabelledGeneric,
)]
#[serde(rename_all = "snake_case")]
pub enum PaymentExperience {
/// The URL to which the customer needs to be redirected for completing the payment.
#[default]
RedirectToUrl,
/// Contains the data for invoking the sdk client for completing the payment.
InvokeSdkClient,
/// The QR code data to be displayed to the customer.
DisplayQrCode,
/// Contains data to finish one click payment.
OneClick,
/// Redirect customer to link wallet
LinkWallet,
/// Contains the data for invoking the sdk client for completing the payment.
InvokePaymentApp,
}
#[derive(
Clone,
Copy,