feat(connector): add payment, refund urls for dummy connector (#1084)

This commit is contained in:
ThisIsMani
2023-05-12 00:34:22 +05:30
committed by GitHub
parent 822fc695a3
commit fee0e9dadd
3 changed files with 91 additions and 46 deletions

View File

@ -170,6 +170,7 @@ pub trait PaymentsAuthorizeRequestData {
fn is_mandate_payment(&self) -> bool;
fn get_webhook_url(&self) -> Result<String, Error>;
fn get_router_return_url(&self) -> Result<String, Error>;
fn get_payment_method_type(&self) -> Result<storage_models::enums::PaymentMethodType, Error>;
}
impl PaymentsAuthorizeRequestData for types::PaymentsAuthorizeData {
@ -233,6 +234,11 @@ impl PaymentsAuthorizeRequestData for types::PaymentsAuthorizeData {
.clone()
.ok_or_else(missing_field_err("webhook_url"))
}
fn get_payment_method_type(&self) -> Result<storage_models::enums::PaymentMethodType, Error> {
self.payment_method_type
.to_owned()
.ok_or_else(missing_field_err("payment_method_type"))
}
}
pub trait BrowserInformationData {