mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-03 05:17:02 +08:00
fix(connector): [coinbase] make metadata as option parameter (#887)
Co-authored-by: arvindpatel24 <arvind.patel@juspay.in>
This commit is contained in:
@ -18,8 +18,8 @@ pub struct LocalPrice {
|
|||||||
|
|
||||||
#[derive(Debug, Default, Eq, PartialEq, Serialize, Deserialize)]
|
#[derive(Debug, Default, Eq, PartialEq, Serialize, Deserialize)]
|
||||||
pub struct Metadata {
|
pub struct Metadata {
|
||||||
pub customer_id: String,
|
pub customer_id: Option<String>,
|
||||||
pub customer_name: String,
|
pub customer_name: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Default, Debug, Serialize, Eq, PartialEq)]
|
#[derive(Default, Debug, Serialize, Eq, PartialEq)]
|
||||||
@ -67,7 +67,7 @@ pub enum CoinbasePaymentStatus {
|
|||||||
Expired,
|
Expired,
|
||||||
Unresolved,
|
Unresolved,
|
||||||
Resolved,
|
Resolved,
|
||||||
Cancelled,
|
Canceled,
|
||||||
#[serde(rename = "PENDING REFUND")]
|
#[serde(rename = "PENDING REFUND")]
|
||||||
PendingRefund,
|
PendingRefund,
|
||||||
Refunded,
|
Refunded,
|
||||||
@ -315,7 +315,7 @@ pub struct CoinbasePaymentResponseData {
|
|||||||
pub pricing: HashMap<String, OverpaymentAbsoluteThreshold>,
|
pub pricing: HashMap<String, OverpaymentAbsoluteThreshold>,
|
||||||
pub fee_rate: f64,
|
pub fee_rate: f64,
|
||||||
pub logo_url: String,
|
pub logo_url: String,
|
||||||
pub metadata: Metadata,
|
pub metadata: Option<Metadata>,
|
||||||
pub payments: Vec<PaymentElement>,
|
pub payments: Vec<PaymentElement>,
|
||||||
pub resource: String,
|
pub resource: String,
|
||||||
pub timeline: Vec<Timeline>,
|
pub timeline: Vec<Timeline>,
|
||||||
|
|||||||
@ -566,9 +566,6 @@ impl api::IncomingWebhook for Opennode {
|
|||||||
opennode::OpennodePaymentStatus::Processing => {
|
opennode::OpennodePaymentStatus::Processing => {
|
||||||
Ok(api::IncomingWebhookEvent::PaymentIntentProcessing)
|
Ok(api::IncomingWebhookEvent::PaymentIntentProcessing)
|
||||||
}
|
}
|
||||||
opennode::OpennodePaymentStatus::Refunded => {
|
|
||||||
Ok(api::IncomingWebhookEvent::RefundSuccess)
|
|
||||||
}
|
|
||||||
_ => Ok(api::IncomingWebhookEvent::EventNotSupported),
|
_ => Ok(api::IncomingWebhookEvent::EventNotSupported),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user