feat(frm): Add support to accept and decline payment when manually reviewed by merchant for risky transaction (#2071)

This commit is contained in:
Jagan
2023-09-04 17:44:39 +05:30
committed by GitHub
parent c5003aaa74
commit 229f111f6c
36 changed files with 1381 additions and 77 deletions

View File

@ -1,8 +1,10 @@
pub mod approve_flow;
pub mod authorize_flow;
pub mod cancel_flow;
pub mod capture_flow;
pub mod complete_authorize_flow;
pub mod psync_flow;
pub mod reject_flow;
pub mod session_flow;
pub mod verify_flow;
@ -1280,3 +1282,155 @@ default_imp_for_payouts_recipient!(
connector::Worldpay,
connector::Zen
);
macro_rules! default_imp_for_approve {
($($path:ident::$connector:ident),*) => {
$(
impl api::PaymentApprove for $path::$connector {}
impl
services::ConnectorIntegration<
api::Approve,
types::PaymentsApproveData,
types::PaymentsResponseData,
> for $path::$connector
{}
)*
};
}
#[cfg(feature = "dummy_connector")]
impl<const T: u8> api::PaymentApprove for connector::DummyConnector<T> {}
#[cfg(feature = "dummy_connector")]
impl<const T: u8>
services::ConnectorIntegration<
api::Approve,
types::PaymentsApproveData,
types::PaymentsResponseData,
> for connector::DummyConnector<T>
{
}
default_imp_for_approve!(
connector::Aci,
connector::Adyen,
connector::Airwallex,
connector::Authorizedotnet,
connector::Bambora,
connector::Bitpay,
connector::Bluesnap,
connector::Boku,
connector::Braintree,
connector::Cashtocode,
connector::Checkout,
connector::Cryptopay,
connector::Cybersource,
connector::Coinbase,
connector::Dlocal,
connector::Fiserv,
connector::Forte,
connector::Globalpay,
connector::Globepay,
connector::Helcim,
connector::Iatapay,
connector::Klarna,
connector::Mollie,
connector::Multisafepay,
connector::Nexinets,
connector::Nmi,
connector::Noon,
connector::Nuvei,
connector::Opayo,
connector::Opennode,
connector::Payeezy,
connector::Payme,
connector::Paypal,
connector::Payu,
connector::Powertranz,
connector::Rapyd,
connector::Square,
connector::Stax,
connector::Stripe,
connector::Shift4,
connector::Trustpay,
connector::Tsys,
connector::Wise,
connector::Worldline,
connector::Worldpay,
connector::Zen
);
macro_rules! default_imp_for_reject {
($($path:ident::$connector:ident),*) => {
$(
impl api::PaymentReject for $path::$connector {}
impl
services::ConnectorIntegration<
api::Reject,
types::PaymentsRejectData,
types::PaymentsResponseData,
> for $path::$connector
{}
)*
};
}
#[cfg(feature = "dummy_connector")]
impl<const T: u8> api::PaymentReject for connector::DummyConnector<T> {}
#[cfg(feature = "dummy_connector")]
impl<const T: u8>
services::ConnectorIntegration<
api::Reject,
types::PaymentsRejectData,
types::PaymentsResponseData,
> for connector::DummyConnector<T>
{
}
default_imp_for_reject!(
connector::Aci,
connector::Adyen,
connector::Airwallex,
connector::Authorizedotnet,
connector::Bambora,
connector::Bitpay,
connector::Bluesnap,
connector::Boku,
connector::Braintree,
connector::Cashtocode,
connector::Checkout,
connector::Cryptopay,
connector::Cybersource,
connector::Coinbase,
connector::Dlocal,
connector::Fiserv,
connector::Forte,
connector::Globalpay,
connector::Globepay,
connector::Helcim,
connector::Iatapay,
connector::Klarna,
connector::Mollie,
connector::Multisafepay,
connector::Nexinets,
connector::Nmi,
connector::Noon,
connector::Nuvei,
connector::Opayo,
connector::Opennode,
connector::Payeezy,
connector::Payme,
connector::Paypal,
connector::Payu,
connector::Powertranz,
connector::Rapyd,
connector::Square,
connector::Stax,
connector::Stripe,
connector::Shift4,
connector::Trustpay,
connector::Tsys,
connector::Wise,
connector::Worldline,
connector::Worldpay,
connector::Zen
);