feat(connector): [Gocardless] Implement mandate flow (#2461)

Co-authored-by: prajjwalkumar17 <prajjwal.kumar@juspay.in>
This commit is contained in:
DEEPANSHU BANSAL
2023-10-06 00:50:45 +05:30
committed by GitHub
parent e24897cd5d
commit 414996592b
8 changed files with 209 additions and 169 deletions

View File

@ -256,6 +256,17 @@ impl PaymentsCaptureRequestData for types::PaymentsCaptureData {
}
}
pub trait SetupMandateRequestData {
fn get_browser_info(&self) -> Result<types::BrowserInformation, Error>;
}
impl SetupMandateRequestData for types::SetupMandateRequestData {
fn get_browser_info(&self) -> Result<types::BrowserInformation, Error> {
self.browser_info
.clone()
.ok_or_else(missing_field_err("browser_info"))
}
}
pub trait PaymentsAuthorizeRequestData {
fn is_auto_capture(&self) -> Result<bool, Error>;
fn get_email(&self) -> Result<Email, Error>;