feat(connector): [Iatapay] Implement AccessTokenAuth, Authorize, PSync, Refund, RSync and testcases (#1034)

Co-authored-by: arvindpatel24 <arvind.patel@juspay.in>
Co-authored-by: Anji Reddy <anji.reddy@juspay.in>
Co-authored-by: Sanchith Hegde <22217505+SanchithHegde@users.noreply.github.com>
This commit is contained in:
Arvind Patel
2023-05-11 14:07:05 +05:30
committed by GitHub
parent cef8914372
commit a2527b5b2a
30 changed files with 1299 additions and 10 deletions

View File

@ -307,6 +307,7 @@ impl PaymentsCancelRequestData for PaymentsCancelData {
pub trait RefundsRequestData {
fn get_connector_refund_id(&self) -> Result<String, Error>;
fn get_webhook_url(&self) -> Result<String, Error>;
}
impl RefundsRequestData for types::RefundsData {
@ -317,6 +318,11 @@ impl RefundsRequestData for types::RefundsData {
.get_required_value("connector_refund_id")
.change_context(errors::ConnectorError::MissingConnectorTransactionID)
}
fn get_webhook_url(&self) -> Result<String, Error> {
self.webhook_url
.clone()
.ok_or_else(missing_field_err("webhook_url"))
}
}
static CARD_REGEX: Lazy<HashMap<CardIssuer, Result<Regex, regex::Error>>> = Lazy::new(|| {