mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-10-31 18:17:13 +08:00 
			
		
		
		
	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:
		| @ -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 { | ||||
|  | ||||
		Reference in New Issue
	
	Block a user