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

@ -50,6 +50,7 @@ pub trait RouterData {
fn get_billing_country(&self) -> Result<api_models::enums::CountryCode, Error>;
fn get_billing_phone(&self) -> Result<&api::PhoneDetails, Error>;
fn get_description(&self) -> Result<String, Error>;
fn get_return_url(&self) -> Result<String, Error>;
fn get_billing_address(&self) -> Result<&api::AddressDetails, Error>;
fn get_shipping_address(&self) -> Result<&api::AddressDetails, Error>;
fn get_connector_meta(&self) -> Result<pii::SecretSerdeValue, Error>;
@ -89,6 +90,11 @@ impl<Flow, Request, Response> RouterData for types::RouterData<Flow, Request, Re
.clone()
.ok_or_else(missing_field_err("description"))
}
fn get_return_url(&self) -> Result<String, Error> {
self.return_url
.clone()
.ok_or_else(missing_field_err("return_url"))
}
fn get_billing_address(&self) -> Result<&api::AddressDetails, Error> {
self.address
.billing
@ -139,6 +145,7 @@ pub trait PaymentsAuthorizeRequestData {
fn get_browser_info(&self) -> Result<types::BrowserInformation, Error>;
fn get_card(&self) -> Result<api::Card, Error>;
fn get_return_url(&self) -> Result<String, Error>;
fn get_webhook_url(&self) -> Result<String, Error>;
}
impl PaymentsAuthorizeRequestData for types::PaymentsAuthorizeData {
@ -164,6 +171,11 @@ impl PaymentsAuthorizeRequestData for types::PaymentsAuthorizeData {
.clone()
.ok_or_else(missing_field_err("return_url"))
}
fn get_webhook_url(&self) -> Result<String, Error> {
self.router_return_url
.clone()
.ok_or_else(missing_field_err("webhook_url"))
}
}
pub trait PaymentsSyncRequestData {