mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-02 04:04:43 +08:00
fix(connector): [Cryptopay]Remove default case handling for Cryptopay (#2699)
Co-authored-by: Arjun Karthik <m.arjunkarthik@gmail.com>
This commit is contained in:
@ -111,10 +111,9 @@ impl TryFrom<&types::ConnectorAuthType> for CryptopayAuthType {
|
||||
}
|
||||
}
|
||||
// PaymentsResponse
|
||||
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "lowercase")]
|
||||
pub enum CryptopayPaymentStatus {
|
||||
#[default]
|
||||
New,
|
||||
Completed,
|
||||
Unresolved,
|
||||
@ -128,13 +127,14 @@ impl From<CryptopayPaymentStatus> for enums::AttemptStatus {
|
||||
CryptopayPaymentStatus::New => Self::AuthenticationPending,
|
||||
CryptopayPaymentStatus::Completed => Self::Charged,
|
||||
CryptopayPaymentStatus::Cancelled => Self::Failure,
|
||||
CryptopayPaymentStatus::Unresolved => Self::Unresolved,
|
||||
_ => Self::Voided,
|
||||
CryptopayPaymentStatus::Unresolved | CryptopayPaymentStatus::Refunded => {
|
||||
Self::Unresolved
|
||||
} //mapped refunded to Unresolved because refund api is not available, also merchant has done the action on the connector dashboard.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Default, Debug, Serialize, Deserialize)]
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub struct CryptopayPaymentsResponse {
|
||||
data: CryptopayPaymentResponseData,
|
||||
}
|
||||
@ -190,7 +190,7 @@ pub struct CryptopayErrorResponse {
|
||||
pub error: CryptopayErrorData,
|
||||
}
|
||||
|
||||
#[derive(Debug, Default, Serialize, Deserialize)]
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub struct CryptopayPaymentResponseData {
|
||||
pub id: String,
|
||||
pub custom_id: Option<String>,
|
||||
|
||||
Reference in New Issue
Block a user