feat(connector): [Coinbase] [Opennode] Add support for crypto payments via PG redirection (#834)

Co-authored-by: arvindpatel24 <arvind.patel@juspay.in>
Co-authored-by: Jagan Elavarasan <jaganelavarasan@gmail.com>
This commit is contained in:
Arvind Patel
2023-04-11 13:05:57 +05:30
committed by GitHub
parent f46eaf3e3d
commit b3d1473734
43 changed files with 3053 additions and 92 deletions

View File

@ -34,6 +34,7 @@ pub enum AttemptStatus {
VoidFailed,
AutoRefunded,
PartialCharged,
Unresolved,
#[default]
Pending,
Failure,
@ -266,6 +267,8 @@ pub enum Currency {
#[strum(serialize_all = "snake_case")]
pub enum EventType {
PaymentSucceeded,
PaymentProcessing,
ActionRequired,
RefundSucceeded,
RefundFailed,
DisputeOpened,
@ -299,6 +302,7 @@ pub enum IntentStatus {
Cancelled,
Processing,
RequiresCustomerAction,
RequiresMerchantAction,
RequiresPaymentMethod,
#[default]
RequiresConfirmation,
@ -416,6 +420,7 @@ pub enum PaymentMethodType {
GooglePay,
ApplePay,
Paypal,
CryptoCurrency,
}
#[derive(
@ -441,6 +446,7 @@ pub enum PaymentMethod {
PayLater,
Wallet,
BankRedirect,
Crypto,
}
#[derive(
@ -561,9 +567,11 @@ pub enum Connector {
Bluesnap,
Braintree,
Checkout,
Coinbase,
Cybersource,
#[default]
Dummy,
Opennode,
Bambora,
Dlocal,
Fiserv,
@ -618,6 +626,7 @@ pub enum RoutableConnectors {
Bluesnap,
Braintree,
Checkout,
Coinbase,
Cybersource,
Dlocal,
Fiserv,
@ -626,6 +635,7 @@ pub enum RoutableConnectors {
Mollie,
Multisafepay,
Nuvei,
Opennode,
Paypal,
Payu,
Rapyd,
@ -758,6 +768,7 @@ impl From<AttemptStatus> for IntentStatus {
AttemptStatus::Authorized => Self::RequiresCapture,
AttemptStatus::AuthenticationPending => Self::RequiresCustomerAction,
AttemptStatus::Unresolved => Self::RequiresMerchantAction,
AttemptStatus::PartialCharged
| AttemptStatus::Started
@ -826,3 +837,10 @@ pub enum DisputeStatus {
// dispute has been unsuccessfully challenged
DisputeLost,
}
#[derive(Debug, Eq, PartialEq, Clone, serde::Serialize, serde::Deserialize)]
pub struct UnresolvedResponseReason {
pub code: String,
/// A message to merchant to give hint on next action he/she should do to resolve
pub message: String,
}