feat(connector): [Trustpay] add authorize (cards 3ds, no3ds and bank redirects), refund, psync, rsync (#717)

Co-authored-by: Sangamesh <sangamesh.kulkarni@juspay.in>
Co-authored-by: sai harsha <sai.harsha@sai.harsha-MacBookPro>
Co-authored-by: Arun Raj M <jarnura47@gmail.com>
This commit is contained in:
saiharsha-juspay
2023-03-13 17:23:39 +05:30
committed by GitHub
parent 230fcdd4e1
commit e102cae76c
18 changed files with 2002 additions and 11 deletions

View File

@ -539,6 +539,7 @@ pub enum MandateStatus {
strum::Display,
strum::EnumString,
frunk::LabelledGeneric,
Hash,
)]
#[serde(rename_all = "snake_case")]
#[strum(serialize_all = "snake_case")]
@ -567,11 +568,18 @@ pub enum Connector {
Stripe,
Worldline,
Worldpay,
Trustpay,
}
impl Connector {
pub fn supports_access_token(&self) -> bool {
matches!(self, Self::Airwallex | Self::Globalpay | Self::Payu)
pub fn supports_access_token(&self, payment_method: PaymentMethod) -> bool {
matches!(
(self, payment_method),
(Self::Airwallex, _)
| (Self::Globalpay, _)
| (Self::Payu, _)
| (Self::Trustpay, PaymentMethod::BankRedirect)
)
}
}
@ -611,6 +619,7 @@ pub enum RoutableConnectors {
Worldline,
Worldpay,
Multisafepay,
Trustpay,
}
/// Wallets which support obtaining session object