mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-28 04:04:55 +08:00
feat(connector): [PAYJUSTNOW] add Connector Template Code (#9958)
This commit is contained in:
@ -275,6 +275,7 @@ opennode.base_url = "https://dev-api.opennode.com"
|
||||
paybox.base_url = "https://preprod-ppps.paybox.com/PPPS.php"
|
||||
paybox.secondary_base_url="https://preprod-tpeweb.paybox.com/"
|
||||
payeezy.base_url = "https://api-cert.payeezy.com/"
|
||||
payjustnow.base_url = "https://sandbox-checkout.payjustnow.io/v2"
|
||||
payload.base_url = "https://api.payload.com"
|
||||
payme.base_url = "https://sandbox.payme.io/"
|
||||
payone.base_url = "https://payment.preprod.payone.com/"
|
||||
|
||||
@ -112,6 +112,7 @@ opennode.base_url = "https://dev-api.opennode.com"
|
||||
paybox.base_url = "https://preprod-ppps.paybox.com/PPPS.php"
|
||||
paybox.secondary_base_url="https://preprod-tpeweb.paybox.com/"
|
||||
payeezy.base_url = "https://api-cert.payeezy.com/"
|
||||
payjustnow.base_url = "https://sandbox-checkout.payjustnow.io/v2"
|
||||
payload.base_url = "https://api.payload.com"
|
||||
payme.base_url = "https://sandbox.payme.io/"
|
||||
payone.base_url = "https://payment.preprod.payone.com/"
|
||||
|
||||
@ -115,6 +115,7 @@ opennode.base_url = "https://api.opennode.com"
|
||||
paybox.base_url = "https://ppps.paybox.com/PPPS.php"
|
||||
paybox.secondary_base_url="https://tpeweb.paybox.com/"
|
||||
payeezy.base_url = "https://api.payeezy.com/"
|
||||
payjustnow.base_url = "https://checkout.payjustnow.io/v2"
|
||||
payload.base_url = "https://api.payload.com"
|
||||
payme.base_url = "https://live.payme.io/"
|
||||
payone.base_url = "https://payment.payone.com/"
|
||||
|
||||
@ -115,6 +115,7 @@ opennode.base_url = "https://dev-api.opennode.com"
|
||||
paybox.base_url = "https://preprod-ppps.paybox.com/PPPS.php"
|
||||
paybox.secondary_base_url="https://preprod-tpeweb.paybox.com/"
|
||||
payeezy.base_url = "https://api-cert.payeezy.com/"
|
||||
payjustnow.base_url = "https://sandbox-checkout.payjustnow.io/v2"
|
||||
payload.base_url = "https://api.payload.com"
|
||||
payme.base_url = "https://sandbox.payme.io/"
|
||||
payone.base_url = "https://payment.preprod.payone.com/"
|
||||
|
||||
@ -313,6 +313,7 @@ opennode.base_url = "https://dev-api.opennode.com"
|
||||
paybox.base_url = "https://preprod-ppps.paybox.com/PPPS.php"
|
||||
paybox.secondary_base_url = "https://preprod-tpeweb.paybox.com/"
|
||||
payeezy.base_url = "https://api-cert.payeezy.com/"
|
||||
payjustnow.base_url = "https://sandbox-checkout.payjustnow.io/v2"
|
||||
payload.base_url = "https://api.payload.com"
|
||||
payme.base_url = "https://sandbox.payme.io/"
|
||||
payone.base_url = "https://payment.preprod.payone.com/"
|
||||
|
||||
@ -201,6 +201,7 @@ opennode.base_url = "https://dev-api.opennode.com"
|
||||
paybox.base_url = "https://preprod-ppps.paybox.com/PPPS.php"
|
||||
paybox.secondary_base_url="https://preprod-tpeweb.paybox.com/"
|
||||
payeezy.base_url = "https://api-cert.payeezy.com/"
|
||||
payjustnow.base_url = "https://sandbox-checkout.payjustnow.io/v2"
|
||||
payload.base_url = "https://api.payload.com"
|
||||
payme.base_url = "https://sandbox.payme.io/"
|
||||
payone.base_url = "https://payment.preprod.payone.com/"
|
||||
|
||||
@ -156,6 +156,7 @@ impl ConnectorCommon for {{project-name | downcase | pascal_case}} {
|
||||
network_advice_code: None,
|
||||
network_decline_code: None,
|
||||
network_error_message: None,
|
||||
connector_metadata: None,
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -599,6 +600,7 @@ static {{project-name | upcase}}_CONNECTOR_INFO: ConnectorInfo = ConnectorInfo {
|
||||
display_name: "{{project-name | downcase | pascal_case}}",
|
||||
description: "{{project-name | downcase | pascal_case}} connector",
|
||||
connector_type: enums::HyperswitchConnectorCategory::PaymentGateway,
|
||||
integration_status: enums::ConnectorIntegrationStatus::Live,
|
||||
};
|
||||
|
||||
static {{project-name | upcase}}_SUPPORTED_WEBHOOK_FLOWS: [enums::EventClass; 0] = [];
|
||||
|
||||
@ -7599,3 +7599,7 @@ placeholder="Enter Payment Processing Details At"
|
||||
required=true
|
||||
type="Radio"
|
||||
options=["Hyperswitch"]
|
||||
|
||||
[payjustnow]
|
||||
[payjustnow.connector_auth.HeaderKey]
|
||||
api_key = "API Key"
|
||||
|
||||
@ -6334,3 +6334,7 @@ placeholder="Enter Payment Processing Details At"
|
||||
required=true
|
||||
type="Radio"
|
||||
options=["Hyperswitch"]
|
||||
|
||||
[payjustnow]
|
||||
[payjustnow.connector_auth.HeaderKey]
|
||||
api_key = "API Key"
|
||||
|
||||
@ -7573,3 +7573,7 @@ placeholder="Enter Payment Processing Details At"
|
||||
required=true
|
||||
type="Radio"
|
||||
options=["Hyperswitch"]
|
||||
|
||||
[payjustnow]
|
||||
[payjustnow.connector_auth.HeaderKey]
|
||||
api_key = "API Key"
|
||||
|
||||
@ -82,6 +82,7 @@ pub mod opayo;
|
||||
pub mod opennode;
|
||||
pub mod paybox;
|
||||
pub mod payeezy;
|
||||
pub mod payjustnow;
|
||||
pub mod payload;
|
||||
pub mod payme;
|
||||
pub mod payone;
|
||||
@ -155,14 +156,15 @@ pub use self::{
|
||||
mpgs::Mpgs, multisafepay::Multisafepay, netcetera::Netcetera, nexinets::Nexinets,
|
||||
nexixpay::Nexixpay, nmi::Nmi, nomupay::Nomupay, noon::Noon, nordea::Nordea, novalnet::Novalnet,
|
||||
nuvei::Nuvei, opayo::Opayo, opennode::Opennode, paybox::Paybox, payeezy::Payeezy,
|
||||
payload::Payload, payme::Payme, payone::Payone, paypal::Paypal, paysafe::Paysafe,
|
||||
paystack::Paystack, paytm::Paytm, payu::Payu, peachpayments::Peachpayments, phonepe::Phonepe,
|
||||
placetopay::Placetopay, plaid::Plaid, powertranz::Powertranz, prophetpay::Prophetpay,
|
||||
rapyd::Rapyd, razorpay::Razorpay, recurly::Recurly, redsys::Redsys, riskified::Riskified,
|
||||
santander::Santander, shift4::Shift4, sift::Sift, signifyd::Signifyd, silverflow::Silverflow,
|
||||
square::Square, stax::Stax, stripe::Stripe, stripebilling::Stripebilling, taxjar::Taxjar,
|
||||
tesouro::Tesouro, threedsecureio::Threedsecureio, thunes::Thunes, tokenex::Tokenex,
|
||||
tokenio::Tokenio, trustpay::Trustpay, trustpayments::Trustpayments, tsys::Tsys,
|
||||
payjustnow::Payjustnow, payload::Payload, payme::Payme, payone::Payone, paypal::Paypal,
|
||||
paysafe::Paysafe, paystack::Paystack, paytm::Paytm, payu::Payu, peachpayments::Peachpayments,
|
||||
phonepe::Phonepe, placetopay::Placetopay, plaid::Plaid, powertranz::Powertranz,
|
||||
prophetpay::Prophetpay, rapyd::Rapyd, razorpay::Razorpay, recurly::Recurly, redsys::Redsys,
|
||||
riskified::Riskified, santander::Santander, shift4::Shift4, sift::Sift, signifyd::Signifyd,
|
||||
silverflow::Silverflow, square::Square, stax::Stax, stripe::Stripe,
|
||||
stripebilling::Stripebilling, taxjar::Taxjar, tesouro::Tesouro, threedsecureio::Threedsecureio,
|
||||
thunes::Thunes, tokenex::Tokenex, tokenio::Tokenio, trustpay::Trustpay,
|
||||
trustpayments::Trustpayments, tsys::Tsys,
|
||||
unified_authentication_service::UnifiedAuthenticationService, vgs::Vgs, volt::Volt,
|
||||
wellsfargo::Wellsfargo, wellsfargopayout::Wellsfargopayout, wise::Wise, worldline::Worldline,
|
||||
worldpay::Worldpay, worldpayvantiv::Worldpayvantiv, worldpayxml::Worldpayxml, xendit::Xendit,
|
||||
|
||||
625
crates/hyperswitch_connectors/src/connectors/payjustnow.rs
Normal file
625
crates/hyperswitch_connectors/src/connectors/payjustnow.rs
Normal file
@ -0,0 +1,625 @@
|
||||
pub mod transformers;
|
||||
|
||||
use std::sync::LazyLock;
|
||||
|
||||
use common_enums::enums;
|
||||
use common_utils::{
|
||||
errors::CustomResult,
|
||||
ext_traits::BytesExt,
|
||||
request::{Method, Request, RequestBuilder, RequestContent},
|
||||
types::{AmountConvertor, StringMinorUnit, StringMinorUnitForConnector},
|
||||
};
|
||||
use error_stack::{report, ResultExt};
|
||||
use hyperswitch_domain_models::{
|
||||
payment_method_data::PaymentMethodData,
|
||||
router_data::{AccessToken, ConnectorAuthType, ErrorResponse, RouterData},
|
||||
router_flow_types::{
|
||||
access_token_auth::AccessTokenAuth,
|
||||
payments::{Authorize, Capture, PSync, PaymentMethodToken, Session, SetupMandate, Void},
|
||||
refunds::{Execute, RSync},
|
||||
},
|
||||
router_request_types::{
|
||||
AccessTokenRequestData, PaymentMethodTokenizationData, PaymentsAuthorizeData,
|
||||
PaymentsCancelData, PaymentsCaptureData, PaymentsSessionData, PaymentsSyncData,
|
||||
RefundsData, SetupMandateRequestData,
|
||||
},
|
||||
router_response_types::{
|
||||
ConnectorInfo, PaymentsResponseData, RefundsResponseData, SupportedPaymentMethods,
|
||||
},
|
||||
types::{
|
||||
PaymentsAuthorizeRouterData, PaymentsCaptureRouterData, PaymentsSyncRouterData,
|
||||
RefundSyncRouterData, RefundsRouterData,
|
||||
},
|
||||
};
|
||||
use hyperswitch_interfaces::{
|
||||
api::{
|
||||
self, ConnectorCommon, ConnectorCommonExt, ConnectorIntegration, ConnectorSpecifications,
|
||||
ConnectorValidation,
|
||||
},
|
||||
configs::Connectors,
|
||||
errors,
|
||||
events::connector_api_logs::ConnectorEvent,
|
||||
types::{self, Response},
|
||||
webhooks,
|
||||
};
|
||||
use masking::{ExposeInterface, Mask};
|
||||
use transformers as payjustnow;
|
||||
|
||||
use crate::{constants::headers, types::ResponseRouterData, utils};
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct Payjustnow {
|
||||
amount_converter: &'static (dyn AmountConvertor<Output = StringMinorUnit> + Sync),
|
||||
}
|
||||
|
||||
impl Payjustnow {
|
||||
pub fn new() -> &'static Self {
|
||||
&Self {
|
||||
amount_converter: &StringMinorUnitForConnector,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl api::Payment for Payjustnow {}
|
||||
impl api::PaymentSession for Payjustnow {}
|
||||
impl api::ConnectorAccessToken for Payjustnow {}
|
||||
impl api::MandateSetup for Payjustnow {}
|
||||
impl api::PaymentAuthorize for Payjustnow {}
|
||||
impl api::PaymentSync for Payjustnow {}
|
||||
impl api::PaymentCapture for Payjustnow {}
|
||||
impl api::PaymentVoid for Payjustnow {}
|
||||
impl api::Refund for Payjustnow {}
|
||||
impl api::RefundExecute for Payjustnow {}
|
||||
impl api::RefundSync for Payjustnow {}
|
||||
impl api::PaymentToken for Payjustnow {}
|
||||
|
||||
impl ConnectorIntegration<PaymentMethodToken, PaymentMethodTokenizationData, PaymentsResponseData>
|
||||
for Payjustnow
|
||||
{
|
||||
// Not Implemented (R)
|
||||
}
|
||||
|
||||
impl<Flow, Request, Response> ConnectorCommonExt<Flow, Request, Response> for Payjustnow
|
||||
where
|
||||
Self: ConnectorIntegration<Flow, Request, Response>,
|
||||
{
|
||||
fn build_headers(
|
||||
&self,
|
||||
req: &RouterData<Flow, Request, Response>,
|
||||
_connectors: &Connectors,
|
||||
) -> CustomResult<Vec<(String, masking::Maskable<String>)>, errors::ConnectorError> {
|
||||
let mut header = vec![(
|
||||
headers::CONTENT_TYPE.to_string(),
|
||||
self.get_content_type().to_string().into(),
|
||||
)];
|
||||
let mut api_key = self.get_auth_header(&req.connector_auth_type)?;
|
||||
header.append(&mut api_key);
|
||||
Ok(header)
|
||||
}
|
||||
}
|
||||
|
||||
impl ConnectorCommon for Payjustnow {
|
||||
fn id(&self) -> &'static str {
|
||||
"payjustnow"
|
||||
}
|
||||
|
||||
fn get_currency_unit(&self) -> api::CurrencyUnit {
|
||||
api::CurrencyUnit::Minor
|
||||
}
|
||||
|
||||
fn common_get_content_type(&self) -> &'static str {
|
||||
"application/json"
|
||||
}
|
||||
|
||||
fn base_url<'a>(&self, connectors: &'a Connectors) -> &'a str {
|
||||
connectors.payjustnow.base_url.as_ref()
|
||||
}
|
||||
|
||||
fn get_auth_header(
|
||||
&self,
|
||||
auth_type: &ConnectorAuthType,
|
||||
) -> CustomResult<Vec<(String, masking::Maskable<String>)>, errors::ConnectorError> {
|
||||
let auth = payjustnow::PayjustnowAuthType::try_from(auth_type)
|
||||
.change_context(errors::ConnectorError::FailedToObtainAuthType)?;
|
||||
Ok(vec![(
|
||||
headers::AUTHORIZATION.to_string(),
|
||||
auth.api_key.expose().into_masked(),
|
||||
)])
|
||||
}
|
||||
|
||||
fn build_error_response(
|
||||
&self,
|
||||
res: Response,
|
||||
event_builder: Option<&mut ConnectorEvent>,
|
||||
) -> CustomResult<ErrorResponse, errors::ConnectorError> {
|
||||
let response: payjustnow::PayjustnowErrorResponse = res
|
||||
.response
|
||||
.parse_struct("PayjustnowErrorResponse")
|
||||
.change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
|
||||
|
||||
event_builder.map(|i| i.set_response_body(&response));
|
||||
router_env::logger::info!(connector_response=?response);
|
||||
|
||||
Ok(ErrorResponse {
|
||||
status_code: res.status_code,
|
||||
code: response.code,
|
||||
message: response.message,
|
||||
reason: response.reason,
|
||||
attempt_status: None,
|
||||
connector_transaction_id: None,
|
||||
network_advice_code: None,
|
||||
network_decline_code: None,
|
||||
network_error_message: None,
|
||||
connector_metadata: None,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
impl ConnectorValidation for Payjustnow {
|
||||
fn validate_mandate_payment(
|
||||
&self,
|
||||
_pm_type: Option<enums::PaymentMethodType>,
|
||||
pm_data: PaymentMethodData,
|
||||
) -> CustomResult<(), errors::ConnectorError> {
|
||||
match pm_data {
|
||||
PaymentMethodData::Card(_) => Err(errors::ConnectorError::NotImplemented(
|
||||
"validate_mandate_payment does not support cards".to_string(),
|
||||
)
|
||||
.into()),
|
||||
_ => Ok(()),
|
||||
}
|
||||
}
|
||||
|
||||
fn validate_psync_reference_id(
|
||||
&self,
|
||||
_data: &PaymentsSyncData,
|
||||
_is_three_ds: bool,
|
||||
_status: enums::AttemptStatus,
|
||||
_connector_meta_data: Option<common_utils::pii::SecretSerdeValue>,
|
||||
) -> CustomResult<(), errors::ConnectorError> {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
impl ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData> for Payjustnow {
|
||||
//TODO: implement sessions flow
|
||||
}
|
||||
|
||||
impl ConnectorIntegration<AccessTokenAuth, AccessTokenRequestData, AccessToken> for Payjustnow {}
|
||||
|
||||
impl ConnectorIntegration<SetupMandate, SetupMandateRequestData, PaymentsResponseData>
|
||||
for Payjustnow
|
||||
{
|
||||
}
|
||||
|
||||
impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData> for Payjustnow {
|
||||
fn get_headers(
|
||||
&self,
|
||||
req: &PaymentsAuthorizeRouterData,
|
||||
connectors: &Connectors,
|
||||
) -> CustomResult<Vec<(String, masking::Maskable<String>)>, errors::ConnectorError> {
|
||||
self.build_headers(req, connectors)
|
||||
}
|
||||
|
||||
fn get_content_type(&self) -> &'static str {
|
||||
self.common_get_content_type()
|
||||
}
|
||||
|
||||
fn get_url(
|
||||
&self,
|
||||
_req: &PaymentsAuthorizeRouterData,
|
||||
_connectors: &Connectors,
|
||||
) -> CustomResult<String, errors::ConnectorError> {
|
||||
Err(errors::ConnectorError::NotImplemented("get_url method".to_string()).into())
|
||||
}
|
||||
|
||||
fn get_request_body(
|
||||
&self,
|
||||
req: &PaymentsAuthorizeRouterData,
|
||||
_connectors: &Connectors,
|
||||
) -> CustomResult<RequestContent, errors::ConnectorError> {
|
||||
let amount = utils::convert_amount(
|
||||
self.amount_converter,
|
||||
req.request.minor_amount,
|
||||
req.request.currency,
|
||||
)?;
|
||||
|
||||
let connector_router_data = payjustnow::PayjustnowRouterData::from((amount, req));
|
||||
let connector_req =
|
||||
payjustnow::PayjustnowPaymentsRequest::try_from(&connector_router_data)?;
|
||||
Ok(RequestContent::Json(Box::new(connector_req)))
|
||||
}
|
||||
|
||||
fn build_request(
|
||||
&self,
|
||||
req: &PaymentsAuthorizeRouterData,
|
||||
connectors: &Connectors,
|
||||
) -> CustomResult<Option<Request>, errors::ConnectorError> {
|
||||
Ok(Some(
|
||||
RequestBuilder::new()
|
||||
.method(Method::Post)
|
||||
.url(&types::PaymentsAuthorizeType::get_url(
|
||||
self, req, connectors,
|
||||
)?)
|
||||
.attach_default_headers()
|
||||
.headers(types::PaymentsAuthorizeType::get_headers(
|
||||
self, req, connectors,
|
||||
)?)
|
||||
.set_body(types::PaymentsAuthorizeType::get_request_body(
|
||||
self, req, connectors,
|
||||
)?)
|
||||
.build(),
|
||||
))
|
||||
}
|
||||
|
||||
fn handle_response(
|
||||
&self,
|
||||
data: &PaymentsAuthorizeRouterData,
|
||||
event_builder: Option<&mut ConnectorEvent>,
|
||||
res: Response,
|
||||
) -> CustomResult<PaymentsAuthorizeRouterData, errors::ConnectorError> {
|
||||
let response: payjustnow::PayjustnowPaymentsResponse = res
|
||||
.response
|
||||
.parse_struct("Payjustnow PaymentsAuthorizeResponse")
|
||||
.change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
|
||||
event_builder.map(|i| i.set_response_body(&response));
|
||||
router_env::logger::info!(connector_response=?response);
|
||||
RouterData::try_from(ResponseRouterData {
|
||||
response,
|
||||
data: data.clone(),
|
||||
http_code: res.status_code,
|
||||
})
|
||||
}
|
||||
|
||||
fn get_error_response(
|
||||
&self,
|
||||
res: Response,
|
||||
event_builder: Option<&mut ConnectorEvent>,
|
||||
) -> CustomResult<ErrorResponse, errors::ConnectorError> {
|
||||
self.build_error_response(res, event_builder)
|
||||
}
|
||||
}
|
||||
|
||||
impl ConnectorIntegration<PSync, PaymentsSyncData, PaymentsResponseData> for Payjustnow {
|
||||
fn get_headers(
|
||||
&self,
|
||||
req: &PaymentsSyncRouterData,
|
||||
connectors: &Connectors,
|
||||
) -> CustomResult<Vec<(String, masking::Maskable<String>)>, errors::ConnectorError> {
|
||||
self.build_headers(req, connectors)
|
||||
}
|
||||
|
||||
fn get_content_type(&self) -> &'static str {
|
||||
self.common_get_content_type()
|
||||
}
|
||||
|
||||
fn get_url(
|
||||
&self,
|
||||
_req: &PaymentsSyncRouterData,
|
||||
_connectors: &Connectors,
|
||||
) -> CustomResult<String, errors::ConnectorError> {
|
||||
Err(errors::ConnectorError::NotImplemented("get_url method".to_string()).into())
|
||||
}
|
||||
|
||||
fn build_request(
|
||||
&self,
|
||||
req: &PaymentsSyncRouterData,
|
||||
connectors: &Connectors,
|
||||
) -> CustomResult<Option<Request>, errors::ConnectorError> {
|
||||
Ok(Some(
|
||||
RequestBuilder::new()
|
||||
.method(Method::Get)
|
||||
.url(&types::PaymentsSyncType::get_url(self, req, connectors)?)
|
||||
.attach_default_headers()
|
||||
.headers(types::PaymentsSyncType::get_headers(self, req, connectors)?)
|
||||
.build(),
|
||||
))
|
||||
}
|
||||
|
||||
fn handle_response(
|
||||
&self,
|
||||
data: &PaymentsSyncRouterData,
|
||||
event_builder: Option<&mut ConnectorEvent>,
|
||||
res: Response,
|
||||
) -> CustomResult<PaymentsSyncRouterData, errors::ConnectorError> {
|
||||
let response: payjustnow::PayjustnowPaymentsResponse = res
|
||||
.response
|
||||
.parse_struct("payjustnow PaymentsSyncResponse")
|
||||
.change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
|
||||
event_builder.map(|i| i.set_response_body(&response));
|
||||
router_env::logger::info!(connector_response=?response);
|
||||
RouterData::try_from(ResponseRouterData {
|
||||
response,
|
||||
data: data.clone(),
|
||||
http_code: res.status_code,
|
||||
})
|
||||
}
|
||||
|
||||
fn get_error_response(
|
||||
&self,
|
||||
res: Response,
|
||||
event_builder: Option<&mut ConnectorEvent>,
|
||||
) -> CustomResult<ErrorResponse, errors::ConnectorError> {
|
||||
self.build_error_response(res, event_builder)
|
||||
}
|
||||
}
|
||||
|
||||
impl ConnectorIntegration<Capture, PaymentsCaptureData, PaymentsResponseData> for Payjustnow {
|
||||
fn get_headers(
|
||||
&self,
|
||||
req: &PaymentsCaptureRouterData,
|
||||
connectors: &Connectors,
|
||||
) -> CustomResult<Vec<(String, masking::Maskable<String>)>, errors::ConnectorError> {
|
||||
self.build_headers(req, connectors)
|
||||
}
|
||||
|
||||
fn get_content_type(&self) -> &'static str {
|
||||
self.common_get_content_type()
|
||||
}
|
||||
|
||||
fn get_url(
|
||||
&self,
|
||||
_req: &PaymentsCaptureRouterData,
|
||||
_connectors: &Connectors,
|
||||
) -> CustomResult<String, errors::ConnectorError> {
|
||||
Err(errors::ConnectorError::NotImplemented("get_url method".to_string()).into())
|
||||
}
|
||||
|
||||
fn get_request_body(
|
||||
&self,
|
||||
_req: &PaymentsCaptureRouterData,
|
||||
_connectors: &Connectors,
|
||||
) -> CustomResult<RequestContent, errors::ConnectorError> {
|
||||
Err(errors::ConnectorError::NotImplemented("get_request_body method".to_string()).into())
|
||||
}
|
||||
|
||||
fn build_request(
|
||||
&self,
|
||||
req: &PaymentsCaptureRouterData,
|
||||
connectors: &Connectors,
|
||||
) -> CustomResult<Option<Request>, errors::ConnectorError> {
|
||||
Ok(Some(
|
||||
RequestBuilder::new()
|
||||
.method(Method::Post)
|
||||
.url(&types::PaymentsCaptureType::get_url(self, req, connectors)?)
|
||||
.attach_default_headers()
|
||||
.headers(types::PaymentsCaptureType::get_headers(
|
||||
self, req, connectors,
|
||||
)?)
|
||||
.set_body(types::PaymentsCaptureType::get_request_body(
|
||||
self, req, connectors,
|
||||
)?)
|
||||
.build(),
|
||||
))
|
||||
}
|
||||
|
||||
fn handle_response(
|
||||
&self,
|
||||
data: &PaymentsCaptureRouterData,
|
||||
event_builder: Option<&mut ConnectorEvent>,
|
||||
res: Response,
|
||||
) -> CustomResult<PaymentsCaptureRouterData, errors::ConnectorError> {
|
||||
let response: payjustnow::PayjustnowPaymentsResponse = res
|
||||
.response
|
||||
.parse_struct("Payjustnow PaymentsCaptureResponse")
|
||||
.change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
|
||||
event_builder.map(|i| i.set_response_body(&response));
|
||||
router_env::logger::info!(connector_response=?response);
|
||||
RouterData::try_from(ResponseRouterData {
|
||||
response,
|
||||
data: data.clone(),
|
||||
http_code: res.status_code,
|
||||
})
|
||||
}
|
||||
|
||||
fn get_error_response(
|
||||
&self,
|
||||
res: Response,
|
||||
event_builder: Option<&mut ConnectorEvent>,
|
||||
) -> CustomResult<ErrorResponse, errors::ConnectorError> {
|
||||
self.build_error_response(res, event_builder)
|
||||
}
|
||||
}
|
||||
|
||||
impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Payjustnow {}
|
||||
|
||||
impl ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for Payjustnow {
|
||||
fn get_headers(
|
||||
&self,
|
||||
req: &RefundsRouterData<Execute>,
|
||||
connectors: &Connectors,
|
||||
) -> CustomResult<Vec<(String, masking::Maskable<String>)>, errors::ConnectorError> {
|
||||
self.build_headers(req, connectors)
|
||||
}
|
||||
|
||||
fn get_content_type(&self) -> &'static str {
|
||||
self.common_get_content_type()
|
||||
}
|
||||
|
||||
fn get_url(
|
||||
&self,
|
||||
_req: &RefundsRouterData<Execute>,
|
||||
_connectors: &Connectors,
|
||||
) -> CustomResult<String, errors::ConnectorError> {
|
||||
Err(errors::ConnectorError::NotImplemented("get_url method".to_string()).into())
|
||||
}
|
||||
|
||||
fn get_request_body(
|
||||
&self,
|
||||
req: &RefundsRouterData<Execute>,
|
||||
_connectors: &Connectors,
|
||||
) -> CustomResult<RequestContent, errors::ConnectorError> {
|
||||
let refund_amount = utils::convert_amount(
|
||||
self.amount_converter,
|
||||
req.request.minor_refund_amount,
|
||||
req.request.currency,
|
||||
)?;
|
||||
|
||||
let connector_router_data = payjustnow::PayjustnowRouterData::from((refund_amount, req));
|
||||
let connector_req = payjustnow::PayjustnowRefundRequest::try_from(&connector_router_data)?;
|
||||
Ok(RequestContent::Json(Box::new(connector_req)))
|
||||
}
|
||||
|
||||
fn build_request(
|
||||
&self,
|
||||
req: &RefundsRouterData<Execute>,
|
||||
connectors: &Connectors,
|
||||
) -> CustomResult<Option<Request>, errors::ConnectorError> {
|
||||
let request = RequestBuilder::new()
|
||||
.method(Method::Post)
|
||||
.url(&types::RefundExecuteType::get_url(self, req, connectors)?)
|
||||
.attach_default_headers()
|
||||
.headers(types::RefundExecuteType::get_headers(
|
||||
self, req, connectors,
|
||||
)?)
|
||||
.set_body(types::RefundExecuteType::get_request_body(
|
||||
self, req, connectors,
|
||||
)?)
|
||||
.build();
|
||||
Ok(Some(request))
|
||||
}
|
||||
|
||||
fn handle_response(
|
||||
&self,
|
||||
data: &RefundsRouterData<Execute>,
|
||||
event_builder: Option<&mut ConnectorEvent>,
|
||||
res: Response,
|
||||
) -> CustomResult<RefundsRouterData<Execute>, errors::ConnectorError> {
|
||||
let response: payjustnow::RefundResponse = res
|
||||
.response
|
||||
.parse_struct("payjustnow RefundResponse")
|
||||
.change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
|
||||
event_builder.map(|i| i.set_response_body(&response));
|
||||
router_env::logger::info!(connector_response=?response);
|
||||
RouterData::try_from(ResponseRouterData {
|
||||
response,
|
||||
data: data.clone(),
|
||||
http_code: res.status_code,
|
||||
})
|
||||
}
|
||||
|
||||
fn get_error_response(
|
||||
&self,
|
||||
res: Response,
|
||||
event_builder: Option<&mut ConnectorEvent>,
|
||||
) -> CustomResult<ErrorResponse, errors::ConnectorError> {
|
||||
self.build_error_response(res, event_builder)
|
||||
}
|
||||
}
|
||||
|
||||
impl ConnectorIntegration<RSync, RefundsData, RefundsResponseData> for Payjustnow {
|
||||
fn get_headers(
|
||||
&self,
|
||||
req: &RefundSyncRouterData,
|
||||
connectors: &Connectors,
|
||||
) -> CustomResult<Vec<(String, masking::Maskable<String>)>, errors::ConnectorError> {
|
||||
self.build_headers(req, connectors)
|
||||
}
|
||||
|
||||
fn get_content_type(&self) -> &'static str {
|
||||
self.common_get_content_type()
|
||||
}
|
||||
|
||||
fn get_url(
|
||||
&self,
|
||||
_req: &RefundSyncRouterData,
|
||||
_connectors: &Connectors,
|
||||
) -> CustomResult<String, errors::ConnectorError> {
|
||||
Err(errors::ConnectorError::NotImplemented("get_url method".to_string()).into())
|
||||
}
|
||||
|
||||
fn build_request(
|
||||
&self,
|
||||
req: &RefundSyncRouterData,
|
||||
connectors: &Connectors,
|
||||
) -> CustomResult<Option<Request>, errors::ConnectorError> {
|
||||
Ok(Some(
|
||||
RequestBuilder::new()
|
||||
.method(Method::Get)
|
||||
.url(&types::RefundSyncType::get_url(self, req, connectors)?)
|
||||
.attach_default_headers()
|
||||
.headers(types::RefundSyncType::get_headers(self, req, connectors)?)
|
||||
.set_body(types::RefundSyncType::get_request_body(
|
||||
self, req, connectors,
|
||||
)?)
|
||||
.build(),
|
||||
))
|
||||
}
|
||||
|
||||
fn handle_response(
|
||||
&self,
|
||||
data: &RefundSyncRouterData,
|
||||
event_builder: Option<&mut ConnectorEvent>,
|
||||
res: Response,
|
||||
) -> CustomResult<RefundSyncRouterData, errors::ConnectorError> {
|
||||
let response: payjustnow::RefundResponse = res
|
||||
.response
|
||||
.parse_struct("payjustnow RefundSyncResponse")
|
||||
.change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
|
||||
event_builder.map(|i| i.set_response_body(&response));
|
||||
router_env::logger::info!(connector_response=?response);
|
||||
RouterData::try_from(ResponseRouterData {
|
||||
response,
|
||||
data: data.clone(),
|
||||
http_code: res.status_code,
|
||||
})
|
||||
}
|
||||
|
||||
fn get_error_response(
|
||||
&self,
|
||||
res: Response,
|
||||
event_builder: Option<&mut ConnectorEvent>,
|
||||
) -> CustomResult<ErrorResponse, errors::ConnectorError> {
|
||||
self.build_error_response(res, event_builder)
|
||||
}
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
impl webhooks::IncomingWebhook for Payjustnow {
|
||||
fn get_webhook_object_reference_id(
|
||||
&self,
|
||||
_request: &webhooks::IncomingWebhookRequestDetails<'_>,
|
||||
) -> CustomResult<api_models::webhooks::ObjectReferenceId, errors::ConnectorError> {
|
||||
Err(report!(errors::ConnectorError::WebhooksNotImplemented))
|
||||
}
|
||||
|
||||
fn get_webhook_event_type(
|
||||
&self,
|
||||
_request: &webhooks::IncomingWebhookRequestDetails<'_>,
|
||||
) -> CustomResult<api_models::webhooks::IncomingWebhookEvent, errors::ConnectorError> {
|
||||
Err(report!(errors::ConnectorError::WebhooksNotImplemented))
|
||||
}
|
||||
|
||||
fn get_webhook_resource_object(
|
||||
&self,
|
||||
_request: &webhooks::IncomingWebhookRequestDetails<'_>,
|
||||
) -> CustomResult<Box<dyn masking::ErasedMaskSerialize>, errors::ConnectorError> {
|
||||
Err(report!(errors::ConnectorError::WebhooksNotImplemented))
|
||||
}
|
||||
}
|
||||
|
||||
static PAYJUSTNOW_SUPPORTED_PAYMENT_METHODS: LazyLock<SupportedPaymentMethods> =
|
||||
LazyLock::new(SupportedPaymentMethods::new);
|
||||
|
||||
static PAYJUSTNOW_CONNECTOR_INFO: ConnectorInfo = ConnectorInfo {
|
||||
display_name: "Payjustnow",
|
||||
description: "Payjustnow connector",
|
||||
connector_type: enums::HyperswitchConnectorCategory::PaymentGateway,
|
||||
integration_status: enums::ConnectorIntegrationStatus::Live,
|
||||
};
|
||||
|
||||
static PAYJUSTNOW_SUPPORTED_WEBHOOK_FLOWS: [enums::EventClass; 0] = [];
|
||||
|
||||
impl ConnectorSpecifications for Payjustnow {
|
||||
fn get_connector_about(&self) -> Option<&'static ConnectorInfo> {
|
||||
Some(&PAYJUSTNOW_CONNECTOR_INFO)
|
||||
}
|
||||
|
||||
fn get_supported_payment_methods(&self) -> Option<&'static SupportedPaymentMethods> {
|
||||
Some(&*PAYJUSTNOW_SUPPORTED_PAYMENT_METHODS)
|
||||
}
|
||||
|
||||
fn get_supported_webhook_flows(&self) -> Option<&'static [enums::EventClass]> {
|
||||
Some(&PAYJUSTNOW_SUPPORTED_WEBHOOK_FLOWS)
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,219 @@
|
||||
use common_enums::enums;
|
||||
use common_utils::types::StringMinorUnit;
|
||||
use hyperswitch_domain_models::{
|
||||
payment_method_data::PaymentMethodData,
|
||||
router_data::{ConnectorAuthType, RouterData},
|
||||
router_flow_types::refunds::{Execute, RSync},
|
||||
router_request_types::ResponseId,
|
||||
router_response_types::{PaymentsResponseData, RefundsResponseData},
|
||||
types::{PaymentsAuthorizeRouterData, RefundsRouterData},
|
||||
};
|
||||
use hyperswitch_interfaces::errors;
|
||||
use masking::Secret;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::types::{RefundsResponseRouterData, ResponseRouterData};
|
||||
|
||||
//TODO: Fill the struct with respective fields
|
||||
pub struct PayjustnowRouterData<T> {
|
||||
pub amount: StringMinorUnit, // The type of amount that a connector accepts, for example, String, i64, f64, etc.
|
||||
pub router_data: T,
|
||||
}
|
||||
|
||||
impl<T> From<(StringMinorUnit, T)> for PayjustnowRouterData<T> {
|
||||
fn from((amount, item): (StringMinorUnit, T)) -> Self {
|
||||
//Todo : use utils to convert the amount to the type of amount that a connector accepts
|
||||
Self {
|
||||
amount,
|
||||
router_data: item,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//TODO: Fill the struct with respective fields
|
||||
#[derive(Default, Debug, Serialize, PartialEq)]
|
||||
pub struct PayjustnowPaymentsRequest {
|
||||
amount: StringMinorUnit,
|
||||
card: PayjustnowCard,
|
||||
}
|
||||
|
||||
#[derive(Default, Debug, Serialize, Eq, PartialEq)]
|
||||
pub struct PayjustnowCard {
|
||||
number: cards::CardNumber,
|
||||
expiry_month: Secret<String>,
|
||||
expiry_year: Secret<String>,
|
||||
cvc: Secret<String>,
|
||||
complete: bool,
|
||||
}
|
||||
|
||||
impl TryFrom<&PayjustnowRouterData<&PaymentsAuthorizeRouterData>> for PayjustnowPaymentsRequest {
|
||||
type Error = error_stack::Report<errors::ConnectorError>;
|
||||
fn try_from(
|
||||
item: &PayjustnowRouterData<&PaymentsAuthorizeRouterData>,
|
||||
) -> Result<Self, Self::Error> {
|
||||
match item.router_data.request.payment_method_data.clone() {
|
||||
PaymentMethodData::Card(_) => Err(errors::ConnectorError::NotImplemented(
|
||||
"Card payment method not implemented".to_string(),
|
||||
)
|
||||
.into()),
|
||||
_ => Err(errors::ConnectorError::NotImplemented("Payment method".to_string()).into()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//TODO: Fill the struct with respective fields
|
||||
// Auth Struct
|
||||
pub struct PayjustnowAuthType {
|
||||
pub(super) api_key: Secret<String>,
|
||||
}
|
||||
|
||||
impl TryFrom<&ConnectorAuthType> for PayjustnowAuthType {
|
||||
type Error = error_stack::Report<errors::ConnectorError>;
|
||||
fn try_from(auth_type: &ConnectorAuthType) -> Result<Self, Self::Error> {
|
||||
match auth_type {
|
||||
ConnectorAuthType::HeaderKey { api_key } => Ok(Self {
|
||||
api_key: api_key.to_owned(),
|
||||
}),
|
||||
_ => Err(errors::ConnectorError::FailedToObtainAuthType.into()),
|
||||
}
|
||||
}
|
||||
}
|
||||
// PaymentsResponse
|
||||
//TODO: Append the remaining status flags
|
||||
#[derive(Debug, Clone, Copy, Default, Serialize, Deserialize, PartialEq)]
|
||||
#[serde(rename_all = "lowercase")]
|
||||
pub enum PayjustnowPaymentStatus {
|
||||
Succeeded,
|
||||
Failed,
|
||||
#[default]
|
||||
Processing,
|
||||
}
|
||||
|
||||
impl From<PayjustnowPaymentStatus> for common_enums::AttemptStatus {
|
||||
fn from(item: PayjustnowPaymentStatus) -> Self {
|
||||
match item {
|
||||
PayjustnowPaymentStatus::Succeeded => Self::Charged,
|
||||
PayjustnowPaymentStatus::Failed => Self::Failure,
|
||||
PayjustnowPaymentStatus::Processing => Self::Authorizing,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//TODO: Fill the struct with respective fields
|
||||
#[derive(Default, Debug, Clone, Serialize, Deserialize, PartialEq)]
|
||||
pub struct PayjustnowPaymentsResponse {
|
||||
status: PayjustnowPaymentStatus,
|
||||
id: String,
|
||||
}
|
||||
|
||||
impl<F, T> TryFrom<ResponseRouterData<F, PayjustnowPaymentsResponse, T, PaymentsResponseData>>
|
||||
for RouterData<F, T, PaymentsResponseData>
|
||||
{
|
||||
type Error = error_stack::Report<errors::ConnectorError>;
|
||||
fn try_from(
|
||||
item: ResponseRouterData<F, PayjustnowPaymentsResponse, T, PaymentsResponseData>,
|
||||
) -> Result<Self, Self::Error> {
|
||||
Ok(Self {
|
||||
status: common_enums::AttemptStatus::from(item.response.status),
|
||||
response: Ok(PaymentsResponseData::TransactionResponse {
|
||||
resource_id: ResponseId::ConnectorTransactionId(item.response.id),
|
||||
redirection_data: Box::new(None),
|
||||
mandate_reference: Box::new(None),
|
||||
connector_metadata: None,
|
||||
network_txn_id: None,
|
||||
connector_response_reference_id: None,
|
||||
incremental_authorization_allowed: None,
|
||||
charges: None,
|
||||
}),
|
||||
..item.data
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
//TODO: Fill the struct with respective fields
|
||||
// REFUND :
|
||||
// Type definition for RefundRequest
|
||||
#[derive(Default, Debug, Serialize)]
|
||||
pub struct PayjustnowRefundRequest {
|
||||
pub amount: StringMinorUnit,
|
||||
}
|
||||
|
||||
impl<F> TryFrom<&PayjustnowRouterData<&RefundsRouterData<F>>> for PayjustnowRefundRequest {
|
||||
type Error = error_stack::Report<errors::ConnectorError>;
|
||||
fn try_from(item: &PayjustnowRouterData<&RefundsRouterData<F>>) -> Result<Self, Self::Error> {
|
||||
Ok(Self {
|
||||
amount: item.amount.to_owned(),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// Type definition for Refund Response
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[derive(Debug, Copy, Serialize, Default, Deserialize, Clone)]
|
||||
pub enum RefundStatus {
|
||||
Succeeded,
|
||||
Failed,
|
||||
#[default]
|
||||
Processing,
|
||||
}
|
||||
|
||||
impl From<RefundStatus> for enums::RefundStatus {
|
||||
fn from(item: RefundStatus) -> Self {
|
||||
match item {
|
||||
RefundStatus::Succeeded => Self::Success,
|
||||
RefundStatus::Failed => Self::Failure,
|
||||
RefundStatus::Processing => Self::Pending,
|
||||
//TODO: Review mapping
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//TODO: Fill the struct with respective fields
|
||||
#[derive(Default, Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct RefundResponse {
|
||||
id: String,
|
||||
status: RefundStatus,
|
||||
}
|
||||
|
||||
impl TryFrom<RefundsResponseRouterData<Execute, RefundResponse>> for RefundsRouterData<Execute> {
|
||||
type Error = error_stack::Report<errors::ConnectorError>;
|
||||
fn try_from(
|
||||
item: RefundsResponseRouterData<Execute, RefundResponse>,
|
||||
) -> Result<Self, Self::Error> {
|
||||
Ok(Self {
|
||||
response: Ok(RefundsResponseData {
|
||||
connector_refund_id: item.response.id.to_string(),
|
||||
refund_status: enums::RefundStatus::from(item.response.status),
|
||||
}),
|
||||
..item.data
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
impl TryFrom<RefundsResponseRouterData<RSync, RefundResponse>> for RefundsRouterData<RSync> {
|
||||
type Error = error_stack::Report<errors::ConnectorError>;
|
||||
fn try_from(
|
||||
item: RefundsResponseRouterData<RSync, RefundResponse>,
|
||||
) -> Result<Self, Self::Error> {
|
||||
Ok(Self {
|
||||
response: Ok(RefundsResponseData {
|
||||
connector_refund_id: item.response.id.to_string(),
|
||||
refund_status: enums::RefundStatus::from(item.response.status),
|
||||
}),
|
||||
..item.data
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
//TODO: Fill the struct with respective fields
|
||||
#[derive(Default, Debug, Serialize, Deserialize, PartialEq)]
|
||||
pub struct PayjustnowErrorResponse {
|
||||
pub status_code: u16,
|
||||
pub code: String,
|
||||
pub message: String,
|
||||
pub reason: Option<String>,
|
||||
pub network_advice_code: Option<String>,
|
||||
pub network_decline_code: Option<String>,
|
||||
pub network_error_message: Option<String>,
|
||||
}
|
||||
@ -245,6 +245,7 @@ default_imp_for_authorize_session_token!(
|
||||
connectors::Opennode,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Payone,
|
||||
@ -398,6 +399,7 @@ default_imp_for_calculate_tax!(
|
||||
connectors::Novalnet,
|
||||
connectors::Nuvei,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Payone,
|
||||
@ -555,6 +557,7 @@ default_imp_for_session_update!(
|
||||
connectors::Nuvei,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Payone,
|
||||
@ -703,6 +706,7 @@ default_imp_for_post_session_tokens!(
|
||||
connectors::Nuvei,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Payone,
|
||||
@ -848,6 +852,7 @@ default_imp_for_create_order!(
|
||||
connectors::Nuvei,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Payone,
|
||||
@ -997,6 +1002,7 @@ default_imp_for_update_metadata!(
|
||||
connectors::Nmi,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Paystack,
|
||||
@ -1145,6 +1151,7 @@ default_imp_for_cancel_post_capture!(
|
||||
connectors::Nmi,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Paystack,
|
||||
@ -1271,6 +1278,7 @@ default_imp_for_complete_authorize!(
|
||||
connectors::Opayo,
|
||||
connectors::Opennode,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payone,
|
||||
connectors::Paystack,
|
||||
@ -1406,6 +1414,7 @@ default_imp_for_incremental_authorization!(
|
||||
connectors::Nuvei,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Payone,
|
||||
@ -1562,6 +1571,7 @@ default_imp_for_extend_authorization!(
|
||||
connectors::Nmi,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Paystack,
|
||||
@ -1697,6 +1707,7 @@ default_imp_for_create_customer!(
|
||||
connectors::Nuvei,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payme,
|
||||
connectors::Payload,
|
||||
connectors::Payone,
|
||||
@ -1832,6 +1843,7 @@ default_imp_for_connector_redirect_response!(
|
||||
connectors::Opayo,
|
||||
connectors::Opennode,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Paystack,
|
||||
connectors::Paytm,
|
||||
@ -1972,6 +1984,7 @@ default_imp_for_pre_authenticate_steps!(
|
||||
connectors::Opennode,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Paysafe,
|
||||
connectors::Payme,
|
||||
@ -2121,6 +2134,7 @@ default_imp_for_authenticate_steps!(
|
||||
connectors::Opennode,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Paysafe,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
@ -2270,6 +2284,7 @@ default_imp_for_post_authenticate_steps!(
|
||||
connectors::Opennode,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Paysafe,
|
||||
connectors::Payme,
|
||||
@ -2407,6 +2422,7 @@ default_imp_for_pre_processing_steps!(
|
||||
connectors::Opennode,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Paystack,
|
||||
connectors::Paytm,
|
||||
@ -2548,6 +2564,7 @@ default_imp_for_post_processing_steps!(
|
||||
connectors::Nuvei,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Payone,
|
||||
@ -2697,6 +2714,7 @@ default_imp_for_approve!(
|
||||
connectors::Nuvei,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Paypal,
|
||||
@ -2847,6 +2865,7 @@ default_imp_for_reject!(
|
||||
connectors::Nuvei,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payone,
|
||||
connectors::Payme,
|
||||
@ -2999,6 +3018,7 @@ default_imp_for_webhook_source_verification!(
|
||||
connectors::Payone,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Paystack,
|
||||
@ -3145,6 +3165,7 @@ default_imp_for_accept_dispute!(
|
||||
connectors::Nuvei,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Payone,
|
||||
@ -3292,6 +3313,7 @@ default_imp_for_submit_evidence!(
|
||||
connectors::Nuvei,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Paypal,
|
||||
@ -3438,6 +3460,7 @@ default_imp_for_defend_dispute!(
|
||||
connectors::Nuvei,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Payone,
|
||||
@ -3588,6 +3611,7 @@ default_imp_for_fetch_disputes!(
|
||||
connectors::Nuvei,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Payone,
|
||||
@ -3737,6 +3761,7 @@ default_imp_for_dispute_sync!(
|
||||
connectors::Nuvei,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Payone,
|
||||
@ -3893,6 +3918,7 @@ default_imp_for_file_upload!(
|
||||
connectors::Nuvei,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Payone,
|
||||
@ -4032,6 +4058,7 @@ default_imp_for_payouts!(
|
||||
connectors::Noon,
|
||||
connectors::Novalnet,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Paystack,
|
||||
@ -4169,6 +4196,7 @@ default_imp_for_payouts_create!(
|
||||
connectors::Nuvei,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Payone,
|
||||
@ -4315,6 +4343,7 @@ default_imp_for_payouts_retrieve!(
|
||||
connectors::Nuvei,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Paystack,
|
||||
@ -4461,6 +4490,7 @@ default_imp_for_payouts_eligibility!(
|
||||
connectors::Nuvei,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Paypal,
|
||||
@ -4605,6 +4635,7 @@ default_imp_for_payouts_fulfill!(
|
||||
connectors::Nmi,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Paystack,
|
||||
@ -4748,6 +4779,7 @@ default_imp_for_payouts_cancel!(
|
||||
connectors::Nuvei,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Paypal,
|
||||
@ -4895,6 +4927,7 @@ default_imp_for_payouts_quote!(
|
||||
connectors::Nuvei,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payone,
|
||||
connectors::Payme,
|
||||
@ -5044,6 +5077,7 @@ default_imp_for_payouts_recipient!(
|
||||
connectors::Nuvei,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Payone,
|
||||
@ -5193,6 +5227,7 @@ default_imp_for_payouts_recipient_account!(
|
||||
connectors::Nuvei,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Payone,
|
||||
@ -5344,6 +5379,7 @@ default_imp_for_frm_sale!(
|
||||
connectors::Nuvei,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Payone,
|
||||
@ -5494,6 +5530,7 @@ default_imp_for_frm_checkout!(
|
||||
connectors::Nuvei,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Payone,
|
||||
@ -5644,6 +5681,7 @@ default_imp_for_frm_transaction!(
|
||||
connectors::Nuvei,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Payone,
|
||||
@ -5795,6 +5833,7 @@ default_imp_for_frm_fulfillment!(
|
||||
connectors::Payone,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Paypal,
|
||||
@ -5944,6 +5983,7 @@ default_imp_for_frm_record_return!(
|
||||
connectors::Nuvei,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Payone,
|
||||
@ -6088,6 +6128,7 @@ default_imp_for_revoking_mandates!(
|
||||
connectors::Nuvei,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Payone,
|
||||
@ -6235,6 +6276,7 @@ default_imp_for_uas_pre_authentication!(
|
||||
connectors::Opennode,
|
||||
connectors::Nuvei,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Payone,
|
||||
@ -6382,6 +6424,7 @@ default_imp_for_uas_post_authentication!(
|
||||
connectors::Opennode,
|
||||
connectors::Nuvei,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Payone,
|
||||
@ -6530,6 +6573,7 @@ default_imp_for_uas_authentication_confirmation!(
|
||||
connectors::Opennode,
|
||||
connectors::Nuvei,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Payone,
|
||||
@ -6669,6 +6713,7 @@ default_imp_for_connector_request_id!(
|
||||
connectors::Opayo,
|
||||
connectors::Opennode,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Paystack,
|
||||
connectors::Paytm,
|
||||
@ -6812,6 +6857,7 @@ default_imp_for_fraud_check!(
|
||||
connectors::Nuvei,
|
||||
connectors::Opayo,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Paystack,
|
||||
connectors::Paytm,
|
||||
@ -6983,6 +7029,7 @@ default_imp_for_connector_authentication!(
|
||||
connectors::Opayo,
|
||||
connectors::Opennode,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Paystack,
|
||||
connectors::Paytm,
|
||||
@ -7126,6 +7173,7 @@ default_imp_for_uas_authentication!(
|
||||
connectors::Nexixpay,
|
||||
connectors::Nuvei,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Paypal,
|
||||
connectors::Paysafe,
|
||||
@ -7270,6 +7318,7 @@ default_imp_for_revenue_recovery!(
|
||||
connectors::Opayo,
|
||||
connectors::Opennode,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Paystack,
|
||||
connectors::Paytm,
|
||||
@ -7446,6 +7495,7 @@ default_imp_for_subscriptions!(
|
||||
connectors::Opayo,
|
||||
connectors::Opennode,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Paysafe,
|
||||
connectors::Paystack,
|
||||
@ -7596,6 +7646,7 @@ default_imp_for_billing_connector_payment_sync!(
|
||||
connectors::Opayo,
|
||||
connectors::Opennode,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Paystack,
|
||||
connectors::Paytm,
|
||||
@ -7738,6 +7789,7 @@ default_imp_for_revenue_recovery_record_back!(
|
||||
connectors::Opayo,
|
||||
connectors::Opennode,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Paystack,
|
||||
connectors::Paytm,
|
||||
@ -7887,6 +7939,7 @@ default_imp_for_billing_connector_invoice_sync!(
|
||||
connectors::Opayo,
|
||||
connectors::Opennode,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Paystack,
|
||||
connectors::Paytm,
|
||||
@ -8030,6 +8083,7 @@ default_imp_for_external_vault!(
|
||||
connectors::Opayo,
|
||||
connectors::Opennode,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Paystack,
|
||||
connectors::Paytm,
|
||||
@ -8178,6 +8232,7 @@ default_imp_for_external_vault_insert!(
|
||||
connectors::Opayo,
|
||||
connectors::Opennode,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Paystack,
|
||||
connectors::Paytm,
|
||||
@ -8330,6 +8385,7 @@ default_imp_for_gift_card_balance_check!(
|
||||
connectors::Opennode,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Payone,
|
||||
@ -8474,6 +8530,7 @@ default_imp_for_external_vault_retrieve!(
|
||||
connectors::Opayo,
|
||||
connectors::Opennode,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Paystack,
|
||||
connectors::Paytm,
|
||||
@ -8622,6 +8679,7 @@ default_imp_for_external_vault_delete!(
|
||||
connectors::Opayo,
|
||||
connectors::Opennode,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Paystack,
|
||||
connectors::Paytm,
|
||||
@ -8771,6 +8829,7 @@ default_imp_for_external_vault_create!(
|
||||
connectors::Opayo,
|
||||
connectors::Opennode,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Paystack,
|
||||
connectors::Paytm,
|
||||
@ -8921,6 +8980,7 @@ default_imp_for_connector_authentication_token!(
|
||||
connectors::Opayo,
|
||||
connectors::Opennode,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Paystack,
|
||||
connectors::Paytm,
|
||||
@ -9074,6 +9134,7 @@ default_imp_for_external_vault_proxy_payments_create!(
|
||||
connectors::Nuvei,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Payone,
|
||||
|
||||
@ -381,6 +381,7 @@ default_imp_for_new_connector_integration_payment!(
|
||||
connectors::Nuvei,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Paypal,
|
||||
@ -531,6 +532,7 @@ default_imp_for_new_connector_integration_refund!(
|
||||
connectors::Nuvei,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Paypal,
|
||||
@ -673,6 +675,7 @@ default_imp_for_new_connector_integration_connector_authentication_token!(
|
||||
connectors::Nuvei,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Paypal,
|
||||
@ -814,6 +817,7 @@ default_imp_for_new_connector_integration_connector_access_token!(
|
||||
connectors::Nuvei,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Paypal,
|
||||
@ -964,6 +968,7 @@ default_imp_for_new_connector_integration_accept_dispute!(
|
||||
connectors::Nuvei,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Paypal,
|
||||
@ -1118,6 +1123,7 @@ default_imp_for_new_connector_integration_fetch_disputes!(
|
||||
connectors::Opennode,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Payone,
|
||||
@ -1269,6 +1275,7 @@ default_imp_for_new_connector_integration_dispute_sync!(
|
||||
connectors::Opennode,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Payone,
|
||||
@ -1416,6 +1423,7 @@ default_imp_for_new_connector_integration_defend_dispute!(
|
||||
connectors::Nuvei,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Paypal,
|
||||
@ -1565,6 +1573,7 @@ default_imp_for_new_connector_integration_submit_evidence!(
|
||||
connectors::Nuvei,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Paypal,
|
||||
@ -1725,6 +1734,7 @@ default_imp_for_new_connector_integration_file_upload!(
|
||||
connectors::Payone,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Paypal,
|
||||
@ -1877,6 +1887,7 @@ default_imp_for_new_connector_integration_payouts_create!(
|
||||
connectors::Payone,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Paypal,
|
||||
@ -2029,6 +2040,7 @@ default_imp_for_new_connector_integration_payouts_eligibility!(
|
||||
connectors::Nuvei,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Paypal,
|
||||
@ -2181,6 +2193,7 @@ default_imp_for_new_connector_integration_payouts_fulfill!(
|
||||
connectors::Nuvei,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Paypal,
|
||||
@ -2333,6 +2346,7 @@ default_imp_for_new_connector_integration_payouts_cancel!(
|
||||
connectors::Nuvei,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Paypal,
|
||||
@ -2485,6 +2499,7 @@ default_imp_for_new_connector_integration_payouts_quote!(
|
||||
connectors::Nuvei,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Paypal,
|
||||
@ -2637,6 +2652,7 @@ default_imp_for_new_connector_integration_payouts_recipient!(
|
||||
connectors::Nuvei,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Paypal,
|
||||
@ -2789,6 +2805,7 @@ default_imp_for_new_connector_integration_payouts_sync!(
|
||||
connectors::Nuvei,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Paypal,
|
||||
@ -2941,6 +2958,7 @@ default_imp_for_new_connector_integration_payouts_recipient_account!(
|
||||
connectors::Nuvei,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Paypal,
|
||||
@ -3091,6 +3109,7 @@ default_imp_for_new_connector_integration_webhook_source_verification!(
|
||||
connectors::Nuvei,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Paypal,
|
||||
@ -3243,6 +3262,7 @@ default_imp_for_new_connector_integration_frm_sale!(
|
||||
connectors::Nuvei,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Paypal,
|
||||
@ -3395,6 +3415,7 @@ default_imp_for_new_connector_integration_frm_checkout!(
|
||||
connectors::Nuvei,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Paypal,
|
||||
@ -3547,6 +3568,7 @@ default_imp_for_new_connector_integration_frm_transaction!(
|
||||
connectors::Nuvei,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Paypal,
|
||||
@ -3699,6 +3721,7 @@ default_imp_for_new_connector_integration_frm_fulfillment!(
|
||||
connectors::Nuvei,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Paypal,
|
||||
@ -3851,6 +3874,7 @@ default_imp_for_new_connector_integration_frm_record_return!(
|
||||
connectors::Nuvei,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Paypal,
|
||||
@ -4001,6 +4025,7 @@ default_imp_for_new_connector_integration_revoking_mandates!(
|
||||
connectors::Nuvei,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Paystack,
|
||||
@ -4126,6 +4151,7 @@ default_imp_for_new_connector_integration_frm!(
|
||||
connectors::Novalnet,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payone,
|
||||
connectors::Paysafe,
|
||||
@ -4274,6 +4300,7 @@ default_imp_for_new_connector_integration_connector_authentication!(
|
||||
connectors::Novalnet,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Paysafe,
|
||||
connectors::Payu,
|
||||
@ -4413,6 +4440,7 @@ default_imp_for_new_connector_integration_revenue_recovery!(
|
||||
connectors::Novalnet,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payone,
|
||||
connectors::Paysafe,
|
||||
@ -4578,6 +4606,7 @@ default_imp_for_new_connector_integration_external_vault!(
|
||||
connectors::Payone,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Paypal,
|
||||
@ -4731,6 +4760,7 @@ default_imp_for_new_connector_integration_external_vault_proxy!(
|
||||
connectors::Nuvei,
|
||||
connectors::Paybox,
|
||||
connectors::Payeezy,
|
||||
connectors::Payjustnow,
|
||||
connectors::Payload,
|
||||
connectors::Payme,
|
||||
connectors::Payone,
|
||||
|
||||
@ -98,6 +98,7 @@ pub struct Connectors {
|
||||
pub opennode: ConnectorParams,
|
||||
pub paybox: ConnectorParamsWithSecondaryBaseUrl,
|
||||
pub payeezy: ConnectorParams,
|
||||
pub payjustnow: ConnectorParams,
|
||||
pub payload: ConnectorParams,
|
||||
pub payme: ConnectorParams,
|
||||
pub payone: ConnectorParams,
|
||||
|
||||
@ -32,16 +32,16 @@ pub use hyperswitch_connectors::connectors::{
|
||||
nexinets::Nexinets, nexixpay, nexixpay::Nexixpay, nmi, nmi::Nmi, nomupay, nomupay::Nomupay,
|
||||
noon, noon::Noon, nordea, nordea::Nordea, novalnet, novalnet::Novalnet, nuvei, nuvei::Nuvei,
|
||||
opayo, opayo::Opayo, opennode, opennode::Opennode, paybox, paybox::Paybox, payeezy,
|
||||
payeezy::Payeezy, payload, payload::Payload, payme, payme::Payme, payone, payone::Payone,
|
||||
paypal, paypal::Paypal, paysafe, paysafe::Paysafe, paystack, paystack::Paystack, paytm,
|
||||
paytm::Paytm, payu, payu::Payu, peachpayments, peachpayments::Peachpayments, phonepe,
|
||||
phonepe::Phonepe, placetopay, placetopay::Placetopay, plaid, plaid::Plaid, powertranz,
|
||||
powertranz::Powertranz, prophetpay, prophetpay::Prophetpay, rapyd, rapyd::Rapyd, razorpay,
|
||||
razorpay::Razorpay, recurly, recurly::Recurly, redsys, redsys::Redsys, riskified,
|
||||
riskified::Riskified, santander, santander::Santander, shift4, shift4::Shift4, sift,
|
||||
sift::Sift, signifyd, signifyd::Signifyd, silverflow, silverflow::Silverflow, square,
|
||||
square::Square, stax, stax::Stax, stripe, stripe::Stripe, stripebilling,
|
||||
stripebilling::Stripebilling, taxjar, taxjar::Taxjar, tesouro, tesouro::Tesouro,
|
||||
payeezy::Payeezy, payjustnow, payjustnow::Payjustnow, payload, payload::Payload, payme,
|
||||
payme::Payme, payone, payone::Payone, paypal, paypal::Paypal, paysafe, paysafe::Paysafe,
|
||||
paystack, paystack::Paystack, paytm, paytm::Paytm, payu, payu::Payu, peachpayments,
|
||||
peachpayments::Peachpayments, phonepe, phonepe::Phonepe, placetopay, placetopay::Placetopay,
|
||||
plaid, plaid::Plaid, powertranz, powertranz::Powertranz, prophetpay, prophetpay::Prophetpay,
|
||||
rapyd, rapyd::Rapyd, razorpay, razorpay::Razorpay, recurly, recurly::Recurly, redsys,
|
||||
redsys::Redsys, riskified, riskified::Riskified, santander, santander::Santander, shift4,
|
||||
shift4::Shift4, sift, sift::Sift, signifyd, signifyd::Signifyd, silverflow,
|
||||
silverflow::Silverflow, square, square::Square, stax, stax::Stax, stripe, stripe::Stripe,
|
||||
stripebilling, stripebilling::Stripebilling, taxjar, taxjar::Taxjar, tesouro, tesouro::Tesouro,
|
||||
threedsecureio, threedsecureio::Threedsecureio, thunes, thunes::Thunes, tokenex,
|
||||
tokenex::Tokenex, tokenio, tokenio::Tokenio, trustpay, trustpay::Trustpay, trustpayments,
|
||||
trustpayments::Trustpayments, tsys, tsys::Tsys, unified_authentication_service,
|
||||
|
||||
@ -86,6 +86,7 @@ mod opennode;
|
||||
mod paybox;
|
||||
#[cfg(feature = "dummy_connector")]
|
||||
mod payeezy;
|
||||
mod payjustnow;
|
||||
mod payload;
|
||||
mod payme;
|
||||
mod payone;
|
||||
|
||||
421
crates/router/tests/connectors/payjustnow.rs
Normal file
421
crates/router/tests/connectors/payjustnow.rs
Normal file
@ -0,0 +1,421 @@
|
||||
use hyperswitch_domain_models::payment_method_data::{Card, PaymentMethodData};
|
||||
use masking::Secret;
|
||||
use router::types::{self, api, storage::enums};
|
||||
use test_utils::connector_auth;
|
||||
|
||||
use crate::utils::{self, ConnectorActions};
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
struct PayjustnowTest;
|
||||
impl ConnectorActions for PayjustnowTest {}
|
||||
impl utils::Connector for PayjustnowTest {
|
||||
fn get_data(&self) -> api::ConnectorData {
|
||||
use router::connector::Payjustnow;
|
||||
utils::construct_connector_data_old(
|
||||
Box::new(Payjustnow::new()),
|
||||
types::Connector::Plaid,
|
||||
api::GetToken::Connector,
|
||||
None,
|
||||
)
|
||||
}
|
||||
|
||||
fn get_auth_token(&self) -> types::ConnectorAuthType {
|
||||
utils::to_connector_auth_type(
|
||||
connector_auth::ConnectorAuthentication::new()
|
||||
.payjustnow
|
||||
.expect("Missing connector authentication configuration")
|
||||
.into(),
|
||||
)
|
||||
}
|
||||
|
||||
fn get_name(&self) -> String {
|
||||
"payjustnow".to_string()
|
||||
}
|
||||
}
|
||||
|
||||
static CONNECTOR: PayjustnowTest = PayjustnowTest {};
|
||||
|
||||
fn get_default_payment_info() -> Option<utils::PaymentInfo> {
|
||||
None
|
||||
}
|
||||
|
||||
fn payment_method_details() -> Option<types::PaymentsAuthorizeData> {
|
||||
None
|
||||
}
|
||||
|
||||
// Cards Positive Tests
|
||||
// Creates a payment using the manual capture flow (Non 3DS).
|
||||
#[actix_web::test]
|
||||
async fn should_only_authorize_payment() {
|
||||
let response = CONNECTOR
|
||||
.authorize_payment(payment_method_details(), get_default_payment_info())
|
||||
.await
|
||||
.expect("Authorize payment response");
|
||||
assert_eq!(response.status, enums::AttemptStatus::Authorized);
|
||||
}
|
||||
|
||||
// Captures a payment using the manual capture flow (Non 3DS).
|
||||
#[actix_web::test]
|
||||
async fn should_capture_authorized_payment() {
|
||||
let response = CONNECTOR
|
||||
.authorize_and_capture_payment(payment_method_details(), None, get_default_payment_info())
|
||||
.await
|
||||
.expect("Capture payment response");
|
||||
assert_eq!(response.status, enums::AttemptStatus::Charged);
|
||||
}
|
||||
|
||||
// Partially captures a payment using the manual capture flow (Non 3DS).
|
||||
#[actix_web::test]
|
||||
async fn should_partially_capture_authorized_payment() {
|
||||
let response = CONNECTOR
|
||||
.authorize_and_capture_payment(
|
||||
payment_method_details(),
|
||||
Some(types::PaymentsCaptureData {
|
||||
amount_to_capture: 50,
|
||||
..utils::PaymentCaptureType::default().0
|
||||
}),
|
||||
get_default_payment_info(),
|
||||
)
|
||||
.await
|
||||
.expect("Capture payment response");
|
||||
assert_eq!(response.status, enums::AttemptStatus::Charged);
|
||||
}
|
||||
|
||||
// Synchronizes a payment using the manual capture flow (Non 3DS).
|
||||
#[actix_web::test]
|
||||
async fn should_sync_authorized_payment() {
|
||||
let authorize_response = CONNECTOR
|
||||
.authorize_payment(payment_method_details(), get_default_payment_info())
|
||||
.await
|
||||
.expect("Authorize payment response");
|
||||
let txn_id = utils::get_connector_transaction_id(authorize_response.response);
|
||||
let response = CONNECTOR
|
||||
.psync_retry_till_status_matches(
|
||||
enums::AttemptStatus::Authorized,
|
||||
Some(types::PaymentsSyncData {
|
||||
connector_transaction_id: types::ResponseId::ConnectorTransactionId(
|
||||
txn_id.unwrap(),
|
||||
),
|
||||
..Default::default()
|
||||
}),
|
||||
get_default_payment_info(),
|
||||
)
|
||||
.await
|
||||
.expect("PSync response");
|
||||
assert_eq!(response.status, enums::AttemptStatus::Authorized,);
|
||||
}
|
||||
|
||||
// Voids a payment using the manual capture flow (Non 3DS).
|
||||
#[actix_web::test]
|
||||
async fn should_void_authorized_payment() {
|
||||
let response = CONNECTOR
|
||||
.authorize_and_void_payment(
|
||||
payment_method_details(),
|
||||
Some(types::PaymentsCancelData {
|
||||
connector_transaction_id: String::from(""),
|
||||
cancellation_reason: Some("requested_by_customer".to_string()),
|
||||
..Default::default()
|
||||
}),
|
||||
get_default_payment_info(),
|
||||
)
|
||||
.await
|
||||
.expect("Void payment response");
|
||||
assert_eq!(response.status, enums::AttemptStatus::Voided);
|
||||
}
|
||||
|
||||
// Refunds a payment using the manual capture flow (Non 3DS).
|
||||
#[actix_web::test]
|
||||
async fn should_refund_manually_captured_payment() {
|
||||
let response = CONNECTOR
|
||||
.capture_payment_and_refund(
|
||||
payment_method_details(),
|
||||
None,
|
||||
None,
|
||||
get_default_payment_info(),
|
||||
)
|
||||
.await
|
||||
.unwrap();
|
||||
assert_eq!(
|
||||
response.response.unwrap().refund_status,
|
||||
enums::RefundStatus::Success,
|
||||
);
|
||||
}
|
||||
|
||||
// Partially refunds a payment using the manual capture flow (Non 3DS).
|
||||
#[actix_web::test]
|
||||
async fn should_partially_refund_manually_captured_payment() {
|
||||
let response = CONNECTOR
|
||||
.capture_payment_and_refund(
|
||||
payment_method_details(),
|
||||
None,
|
||||
Some(types::RefundsData {
|
||||
refund_amount: 50,
|
||||
..utils::PaymentRefundType::default().0
|
||||
}),
|
||||
get_default_payment_info(),
|
||||
)
|
||||
.await
|
||||
.unwrap();
|
||||
assert_eq!(
|
||||
response.response.unwrap().refund_status,
|
||||
enums::RefundStatus::Success,
|
||||
);
|
||||
}
|
||||
|
||||
// Synchronizes a refund using the manual capture flow (Non 3DS).
|
||||
#[actix_web::test]
|
||||
async fn should_sync_manually_captured_refund() {
|
||||
let refund_response = CONNECTOR
|
||||
.capture_payment_and_refund(
|
||||
payment_method_details(),
|
||||
None,
|
||||
None,
|
||||
get_default_payment_info(),
|
||||
)
|
||||
.await
|
||||
.unwrap();
|
||||
let response = CONNECTOR
|
||||
.rsync_retry_till_status_matches(
|
||||
enums::RefundStatus::Success,
|
||||
refund_response.response.unwrap().connector_refund_id,
|
||||
None,
|
||||
get_default_payment_info(),
|
||||
)
|
||||
.await
|
||||
.unwrap();
|
||||
assert_eq!(
|
||||
response.response.unwrap().refund_status,
|
||||
enums::RefundStatus::Success,
|
||||
);
|
||||
}
|
||||
|
||||
// Creates a payment using the automatic capture flow (Non 3DS).
|
||||
#[actix_web::test]
|
||||
async fn should_make_payment() {
|
||||
let authorize_response = CONNECTOR
|
||||
.make_payment(payment_method_details(), get_default_payment_info())
|
||||
.await
|
||||
.unwrap();
|
||||
assert_eq!(authorize_response.status, enums::AttemptStatus::Charged);
|
||||
}
|
||||
|
||||
// Synchronizes a payment using the automatic capture flow (Non 3DS).
|
||||
#[actix_web::test]
|
||||
async fn should_sync_auto_captured_payment() {
|
||||
let authorize_response = CONNECTOR
|
||||
.make_payment(payment_method_details(), get_default_payment_info())
|
||||
.await
|
||||
.unwrap();
|
||||
assert_eq!(authorize_response.status, enums::AttemptStatus::Charged);
|
||||
let txn_id = utils::get_connector_transaction_id(authorize_response.response);
|
||||
assert_ne!(txn_id, None, "Empty connector transaction id");
|
||||
let response = CONNECTOR
|
||||
.psync_retry_till_status_matches(
|
||||
enums::AttemptStatus::Charged,
|
||||
Some(types::PaymentsSyncData {
|
||||
connector_transaction_id: types::ResponseId::ConnectorTransactionId(
|
||||
txn_id.unwrap(),
|
||||
),
|
||||
capture_method: Some(enums::CaptureMethod::Automatic),
|
||||
..Default::default()
|
||||
}),
|
||||
get_default_payment_info(),
|
||||
)
|
||||
.await
|
||||
.unwrap();
|
||||
assert_eq!(response.status, enums::AttemptStatus::Charged,);
|
||||
}
|
||||
|
||||
// Refunds a payment using the automatic capture flow (Non 3DS).
|
||||
#[actix_web::test]
|
||||
async fn should_refund_auto_captured_payment() {
|
||||
let response = CONNECTOR
|
||||
.make_payment_and_refund(payment_method_details(), None, get_default_payment_info())
|
||||
.await
|
||||
.unwrap();
|
||||
assert_eq!(
|
||||
response.response.unwrap().refund_status,
|
||||
enums::RefundStatus::Success,
|
||||
);
|
||||
}
|
||||
|
||||
// Partially refunds a payment using the automatic capture flow (Non 3DS).
|
||||
#[actix_web::test]
|
||||
async fn should_partially_refund_succeeded_payment() {
|
||||
let refund_response = CONNECTOR
|
||||
.make_payment_and_refund(
|
||||
payment_method_details(),
|
||||
Some(types::RefundsData {
|
||||
refund_amount: 50,
|
||||
..utils::PaymentRefundType::default().0
|
||||
}),
|
||||
get_default_payment_info(),
|
||||
)
|
||||
.await
|
||||
.unwrap();
|
||||
assert_eq!(
|
||||
refund_response.response.unwrap().refund_status,
|
||||
enums::RefundStatus::Success,
|
||||
);
|
||||
}
|
||||
|
||||
// Creates multiple refunds against a payment using the automatic capture flow (Non 3DS).
|
||||
#[actix_web::test]
|
||||
async fn should_refund_succeeded_payment_multiple_times() {
|
||||
CONNECTOR
|
||||
.make_payment_and_multiple_refund(
|
||||
payment_method_details(),
|
||||
Some(types::RefundsData {
|
||||
refund_amount: 50,
|
||||
..utils::PaymentRefundType::default().0
|
||||
}),
|
||||
get_default_payment_info(),
|
||||
)
|
||||
.await;
|
||||
}
|
||||
|
||||
// Synchronizes a refund using the automatic capture flow (Non 3DS).
|
||||
#[actix_web::test]
|
||||
async fn should_sync_refund() {
|
||||
let refund_response = CONNECTOR
|
||||
.make_payment_and_refund(payment_method_details(), None, get_default_payment_info())
|
||||
.await
|
||||
.unwrap();
|
||||
let response = CONNECTOR
|
||||
.rsync_retry_till_status_matches(
|
||||
enums::RefundStatus::Success,
|
||||
refund_response.response.unwrap().connector_refund_id,
|
||||
None,
|
||||
get_default_payment_info(),
|
||||
)
|
||||
.await
|
||||
.unwrap();
|
||||
assert_eq!(
|
||||
response.response.unwrap().refund_status,
|
||||
enums::RefundStatus::Success,
|
||||
);
|
||||
}
|
||||
|
||||
// Cards Negative scenarios
|
||||
// Creates a payment with incorrect CVC.
|
||||
#[actix_web::test]
|
||||
async fn should_fail_payment_for_incorrect_cvc() {
|
||||
let response = CONNECTOR
|
||||
.make_payment(
|
||||
Some(types::PaymentsAuthorizeData {
|
||||
payment_method_data: PaymentMethodData::Card(Card {
|
||||
card_cvc: Secret::new("12345".to_string()),
|
||||
..utils::CCardType::default().0
|
||||
}),
|
||||
..utils::PaymentAuthorizeType::default().0
|
||||
}),
|
||||
get_default_payment_info(),
|
||||
)
|
||||
.await
|
||||
.unwrap();
|
||||
assert_eq!(
|
||||
response.response.unwrap_err().message,
|
||||
"Your card's security code is invalid.".to_string(),
|
||||
);
|
||||
}
|
||||
|
||||
// Creates a payment with incorrect expiry month.
|
||||
#[actix_web::test]
|
||||
async fn should_fail_payment_for_invalid_exp_month() {
|
||||
let response = CONNECTOR
|
||||
.make_payment(
|
||||
Some(types::PaymentsAuthorizeData {
|
||||
payment_method_data: PaymentMethodData::Card(Card {
|
||||
card_exp_month: Secret::new("20".to_string()),
|
||||
..utils::CCardType::default().0
|
||||
}),
|
||||
..utils::PaymentAuthorizeType::default().0
|
||||
}),
|
||||
get_default_payment_info(),
|
||||
)
|
||||
.await
|
||||
.unwrap();
|
||||
assert_eq!(
|
||||
response.response.unwrap_err().message,
|
||||
"Your card's expiration month is invalid.".to_string(),
|
||||
);
|
||||
}
|
||||
|
||||
// Creates a payment with incorrect expiry year.
|
||||
#[actix_web::test]
|
||||
async fn should_fail_payment_for_incorrect_expiry_year() {
|
||||
let response = CONNECTOR
|
||||
.make_payment(
|
||||
Some(types::PaymentsAuthorizeData {
|
||||
payment_method_data: PaymentMethodData::Card(Card {
|
||||
card_exp_year: Secret::new("2000".to_string()),
|
||||
..utils::CCardType::default().0
|
||||
}),
|
||||
..utils::PaymentAuthorizeType::default().0
|
||||
}),
|
||||
get_default_payment_info(),
|
||||
)
|
||||
.await
|
||||
.unwrap();
|
||||
assert_eq!(
|
||||
response.response.unwrap_err().message,
|
||||
"Your card's expiration year is invalid.".to_string(),
|
||||
);
|
||||
}
|
||||
|
||||
// Voids a payment using automatic capture flow (Non 3DS).
|
||||
#[actix_web::test]
|
||||
async fn should_fail_void_payment_for_auto_capture() {
|
||||
let authorize_response = CONNECTOR
|
||||
.make_payment(payment_method_details(), get_default_payment_info())
|
||||
.await
|
||||
.unwrap();
|
||||
assert_eq!(authorize_response.status, enums::AttemptStatus::Charged);
|
||||
let txn_id = utils::get_connector_transaction_id(authorize_response.response);
|
||||
assert_ne!(txn_id, None, "Empty connector transaction id");
|
||||
let void_response = CONNECTOR
|
||||
.void_payment(txn_id.unwrap(), None, get_default_payment_info())
|
||||
.await
|
||||
.unwrap();
|
||||
assert_eq!(
|
||||
void_response.response.unwrap_err().message,
|
||||
"You cannot cancel this PaymentIntent because it has a status of succeeded."
|
||||
);
|
||||
}
|
||||
|
||||
// Captures a payment using invalid connector payment id.
|
||||
#[actix_web::test]
|
||||
async fn should_fail_capture_for_invalid_payment() {
|
||||
let capture_response = CONNECTOR
|
||||
.capture_payment("123456789".to_string(), None, get_default_payment_info())
|
||||
.await
|
||||
.unwrap();
|
||||
assert_eq!(
|
||||
capture_response.response.unwrap_err().message,
|
||||
String::from("No such payment_intent: '123456789'")
|
||||
);
|
||||
}
|
||||
|
||||
// Refunds a payment with refund amount higher than payment amount.
|
||||
#[actix_web::test]
|
||||
async fn should_fail_for_refund_amount_higher_than_payment_amount() {
|
||||
let response = CONNECTOR
|
||||
.make_payment_and_refund(
|
||||
payment_method_details(),
|
||||
Some(types::RefundsData {
|
||||
refund_amount: 150,
|
||||
..utils::PaymentRefundType::default().0
|
||||
}),
|
||||
get_default_payment_info(),
|
||||
)
|
||||
.await
|
||||
.unwrap();
|
||||
assert_eq!(
|
||||
response.response.unwrap_err().message,
|
||||
"Refund amount (₹1.50) is greater than charge amount (₹1.00)",
|
||||
);
|
||||
}
|
||||
|
||||
// Connector dependent test cases goes here
|
||||
|
||||
// [#478]: add unit tests for non 3DS, wallets & webhooks in connector tests
|
||||
@ -94,6 +94,7 @@ pub struct ConnectorAuthentication {
|
||||
pub opennode: Option<HeaderKey>,
|
||||
pub paybox: Option<HeaderKey>,
|
||||
pub payeezy: Option<SignatureKey>,
|
||||
pub payjustnow: Option<HeaderKey>,
|
||||
pub payload: Option<CurrencyAuthKey>,
|
||||
pub payme: Option<BodyKey>,
|
||||
pub payone: Option<HeaderKey>,
|
||||
|
||||
@ -168,6 +168,7 @@ opennode.base_url = "https://dev-api.opennode.com"
|
||||
paybox.base_url = "https://preprod-ppps.paybox.com/PPPS.php"
|
||||
paybox.secondary_base_url = "https://preprod-tpeweb.paybox.com/"
|
||||
payeezy.base_url = "https://api-cert.payeezy.com/"
|
||||
payjustnow.base_url = "https://sandbox-checkout.payjustnow.io/v2"
|
||||
payload.base_url = "https://api.payload.com"
|
||||
payme.base_url = "https://sandbox.payme.io/"
|
||||
payone.base_url = "https://payment.preprod.payone.com/"
|
||||
|
||||
@ -6,7 +6,7 @@ function find_prev_connector() {
|
||||
git checkout $self
|
||||
cp $self $self.tmp
|
||||
# Add new connector to existing list and sort it
|
||||
connectors=(aci adyen adyenplatform affirm airwallex amazonpay applepay archipel authipay authorizedotnet bambora bamboraapac bankofamerica barclaycard billwerk bitpay blackhawknetwork bluecode bluesnap boku braintree breadpay cashtocode celero chargebee checkbook checkout coinbase cryptopay ctp_visa custombilling cybersource datatrans deutschebank digitalvirgo dlocal dummyconnector dwolla ebanx elavon facilitapay finix fiserv fiservemea fiuu flexiti forte getnet gigadat globalpay globepay gocardless gpayments helcim hipay hyperswitch_vault hyperwallet hyperwallet iatapay inespay itaubank jpmorgan juspaythreedsserver katapult klarna loonio mifinity mollie moneris mpgs multisafepay netcetera nexinets nexixpay nomupay noon nordea novalnet nuvei opayo opennode paybox payeezy payload payme payone paypal paysafe paystack paytm payu peachpayments phonepe placetopay plaid powertranz prophetpay rapyd razorpay recurly redsys santander shift4 sift silverflow square stax stripe stripebilling taxjar tesouro threedsecureio thunes tokenex tokenio trustpay trustpayments tsys unified_authentication_service vgs volt wellsfargo wellsfargopayout wise worldline worldpay worldpayvantiv worldpayxml xendit zsl "$1")
|
||||
connectors=(aci adyen adyenplatform affirm airwallex amazonpay applepay archipel authipay authorizedotnet bambora bamboraapac bankofamerica barclaycard billwerk bitpay blackhawknetwork bluecode bluesnap boku braintree breadpay cashtocode celero chargebee checkbook checkout coinbase cryptopay ctp_visa custombilling cybersource datatrans deutschebank digitalvirgo dlocal dummyconnector dwolla ebanx elavon facilitapay finix fiserv fiservemea fiuu flexiti forte getnet gigadat globalpay globepay gocardless gpayments helcim hipay hyperswitch_vault hyperwallet hyperwallet iatapay inespay itaubank jpmorgan juspaythreedsserver katapult klarna loonio mifinity mollie moneris mpgs multisafepay netcetera nexinets nexixpay nomupay noon nordea novalnet nuvei opayo opennode paybox payeezy payjustnow payload payme payone paypal paysafe paystack paytm payu peachpayments phonepe placetopay plaid powertranz prophetpay rapyd razorpay recurly redsys santander shift4 sift silverflow square stax stripe stripebilling taxjar tesouro threedsecureio thunes tokenex tokenio trustpay trustpayments tsys unified_authentication_service vgs volt wellsfargo wellsfargopayout wise worldline worldpay worldpayvantiv worldpayxml xendit zsl "$1")
|
||||
|
||||
|
||||
IFS=$'\n' sorted=($(sort <<<"${connectors[*]}")); unset IFS
|
||||
|
||||
Reference in New Issue
Block a user