From 51e1fac556fdd8775e0bbc858b0b3cc50a7e88ec Mon Sep 17 00:00:00 2001 From: Nishant Joshi Date: Wed, 3 Jan 2024 17:42:05 +0530 Subject: [PATCH 01/19] chore: fix channel handling for consumer workflow loop (#3223) Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com> --- crates/scheduler/src/consumer.rs | 25 +++++++++++++++---------- crates/scheduler/src/utils.rs | 4 ++-- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/crates/scheduler/src/consumer.rs b/crates/scheduler/src/consumer.rs index 08899552704a..ef0386bec299 100644 --- a/crates/scheduler/src/consumer.rs +++ b/crates/scheduler/src/consumer.rs @@ -61,7 +61,7 @@ pub async fn start_consumer( let handle = signal.handle(); let task_handle = tokio::spawn(common_utils::signals::signal_handler(signal, tx)); - loop { + 'consumer: loop { match rx.try_recv() { Err(mpsc::error::TryRecvError::Empty) => { interval.tick().await; @@ -71,7 +71,7 @@ pub async fn start_consumer( continue; } - tokio::task::spawn(pt_utils::consumer_operation_handler( + pt_utils::consumer_operation_handler( state.clone(), settings.clone(), |err| { @@ -79,19 +79,23 @@ pub async fn start_consumer( }, sync::Arc::clone(&consumer_operation_counter), workflow_selector, - )); + ) + .await; } Ok(()) | Err(mpsc::error::TryRecvError::Disconnected) => { logger::debug!("Awaiting shutdown!"); rx.close(); - shutdown_interval.tick().await; - let active_tasks = consumer_operation_counter.load(atomic::Ordering::Acquire); - match active_tasks { - 0 => { - logger::info!("Terminating consumer"); - break; + loop { + shutdown_interval.tick().await; + let active_tasks = consumer_operation_counter.load(atomic::Ordering::Acquire); + logger::error!("{}", active_tasks); + match active_tasks { + 0 => { + logger::info!("Terminating consumer"); + break 'consumer; + } + _ => continue, } - _ => continue, } } } @@ -204,6 +208,7 @@ where T: SchedulerAppState, { tracing::Span::current().record("workflow_id", Uuid::new_v4().to_string()); + logger::info!("{:?}", process.name.as_ref()); let res = workflow_selector .trigger_workflow(&state.clone(), process.clone()) .await; diff --git a/crates/scheduler/src/utils.rs b/crates/scheduler/src/utils.rs index 53f14bd1fb9c..32fd97fca334 100644 --- a/crates/scheduler/src/utils.rs +++ b/crates/scheduler/src/utils.rs @@ -252,7 +252,7 @@ pub async fn consumer_operation_handler( E: FnOnce(error_stack::Report), T: SchedulerAppState, { - consumer_operation_counter.fetch_add(1, atomic::Ordering::Release); + consumer_operation_counter.fetch_add(1, atomic::Ordering::SeqCst); let start_time = std_time::Instant::now(); match consumer::consumer_operations(&state, &settings, workflow_selector).await { @@ -263,7 +263,7 @@ pub async fn consumer_operation_handler( let duration = end_time.saturating_duration_since(start_time).as_secs_f64(); logger::debug!("Time taken to execute consumer_operation: {}s", duration); - let current_count = consumer_operation_counter.fetch_sub(1, atomic::Ordering::Release); + let current_count = consumer_operation_counter.fetch_sub(1, atomic::Ordering::SeqCst); logger::info!("Current tasks being executed: {}", current_count); } From 6a1743ebe993d5abb53f2ce1b8b383aa4a9553fb Mon Sep 17 00:00:00 2001 From: Amisha Prabhat <55580080+Aprabhat19@users.noreply.github.com> Date: Wed, 3 Jan 2024 18:58:10 +0530 Subject: [PATCH 02/19] fix(core): fix recurring mandates flow for cyber source (#3224) Co-authored-by: Samraat Bansal --- config/development.toml | 4 +- .../src/connector/cybersource/transformers.rs | 326 ++++++++++++------ crates/router/src/core/payments.rs | 24 +- 3 files changed, 219 insertions(+), 135 deletions(-) diff --git a/config/development.toml b/config/development.toml index d365abc46744..6e7e040906a5 100644 --- a/config/development.toml +++ b/config/development.toml @@ -468,8 +468,8 @@ connectors_with_webhook_source_verification_call = "paypal" [mandates.supported_payment_methods] pay_later.klarna = { connector_list = "adyen" } -wallet.google_pay = { connector_list = "stripe,adyen" } -wallet.apple_pay = { connector_list = "stripe,adyen" } +wallet.google_pay = { connector_list = "stripe,adyen,cybersource" } +wallet.apple_pay = { connector_list = "stripe,adyen,cybersource,noon" } wallet.paypal = { connector_list = "adyen" } card.credit = { connector_list = "stripe,adyen,authorizedotnet,cybersource,globalpay,worldpay,multisafepay,nmi,nexinets,noon" } card.debit = { connector_list = "stripe,adyen,authorizedotnet,cybersource,globalpay,worldpay,multisafepay,nmi,nexinets,noon" } diff --git a/crates/router/src/connector/cybersource/transformers.rs b/crates/router/src/connector/cybersource/transformers.rs index 147e50a9e918..a5a0a7237ef5 100644 --- a/crates/router/src/connector/cybersource/transformers.rs +++ b/crates/router/src/connector/cybersource/transformers.rs @@ -78,7 +78,7 @@ impl TryFrom<&types::SetupMandateRouterData> for CybersourceZeroMandateRequest { }; let (action_list, action_token_types, authorization_options) = ( Some(vec![CybersourceActionsList::TokenCreate]), - Some(vec![CybersourceActionsTokenType::InstrumentIdentifier]), + Some(vec![CybersourceActionsTokenType::PaymentInstrument]), Some(CybersourceAuthorizationOptions { initiator: CybersourcePaymentInitiator { initiator_type: Some(CybersourcePaymentInitiatorTypes::Customer), @@ -89,38 +89,122 @@ impl TryFrom<&types::SetupMandateRouterData> for CybersourceZeroMandateRequest { }), ); - let processing_information = ProcessingInformation { - capture: Some(false), - capture_options: None, - action_list, - action_token_types, - authorization_options, - commerce_indicator: CybersourceCommerceIndicator::Internet, - payment_solution: None, - }; - let client_reference_information = ClientReferenceInformation { code: Some(item.connector_request_reference_id.clone()), }; - let payment_information = match item.request.payment_method_data.clone() { + let (payment_information, solution) = match item.request.payment_method_data.clone() { api::PaymentMethodData::Card(ccard) => { - let card = CardDetails::PaymentCard(Card { - number: ccard.card_number, - expiration_month: ccard.card_exp_month, - expiration_year: ccard.card_exp_year, - security_code: ccard.card_cvc, - card_type: None, - }); - PaymentInformation::Cards(CardPaymentInformation { - card, - instrument_identifier: None, - }) + let card_issuer = ccard.get_card_issuer(); + let card_type = match card_issuer { + Ok(issuer) => Some(String::from(issuer)), + Err(_) => None, + }; + ( + PaymentInformation::Cards(CardPaymentInformation { + card: Card { + number: ccard.card_number, + expiration_month: ccard.card_exp_month, + expiration_year: ccard.card_exp_year, + security_code: ccard.card_cvc, + card_type, + }, + }), + None, + ) } + + api::PaymentMethodData::Wallet(wallet_data) => match wallet_data { + payments::WalletData::ApplePay(apple_pay_data) => { + match item.payment_method_token.clone() { + Some(payment_method_token) => match payment_method_token { + types::PaymentMethodToken::ApplePayDecrypt(decrypt_data) => { + let expiration_month = decrypt_data.get_expiry_month()?; + let expiration_year = decrypt_data.get_four_digit_expiry_year()?; + ( + PaymentInformation::ApplePay(ApplePayPaymentInformation { + tokenized_card: TokenizedCard { + number: decrypt_data.application_primary_account_number, + cryptogram: decrypt_data + .payment_data + .online_payment_cryptogram, + transaction_type: TransactionType::ApplePay, + expiration_year, + expiration_month, + }, + }), + Some(PaymentSolution::ApplePay), + ) + } + types::PaymentMethodToken::Token(_) => { + Err(errors::ConnectorError::InvalidWalletToken)? + } + }, + None => ( + PaymentInformation::ApplePayToken(ApplePayTokenPaymentInformation { + fluid_data: FluidData { + value: Secret::from(apple_pay_data.payment_data), + }, + tokenized_card: ApplePayTokenizedCard { + transaction_type: TransactionType::ApplePay, + }, + }), + Some(PaymentSolution::ApplePay), + ), + } + } + payments::WalletData::GooglePay(google_pay_data) => ( + PaymentInformation::GooglePay(GooglePayPaymentInformation { + fluid_data: FluidData { + value: Secret::from( + consts::BASE64_ENGINE + .encode(google_pay_data.tokenization_data.token), + ), + }, + }), + Some(PaymentSolution::GooglePay), + ), + payments::WalletData::AliPayQr(_) + | payments::WalletData::AliPayRedirect(_) + | payments::WalletData::AliPayHkRedirect(_) + | payments::WalletData::MomoRedirect(_) + | payments::WalletData::KakaoPayRedirect(_) + | payments::WalletData::GoPayRedirect(_) + | payments::WalletData::GcashRedirect(_) + | payments::WalletData::ApplePayRedirect(_) + | payments::WalletData::ApplePayThirdPartySdk(_) + | payments::WalletData::DanaRedirect {} + | payments::WalletData::GooglePayRedirect(_) + | payments::WalletData::GooglePayThirdPartySdk(_) + | payments::WalletData::MbWayRedirect(_) + | payments::WalletData::MobilePayRedirect(_) + | payments::WalletData::PaypalRedirect(_) + | payments::WalletData::PaypalSdk(_) + | payments::WalletData::SamsungPay(_) + | payments::WalletData::TwintRedirect {} + | payments::WalletData::VippsRedirect {} + | payments::WalletData::TouchNGoRedirect(_) + | payments::WalletData::WeChatPayRedirect(_) + | payments::WalletData::WeChatPayQr(_) + | payments::WalletData::CashappQr(_) + | payments::WalletData::SwishQr(_) => Err(errors::ConnectorError::NotImplemented( + utils::get_unimplemented_payment_method_error_message("Cybersource"), + ))?, + }, _ => Err(errors::ConnectorError::NotImplemented( utils::get_unimplemented_payment_method_error_message("Cybersource"), ))?, }; + + let processing_information = ProcessingInformation { + capture: Some(false), + capture_options: None, + action_list, + action_token_types, + authorization_options, + commerce_indicator: CybersourceCommerceIndicator::Internet, + payment_solution: solution.map(String::from), + }; Ok(Self { processing_information, payment_information, @@ -169,7 +253,7 @@ pub enum CybersourceActionsList { #[derive(Debug, Serialize)] #[serde(rename_all = "camelCase")] pub enum CybersourceActionsTokenType { - InstrumentIdentifier, + PaymentInstrument, } #[derive(Debug, Serialize)] @@ -216,8 +300,7 @@ pub struct CaptureOptions { #[derive(Debug, Serialize)] #[serde(rename_all = "camelCase")] pub struct CardPaymentInformation { - card: CardDetails, - instrument_identifier: Option, + card: Card, } #[derive(Debug, Serialize)] @@ -249,6 +332,12 @@ pub struct ApplePayPaymentInformation { tokenized_card: TokenizedCard, } +#[derive(Debug, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct MandatePaymentInformation { + payment_instrument: Option, +} + #[derive(Debug, Serialize)] #[serde(rename_all = "camelCase")] pub struct FluidData { @@ -268,20 +357,13 @@ pub enum PaymentInformation { GooglePay(GooglePayPaymentInformation), ApplePay(ApplePayPaymentInformation), ApplePayToken(ApplePayTokenPaymentInformation), + MandatePayment(MandatePaymentInformation), } #[derive(Debug, Clone, Serialize, Deserialize)] -pub struct CybersoucreInstrumentIdentifier { +pub struct CybersoucrePaymentInstrument { id: String, } - -#[derive(Debug, Serialize)] -#[serde(untagged)] -pub enum CardDetails { - PaymentCard(Card), - MandateCard(MandateCardDetails), -} - #[derive(Debug, Serialize)] #[serde(rename_all = "camelCase")] pub struct Card { @@ -292,14 +374,6 @@ pub struct Card { #[serde(rename = "type")] card_type: Option, } - -#[derive(Debug, Serialize)] -#[serde(rename_all = "camelCase")] -pub struct MandateCardDetails { - expiration_month: Secret, - expiration_year: Secret, -} - #[derive(Debug, Serialize)] #[serde(rename_all = "camelCase")] pub struct OrderInformationWithBill { @@ -394,7 +468,7 @@ impl if item.router_data.request.setup_future_usage.is_some() { ( Some(vec![CybersourceActionsList::TokenCreate]), - Some(vec![CybersourceActionsTokenType::InstrumentIdentifier]), + Some(vec![CybersourceActionsTokenType::PaymentInstrument]), Some(CybersourceAuthorizationOptions { initiator: CybersourcePaymentInitiator { initiator_type: Some(CybersourcePaymentInitiatorTypes::Customer), @@ -507,33 +581,16 @@ impl Err(_) => None, }; - let instrument_identifier = - item.router_data - .request - .connector_mandate_id() - .map(|mandate_token_id| CybersoucreInstrumentIdentifier { - id: mandate_token_id, - }); - - let card = if instrument_identifier.is_some() { - CardDetails::MandateCard(MandateCardDetails { - expiration_month: ccard.card_exp_month, - expiration_year: ccard.card_exp_year, - }) - } else { - CardDetails::PaymentCard(Card { + let payment_information = PaymentInformation::Cards(CardPaymentInformation { + card: Card { number: ccard.card_number, expiration_month: ccard.card_exp_month, expiration_year: ccard.card_exp_year, security_code: ccard.card_cvc, card_type, - }) - }; - - let payment_information = PaymentInformation::Cards(CardPaymentInformation { - card, - instrument_identifier, + }, }); + let processing_information = ProcessingInformation::from((item, None)); let client_reference_information = ClientReferenceInformation::from(item); let merchant_defined_information = @@ -726,13 +783,42 @@ impl TryFrom<&CybersourceRouterData<&types::PaymentsAuthorizeRouterData>> ) .into()), }, + payments::PaymentMethodData::MandatePayment => { + let processing_information = ProcessingInformation::from((item, None)); + let payment_instrument = + item.router_data + .request + .connector_mandate_id() + .map(|mandate_token_id| CybersoucrePaymentInstrument { + id: mandate_token_id, + }); + + let email = item.router_data.request.get_email()?; + let bill_to = build_bill_to(item.router_data.get_billing()?, email)?; + let order_information = OrderInformationWithBill::from((item, bill_to)); + let payment_information = + PaymentInformation::MandatePayment(MandatePaymentInformation { + payment_instrument, + }); + let client_reference_information = ClientReferenceInformation::from(item); + let merchant_defined_information = + item.router_data.request.metadata.clone().map(|metadata| { + Vec::::foreign_from(metadata.peek().to_owned()) + }); + Ok(Self { + processing_information, + payment_information, + order_information, + client_reference_information, + merchant_defined_information, + }) + } payments::PaymentMethodData::CardRedirect(_) | payments::PaymentMethodData::PayLater(_) | payments::PaymentMethodData::BankRedirect(_) | payments::PaymentMethodData::BankDebit(_) | payments::PaymentMethodData::BankTransfer(_) | payments::PaymentMethodData::Crypto(_) - | payments::PaymentMethodData::MandatePayment | payments::PaymentMethodData::Reward | payments::PaymentMethodData::Upi(_) | payments::PaymentMethodData::Voucher(_) @@ -1019,14 +1105,11 @@ pub struct CybersourcePaymentsIncrementalAuthorizationResponse { error_information: Option, } -#[derive(Debug, Clone, Deserialize)] -#[serde(rename_all = "camelCase")] -pub struct CybersourceSetupMandatesResponse { - id: String, - status: CybersourcePaymentStatus, - error_information: Option, - client_reference_information: Option, - token_information: Option, +#[derive(Debug, Deserialize)] +#[serde(untagged)] +pub enum CybersourceSetupMandatesResponse { + ClientReferenceInformation(CybersourceClientReferenceResponse), + ErrorInformation(CybersourceErrorInformationResponse), } #[derive(Debug, Clone, Serialize, Deserialize)] @@ -1038,7 +1121,7 @@ pub struct ClientReferenceInformation { #[derive(Debug, Clone, Deserialize)] #[serde(rename_all = "camelCase")] pub struct CybersourceTokenInformation { - instrument_identifier: CybersoucreInstrumentIdentifier, + payment_instrument: CybersoucrePaymentInstrument, } #[derive(Debug, Clone, Deserialize)] @@ -1161,7 +1244,7 @@ fn get_payment_response( .token_information .clone() .map(|token_info| types::MandateReference { - connector_mandate_id: Some(token_info.instrument_identifier.id), + connector_mandate_id: Some(token_info.payment_instrument.id), payment_method_id: None, }); Ok(types::PaymentsResponseData::TransactionResponse { @@ -1327,51 +1410,66 @@ impl types::PaymentsResponseData, >, ) -> Result { - let mandate_reference = - item.response - .token_information - .map(|token_info| types::MandateReference { - connector_mandate_id: Some(token_info.instrument_identifier.id), - payment_method_id: None, + match item.response { + CybersourceSetupMandatesResponse::ClientReferenceInformation(info_response) => { + let mandate_reference = info_response.token_information.clone().map(|token_info| { + types::MandateReference { + connector_mandate_id: Some(token_info.payment_instrument.id), + payment_method_id: None, + } }); - let mut mandate_status = enums::AttemptStatus::foreign_from((item.response.status, false)); - if matches!(mandate_status, enums::AttemptStatus::Authorized) { - //In case of zero auth mandates we want to make the payment reach the terminal status so we are converting the authorized status to charged as well. - mandate_status = enums::AttemptStatus::Charged - } - Ok(Self { - status: mandate_status, - response: match item.response.error_information { - Some(error) => Err(types::ErrorResponse { + let mut mandate_status = + enums::AttemptStatus::foreign_from((info_response.status.clone(), false)); + if matches!(mandate_status, enums::AttemptStatus::Authorized) { + //In case of zero auth mandates we want to make the payment reach the terminal status so we are converting the authorized status to charged as well. + mandate_status = enums::AttemptStatus::Charged + } + let error_response = + get_error_response_if_failure((&info_response, mandate_status, item.http_code)); + + Ok(Self { + status: mandate_status, + response: match error_response { + Some(error) => Err(error), + None => Ok(types::PaymentsResponseData::TransactionResponse { + resource_id: types::ResponseId::ConnectorTransactionId( + info_response.id.clone(), + ), + redirection_data: None, + mandate_reference, + connector_metadata: None, + network_txn_id: None, + connector_response_reference_id: Some( + info_response + .client_reference_information + .code + .clone() + .unwrap_or(info_response.id), + ), + incremental_authorization_allowed: Some( + mandate_status == enums::AttemptStatus::Authorized, + ), + }), + }, + ..item.data + }) + } + CybersourceSetupMandatesResponse::ErrorInformation(error_response) => Ok(Self { + response: Err(types::ErrorResponse { code: consts::NO_ERROR_CODE.to_string(), - message: error + message: error_response + .error_information .message .unwrap_or(consts::NO_ERROR_MESSAGE.to_string()), - reason: error.reason, + reason: error_response.error_information.reason, status_code: item.http_code, attempt_status: None, - connector_transaction_id: Some(item.response.id), - }), - _ => Ok(types::PaymentsResponseData::TransactionResponse { - resource_id: types::ResponseId::ConnectorTransactionId( - item.response.id.clone(), - ), - redirection_data: None, - mandate_reference, - connector_metadata: None, - network_txn_id: None, - connector_response_reference_id: item - .response - .client_reference_information - .map(|cref| cref.code) - .unwrap_or(Some(item.response.id)), - incremental_authorization_allowed: Some( - mandate_status == enums::AttemptStatus::Authorized, - ), + connector_transaction_id: Some(error_response.id.clone()), }), - }, - ..item.data - }) + status: enums::AttemptStatus::Failure, + ..item.data + }), + } } } diff --git a/crates/router/src/core/payments.rs b/crates/router/src/core/payments.rs index bfd747640d3f..aed22eaedc8f 100644 --- a/crates/router/src/core/payments.rs +++ b/crates/router/src/core/payments.rs @@ -1770,24 +1770,10 @@ where .unwrap_or(false); let payment_data_and_tokenization_action = match connector { - Some(connector_name) if is_mandate => { - if connector_name == *"cybersource" { - let (_operation, payment_method_data) = operation - .to_domain()? - .make_pm_data( - state, - payment_data, - validate_result.storage_scheme, - merchant_key_store, - ) - .await?; - payment_data.payment_method_data = payment_method_data; - } - ( - payment_data.to_owned(), - TokenizationAction::SkipConnectorTokenization, - ) - } + Some(_) if is_mandate => ( + payment_data.to_owned(), + TokenizationAction::SkipConnectorTokenization, + ), Some(connector) if is_operation_confirm(&operation) => { let payment_method = &payment_data .payment_attempt @@ -1870,7 +1856,7 @@ where }; (payment_data.to_owned(), connector_tokenization_action) } - Some(_) | None => ( + _ => ( payment_data.to_owned(), TokenizationAction::SkipConnectorTokenization, ), From 0248d35dd49d2dc7e5e4da6b60a3ee3577c8eac9 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 4 Jan 2024 06:46:24 +0000 Subject: [PATCH 03/19] test(postman): update postman collection files --- .../checkout.postman_collection.json | 242 +++++++++++++++++- 1 file changed, 236 insertions(+), 6 deletions(-) diff --git a/postman/collection-json/checkout.postman_collection.json b/postman/collection-json/checkout.postman_collection.json index a46cae1df50e..d510b1c2a17f 100644 --- a/postman/collection-json/checkout.postman_collection.json +++ b/postman/collection-json/checkout.postman_collection.json @@ -424,7 +424,7 @@ "language": "json" } }, - "raw": "{\"connector_type\":\"fiz_operations\",\"connector_name\":\"checkout\",\"connector_account_details\":{\"auth_type\":\"SignatureKey\",\"api_key\":\"{{connector_api_key}}\",\"api_secret\":\"{{connector_api_secret}}\",\"key1\":\"{{connector_key1}}\"},\"test_mode\":false,\"disabled\":false,\"business_country\":\"US\",\"business_label\":\"default\",\"payment_methods_enabled\":[{\"payment_method\":\"card\",\"payment_method_types\":[{\"payment_method_type\":\"credit\",\"card_networks\":[\"Visa\",\"Mastercard\"],\"minimum_amount\":1,\"maximum_amount\":68607706,\"recurring_enabled\":true,\"installment_payment_enabled\":true},{\"payment_method_type\":\"debit\",\"card_networks\":[\"Visa\",\"Mastercard\"],\"minimum_amount\":1,\"maximum_amount\":68607706,\"recurring_enabled\":true,\"installment_payment_enabled\":true}]},{\"payment_method\":\"wallet\",\"payment_method_types\":[{\"payment_method_type\":\"paypal\",\"payment_experience\":\"redirect_to_url\",\"minimum_amount\":1,\"maximum_amount\":68607706,\"recurring_enabled\":false,\"installment_payment_enabled\":false}]}],\"metadata\":{\"city\":\"NY\",\"unit\":\"245\"}}" + "raw": "{\"connector_type\":\"fiz_operations\",\"connector_name\":\"checkout\",\"connector_account_details\":{\"auth_type\":\"SignatureKey\",\"api_key\":\"{{connector_api_key}}\",\"api_secret\":\"{{connector_api_secret}}\",\"key1\":\"{{connector_key1}}\"},\"test_mode\":false,\"disabled\":false,\"business_country\":\"US\",\"business_label\":\"default\",\"payment_methods_enabled\":[{\"payment_method\":\"card\",\"payment_method_types\":[{\"payment_method_type\":\"credit\",\"card_networks\":[\"AmericanExpress\",\"Discover\",\"Interac\",\"JCB\",\"Mastercard\",\"Visa\",\"DinersClub\",\"UnionPay\",\"RuPay\"],\"minimum_amount\":1,\"maximum_amount\":68607706,\"recurring_enabled\":true,\"installment_payment_enabled\":true},{\"payment_method_type\":\"debit\",\"card_networks\":[\"AmericanExpress\",\"Discover\",\"Interac\",\"JCB\",\"Mastercard\",\"Visa\",\"DinersClub\",\"UnionPay\",\"RuPay\"],\"minimum_amount\":1,\"maximum_amount\":68607706,\"recurring_enabled\":true,\"installment_payment_enabled\":true}]},{\"payment_method\":\"wallet\",\"payment_method_types\":[{\"payment_method_type\":\"paypal\",\"payment_experience\":\"redirect_to_url\",\"minimum_amount\":1,\"maximum_amount\":68607706,\"recurring_enabled\":false,\"installment_payment_enabled\":false}]}],\"metadata\":{\"city\":\"NY\",\"unit\":\"245\"}}" }, "url": { "raw": "{{baseUrl}}/account/:account_id/connectors", @@ -559,6 +559,17 @@ { "name": "Payments - Retrieve", "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "setTimeout(function(){", + " console.log(\"Sleeping for 3 seconds before next request.\");", + "}, 3000);" + ], + "type": "text/javascript" + } + }, { "listen": "test", "script": { @@ -1001,6 +1012,17 @@ { "name": "Payments - Retrieve", "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "setTimeout(function(){", + " console.log(\"Sleeping for 3 seconds before next request.\");", + "}, 3000);" + ], + "type": "text/javascript" + } + }, { "listen": "test", "script": { @@ -1516,6 +1538,17 @@ { "name": "Payments - Retrieve-copy", "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "setTimeout(function(){", + " console.log(\"Sleeping for 3 seconds before next request.\");", + "}, 3000);" + ], + "type": "text/javascript" + } + }, { "listen": "test", "script": { @@ -2336,6 +2369,17 @@ { "name": "Payments - Retrieve", "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "setTimeout(function(){", + " console.log(\"Sleeping for 3 seconds before next request.\");", + "}, 3000);" + ], + "type": "text/javascript" + } + }, { "listen": "test", "script": { @@ -2969,6 +3013,17 @@ { "name": "Payments - Retrieve", "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "setTimeout(function(){", + " console.log(\"Sleeping for 3 seconds before next request.\");", + "}, 3000);" + ], + "type": "text/javascript" + } + }, { "listen": "test", "script": { @@ -3234,6 +3289,17 @@ { "name": "Payments - Retrieve", "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "setTimeout(function(){", + " console.log(\"Sleeping for 3 seconds before next request.\");", + "}, 3000);" + ], + "type": "text/javascript" + } + }, { "listen": "test", "script": { @@ -3914,6 +3980,17 @@ { "name": "Payments - Retrieve-copy", "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "setTimeout(function(){", + " console.log(\"Sleeping for 3 seconds before next request.\");", + "}, 3000);" + ], + "type": "text/javascript" + } + }, { "listen": "test", "script": { @@ -4222,6 +4299,17 @@ { "name": "Payments - Retrieve", "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "setTimeout(function(){", + " console.log(\"Sleeping for 3 seconds before next request.\");", + "}, 3000);" + ], + "type": "text/javascript" + } + }, { "listen": "test", "script": { @@ -4699,6 +4787,17 @@ { "name": "Payments - Retrieve", "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "setTimeout(function(){", + " console.log(\"Sleeping for 3 seconds before next request.\");", + "}, 3000);" + ], + "type": "text/javascript" + } + }, { "listen": "test", "script": { @@ -5191,6 +5290,17 @@ { "name": "Payments - Retrieve", "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "setTimeout(function(){", + " console.log(\"Sleeping for 3 seconds before next request.\");", + "}, 3000);" + ], + "type": "text/javascript" + } + }, { "listen": "test", "script": { @@ -5847,6 +5957,17 @@ { "name": "Payments - Retrieve", "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "setTimeout(function(){", + " console.log(\"Sleeping for 3 seconds before next request.\");", + "}, 3000);" + ], + "type": "text/javascript" + } + }, { "listen": "test", "script": { @@ -6324,6 +6445,17 @@ { "name": "Payments - Retrieve", "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "setTimeout(function(){", + " console.log(\"Sleeping for 3 seconds before next request.\");", + "}, 3000);" + ], + "type": "text/javascript" + } + }, { "listen": "test", "script": { @@ -6801,6 +6933,17 @@ { "name": "Payments - Retrieve", "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "setTimeout(function(){", + " console.log(\"Sleeping for 3 seconds before next request.\");", + "}, 3000);" + ], + "type": "text/javascript" + } + }, { "listen": "test", "script": { @@ -7230,6 +7373,17 @@ { "name": "Payments - Retrieve", "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "setTimeout(function(){", + " console.log(\"Sleeping for 3 seconds before next request.\");", + "}, 3000);" + ], + "type": "text/javascript" + } + }, { "listen": "test", "script": { @@ -7507,6 +7661,17 @@ { "name": "Payments - Retrieve", "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "setTimeout(function(){", + " console.log(\"Sleeping for 3 seconds before next request.\");", + "}, 3000);" + ], + "type": "text/javascript" + } + }, { "listen": "test", "script": { @@ -8029,6 +8194,17 @@ { "name": "Payments - Retrieve", "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "setTimeout(function(){", + " console.log(\"Sleeping for 3 seconds before next request.\");", + "}, 3000);" + ], + "type": "text/javascript" + } + }, { "listen": "test", "script": { @@ -8588,6 +8764,17 @@ { "name": "Payments - Retrieve-copy", "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "setTimeout(function(){", + " console.log(\"Sleeping for 3 seconds before next request.\");", + "}, 3000);" + ], + "type": "text/javascript" + } + }, { "listen": "test", "script": { @@ -9343,7 +9530,9 @@ "listen": "prerequest", "script": { "exec": [ - "" + "setTimeout(function(){", + " console.log(\"Sleeping for 3 seconds before next request.\");", + "}, 3000);" ], "type": "text/javascript" } @@ -9816,7 +10005,9 @@ "listen": "prerequest", "script": { "exec": [ - "" + "setTimeout(function(){", + " console.log(\"Sleeping for 3 seconds before next request.\");", + "}, 3000);" ], "type": "text/javascript" } @@ -10061,7 +10252,9 @@ "listen": "prerequest", "script": { "exec": [ - "" + "setTimeout(function(){", + " console.log(\"Sleeping for 3 seconds before next request.\");", + "}, 3000);" ], "type": "text/javascript" } @@ -10305,7 +10498,9 @@ "listen": "prerequest", "script": { "exec": [ - "" + "setTimeout(function(){", + " console.log(\"Sleeping for 3 seconds before next request.\");", + "}, 3000);" ], "type": "text/javascript" } @@ -11173,7 +11368,9 @@ "listen": "prerequest", "script": { "exec": [ - "" + "setTimeout(function(){", + " console.log(\"Sleeping for 3 seconds before next request.\");", + "}, 3000);" ], "type": "text/javascript" } @@ -12357,6 +12554,17 @@ { "name": "Payments - Retrieve", "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "setTimeout(function(){", + " console.log(\"Sleeping for 3 seconds before next request.\");", + "}, 3000);" + ], + "type": "text/javascript" + } + }, { "listen": "test", "script": { @@ -13152,6 +13360,17 @@ { "name": "Payments - Retrieve", "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "setTimeout(function(){", + " console.log(\"Sleeping for 3 seconds before next request.\");", + "}, 3000);" + ], + "type": "text/javascript" + } + }, { "listen": "test", "script": { @@ -13547,6 +13766,17 @@ { "name": "Payments - Retrieve", "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "setTimeout(function(){", + " console.log(\"Sleeping for 3 seconds before next request.\");", + "}, 3000);" + ], + "type": "text/javascript" + } + }, { "listen": "test", "script": { From 72968dcecf16c8821a383a826e4e35408b035633 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 4 Jan 2024 06:46:24 +0000 Subject: [PATCH 04/19] chore(version): v1.106.0 --- CHANGELOG.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ebd711b2e605..30b7957272c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,38 @@ All notable changes to HyperSwitch will be documented here. - - - +## 1.106.0 (2024-01-04) + +### Features + +- **connector:** + - [BOA] Populate merchant_defined_information with metadata ([#3208](https://github.com/juspay/hyperswitch/pull/3208)) ([`18eca7e`](https://github.com/juspay/hyperswitch/commit/18eca7e9fbe6cdc101bd135c4618882b7a5455bf)) + - [CYBERSOURCE] Refactor cybersource ([#3215](https://github.com/juspay/hyperswitch/pull/3215)) ([`e06ba14`](https://github.com/juspay/hyperswitch/commit/e06ba148b666772fe79d7050d0c505dd2f04f87c)) +- **customers:** Add JWT Authentication for `/customers` APIs ([#3179](https://github.com/juspay/hyperswitch/pull/3179)) ([`aefe618`](https://github.com/juspay/hyperswitch/commit/aefe6184ec3e3156877c72988ca0f92454a47e7d)) + +### Bug Fixes + +- **connector:** [Volt] Error handling for auth response ([#3187](https://github.com/juspay/hyperswitch/pull/3187)) ([`a51c54d`](https://github.com/juspay/hyperswitch/commit/a51c54d39d3687c6a06176895435ac66fa194d7b)) +- **core:** Fix recurring mandates flow for cyber source ([#3224](https://github.com/juspay/hyperswitch/pull/3224)) ([`6a1743e`](https://github.com/juspay/hyperswitch/commit/6a1743ebe993d5abb53f2ce1b8b383aa4a9553fb)) +- **middleware:** Add support for logging request-id sent in request ([#3225](https://github.com/juspay/hyperswitch/pull/3225)) ([`0f72b55`](https://github.com/juspay/hyperswitch/commit/0f72b5527aab221b8e69e737e5d19abdd0696150)) + +### Refactors + +- **connector:** [NMI] Include mandatory fields for card 3DS ([#3203](https://github.com/juspay/hyperswitch/pull/3203)) ([`a46b8a7`](https://github.com/juspay/hyperswitch/commit/a46b8a7b05367fbbdbf4fca89d8a6b29110a4e1c)) + +### Testing + +- **postman:** Update postman collection files ([`0248d35`](https://github.com/juspay/hyperswitch/commit/0248d35dd49d2dc7e5e4da6b60a3ee3577c8eac9)) + +### Miscellaneous Tasks + +- Fix channel handling for consumer workflow loop ([#3223](https://github.com/juspay/hyperswitch/pull/3223)) ([`51e1fac`](https://github.com/juspay/hyperswitch/commit/51e1fac556fdd8775e0bbc858b0b3cc50a7e88ec)) + +**Full Changelog:** [`v1.105.0...v1.106.0`](https://github.com/juspay/hyperswitch/compare/v1.105.0...v1.106.0) + +- - - + + ## 1.105.0 (2023-12-23) ### Features From e79604bd4681a69802f3c3169dd94424e3688e42 Mon Sep 17 00:00:00 2001 From: Sahkal Poddar Date: Thu, 4 Jan 2024 19:18:56 +0530 Subject: [PATCH 05/19] fix(connector): [iatapay] change refund amount (#3244) Co-authored-by: Samraat Bansal --- crates/router/src/connector/iatapay.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/router/src/connector/iatapay.rs b/crates/router/src/connector/iatapay.rs index fcfdd44e6360..0c156ef08b03 100644 --- a/crates/router/src/connector/iatapay.rs +++ b/crates/router/src/connector/iatapay.rs @@ -479,7 +479,7 @@ impl ConnectorIntegration Date: Fri, 5 Jan 2024 07:20:19 +0000 Subject: [PATCH 06/19] chore(version): v1.106.1 --- CHANGELOG.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 30b7957272c6..7f7a2ced4db1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,17 @@ All notable changes to HyperSwitch will be documented here. - - - +## 1.106.1 (2024-01-05) + +### Bug Fixes + +- **connector:** [iatapay] change refund amount ([#3244](https://github.com/juspay/hyperswitch/pull/3244)) ([`e79604b`](https://github.com/juspay/hyperswitch/commit/e79604bd4681a69802f3c3169dd94424e3688e42)) + +**Full Changelog:** [`v1.106.0...v1.106.1`](https://github.com/juspay/hyperswitch/compare/v1.106.0...v1.106.1) + +- - - + + ## 1.106.0 (2024-01-04) ### Features From 3ab71fbd5ac86f12cf19d17561e428d33c51a4cf Mon Sep 17 00:00:00 2001 From: Apoorv Dixit <64925866+apoorvdixit88@users.noreply.github.com> Date: Fri, 5 Jan 2024 14:10:26 +0530 Subject: [PATCH 07/19] fix(user): add integration_completed enum in metadata type (#3245) --- .../router/src/utils/user/dashboard_metadata.rs | 15 +++------------ .../down.sql | 2 ++ .../up.sql | 2 ++ 3 files changed, 7 insertions(+), 12 deletions(-) create mode 100644 migrations/2024-01-04-121733_add_dashboard_metadata_key_integration_completed/down.sql create mode 100644 migrations/2024-01-04-121733_add_dashboard_metadata_key_integration_completed/up.sql diff --git a/crates/router/src/utils/user/dashboard_metadata.rs b/crates/router/src/utils/user/dashboard_metadata.rs index 40594a6e49f6..09fb5ccd24b4 100644 --- a/crates/router/src/utils/user/dashboard_metadata.rs +++ b/crates/router/src/utils/user/dashboard_metadata.rs @@ -91,21 +91,12 @@ pub async fn get_merchant_scoped_metadata_from_db( org_id: String, metadata_keys: Vec, ) -> UserResult> { - match state + state .store .find_merchant_scoped_dashboard_metadata(&merchant_id, &org_id, metadata_keys) .await - { - Ok(data) => Ok(data), - Err(e) => { - if e.current_context().is_db_not_found() { - return Ok(Vec::with_capacity(0)); - } - Err(e - .change_context(UserErrors::InternalServerError) - .attach_printable("DB Error Fetching DashboardMetaData")) - } - } + .change_context(UserErrors::InternalServerError) + .attach_printable("DB Error Fetching DashboardMetaData") } pub async fn get_user_scoped_metadata_from_db( state: &AppState, diff --git a/migrations/2024-01-04-121733_add_dashboard_metadata_key_integration_completed/down.sql b/migrations/2024-01-04-121733_add_dashboard_metadata_key_integration_completed/down.sql new file mode 100644 index 000000000000..c7c9cbeb4017 --- /dev/null +++ b/migrations/2024-01-04-121733_add_dashboard_metadata_key_integration_completed/down.sql @@ -0,0 +1,2 @@ +-- This file should undo anything in `up.sql` +SELECT 1; \ No newline at end of file diff --git a/migrations/2024-01-04-121733_add_dashboard_metadata_key_integration_completed/up.sql b/migrations/2024-01-04-121733_add_dashboard_metadata_key_integration_completed/up.sql new file mode 100644 index 000000000000..bb703fde397f --- /dev/null +++ b/migrations/2024-01-04-121733_add_dashboard_metadata_key_integration_completed/up.sql @@ -0,0 +1,2 @@ +-- Your SQL goes here +ALTER TYPE "DashboardMetadata" ADD VALUE IF NOT EXISTS 'integration_completed'; \ No newline at end of file From 000e64438838461ea930545405fb2ee0d3c4356c Mon Sep 17 00:00:00 2001 From: Mani Chandra <84711804+ThisIsMani@users.noreply.github.com> Date: Fri, 5 Jan 2024 14:36:25 +0530 Subject: [PATCH 08/19] fix(users): Fix wrong redirection url in magic link (#3217) Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com> --- crates/router/src/services/email/types.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/router/src/services/email/types.rs b/crates/router/src/services/email/types.rs index 9e26c45ba6b1..d5c28b1fd6af 100644 --- a/crates/router/src/services/email/types.rs +++ b/crates/router/src/services/email/types.rs @@ -77,7 +77,7 @@ pub fn get_link_with_token( token: impl std::fmt::Display, action: impl std::fmt::Display, ) -> String { - format!("{base_url}/user/{action}/?token={token}") + format!("{base_url}/user/{action}?token={token}") } pub struct VerifyEmail { @@ -153,7 +153,8 @@ impl EmailData for MagicLink { .await .change_context(EmailError::TokenGenerationFailure)?; - let magic_link_login = get_link_with_token(&self.settings.email.base_url, token, "login"); + let magic_link_login = + get_link_with_token(&self.settings.email.base_url, token, "verify_email"); let body = html::get_html_body(EmailBody::MagicLink { link: magic_link_login, From 34318bc1f12a1298e8993021a2d516cf86049980 Mon Sep 17 00:00:00 2001 From: Shankar Singh C <83439957+ShankarSinghC@users.noreply.github.com> Date: Fri, 5 Jan 2024 14:47:37 +0530 Subject: [PATCH 09/19] refactor: address panics due to indexing and slicing (#3233) Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com> --- .cargo/config.toml | 11 +- Cargo.lock | 1 + crates/api_models/src/admin.rs | 16 ++- crates/cards/Cargo.toml | 1 + crates/cards/src/validate.rs | 8 +- crates/common_utils/src/crypto.rs | 5 +- crates/common_utils/src/pii.rs | 53 ++++++--- crates/connector_configs/Cargo.toml | 2 +- .../src/response_modifier.rs | 48 ++++---- crates/euclid/src/dssa/state_machine.rs | 8 +- crates/euclid/src/frontend/dir.rs | 5 +- crates/euclid_macros/src/inner/knowledge.rs | 5 +- .../router/src/connector/authorizedotnet.rs | 7 +- .../connector/authorizedotnet/transformers.rs | 25 ++-- .../src/connector/globalpay/transformers.rs | 2 +- .../src/connector/helcim/transformers.rs | 6 +- .../src/connector/mollie/transformers.rs | 2 +- .../connector/multisafepay/transformers.rs | 2 +- .../src/connector/nexinets/transformers.rs | 14 ++- .../router/src/connector/nmi/transformers.rs | 13 ++- .../src/connector/payeezy/transformers.rs | 2 +- .../src/connector/payme/transformers.rs | 4 +- .../src/connector/placetopay/transformers.rs | 2 +- .../src/connector/powertranz/transformers.rs | 2 +- .../src/connector/prophetpay/transformers.rs | 17 ++- .../router/src/connector/stax/transformers.rs | 2 +- .../src/connector/stripe/transformers.rs | 11 +- .../src/connector/trustpay/transformers.rs | 2 +- .../router/src/connector/tsys/transformers.rs | 2 +- crates/router/src/connector/utils.rs | 28 +++-- .../src/connector/worldline/transformers.rs | 4 +- .../router/src/connector/zen/transformers.rs | 28 ++--- crates/router/src/core/payments/helpers.rs | 8 +- crates/router/src/services/encryption.rs | 109 +----------------- crates/router/src/workflows/payment_sync.rs | 5 +- crates/router/tests/integration_demo.rs | 2 +- crates/router/tests/refunds.rs | 4 +- crates/router_env/src/logger/storage.rs | 15 ++- .../test_utils/tests/connectors/selenium.rs | 16 ++- 39 files changed, 244 insertions(+), 253 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 3082e9635cf9..5b27955262ad 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -3,9 +3,13 @@ rustflags = [ "-Funsafe_code", "-Wclippy::as_conversions", "-Wclippy::expect_used", + "-Wclippy::index_refutable_slice", + "-Wclippy::indexing_slicing", + "-Wclippy::match_on_vec_items", "-Wclippy::missing_panics_doc", - "-Wclippy::panic_in_result_fn", + "-Wclippy::out_of_bounds_indexing", "-Wclippy::panic", + "-Wclippy::panic_in_result_fn", "-Wclippy::panicking_unwrap", "-Wclippy::todo", "-Wclippy::unimplemented", @@ -23,10 +27,7 @@ rustflags = [ [build] -rustdocflags = [ - "--cfg", - "uuid_unstable" -] +rustdocflags = ["--cfg", "uuid_unstable"] [alias] gen-pg = "generate --path ../../../../connector-template -n" diff --git a/Cargo.lock b/Cargo.lock index be1e0c8a2a4e..cd5960a68c0d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1425,6 +1425,7 @@ dependencies = [ "error-stack", "luhn", "masking", + "router_env", "serde", "serde_json", "thiserror", diff --git a/crates/api_models/src/admin.rs b/crates/api_models/src/admin.rs index d35b12152e91..ed49b6f27b5e 100644 --- a/crates/api_models/src/admin.rs +++ b/crates/api_models/src/admin.rs @@ -359,7 +359,7 @@ pub mod payout_routing_algorithm { where A: de::MapAccess<'de>, { - let mut output = serde_json::Value::Object(Map::new()); + let mut output = Map::new(); let mut routing_data: String = "".to_string(); let mut routing_type: String = "".to_string(); @@ -367,14 +367,20 @@ pub mod payout_routing_algorithm { match key { "type" => { routing_type = map.next_value()?; - output["type"] = serde_json::Value::String(routing_type.to_owned()); + output.insert( + "type".to_string(), + serde_json::Value::String(routing_type.to_owned()), + ); } "data" => { routing_data = map.next_value()?; - output["data"] = serde_json::Value::String(routing_data.to_owned()); + output.insert( + "data".to_string(), + serde_json::Value::String(routing_data.to_owned()), + ); } f => { - output[f] = map.next_value()?; + output.insert(f.to_string(), map.next_value()?); } } } @@ -392,7 +398,7 @@ pub mod payout_routing_algorithm { } u => Err(de::Error::custom(format!("Unknown routing algorithm {u}"))), }?; - Ok(output) + Ok(serde_json::Value::Object(output)) } } diff --git a/crates/cards/Cargo.toml b/crates/cards/Cargo.toml index ae72a3d43acc..cf3e25459c6a 100644 --- a/crates/cards/Cargo.toml +++ b/crates/cards/Cargo.toml @@ -19,6 +19,7 @@ time = "0.3.21" # First party crates common_utils = { version = "0.1.0", path = "../common_utils" } masking = { version = "0.1.0", path = "../masking" } +router_env = { version = "0.1.0", path = "../router_env", features = ["log_extra_implicit_fields", "log_custom_entries_to_extra"] } [dev-dependencies] serde_json = "1.0.108" diff --git a/crates/cards/src/validate.rs b/crates/cards/src/validate.rs index d083a420a1e5..001eab3004d7 100644 --- a/crates/cards/src/validate.rs +++ b/crates/cards/src/validate.rs @@ -1,6 +1,7 @@ use std::{fmt, ops::Deref, str::FromStr}; use masking::{PeekInterface, Strategy, StrongSecret, WithType}; +use router_env::logger; use serde::{Deserialize, Deserializer, Serialize}; use thiserror::Error; @@ -85,7 +86,12 @@ where return WithType::fmt(val, f); } - write!(f, "{}{}", &val_str[..6], "*".repeat(val_str.len() - 6)) + if let Some(value) = val_str.get(..6) { + write!(f, "{}{}", value, "*".repeat(val_str.len() - 6)) + } else { + logger::error!("Invalid card number {val_str}"); + WithType::fmt(val, f) + } } } diff --git a/crates/common_utils/src/crypto.rs b/crates/common_utils/src/crypto.rs index a0f365dd40dd..c2c83a3589e4 100644 --- a/crates/common_utils/src/crypto.rs +++ b/crates/common_utils/src/crypto.rs @@ -279,7 +279,10 @@ impl DecodeMessage for GcmAes256 { .change_context(errors::CryptoError::DecodingFailed)?; let nonce_sequence = NonceSequence::from_bytes( - msg[..ring::aead::NONCE_LEN] + msg.get(..ring::aead::NONCE_LEN) + .ok_or(errors::CryptoError::DecodingFailed) + .into_report() + .attach_printable("Failed to read the nonce form the encrypted ciphertext")? .try_into() .into_report() .change_context(errors::CryptoError::DecodingFailed)?, diff --git a/crates/common_utils/src/pii.rs b/crates/common_utils/src/pii.rs index 39793de5c2b5..1889a5f3aeef 100644 --- a/crates/common_utils/src/pii.rs +++ b/crates/common_utils/src/pii.rs @@ -12,6 +12,8 @@ use diesel::{ }; use error_stack::{IntoReport, ResultExt}; use masking::{ExposeInterface, Secret, Strategy, WithType}; +#[cfg(feature = "logs")] +use router_env::logger; use crate::{ crypto::Encryptable, @@ -41,13 +43,14 @@ where fn fmt(val: &T, f: &mut fmt::Formatter<'_>) -> fmt::Result { let val_str: &str = val.as_ref(); - // masks everything but the last 4 digits - write!( - f, - "{}{}", - "*".repeat(val_str.len() - 4), - &val_str[val_str.len() - 4..] - ) + if let Some(val_str) = val_str.get(val_str.len() - 4..) { + // masks everything but the last 4 digits + write!(f, "{}{}", "*".repeat(val_str.len() - 4), val_str) + } else { + #[cfg(feature = "logs")] + logger::error!("Invalid phone number: {val_str}"); + WithType::fmt(val, f) + } } } @@ -174,16 +177,26 @@ where { return WithType::fmt(val, f); } - write!( - f, - "{}_{}_{}", - client_secret_segments[0], - client_secret_segments[1], - "*".repeat( - val_str.len() - - (client_secret_segments[0].len() + client_secret_segments[1].len() + 2) + + if let Some((client_secret_segments_0, client_secret_segments_1)) = client_secret_segments + .first() + .zip(client_secret_segments.get(1)) + { + write!( + f, + "{}_{}_{}", + client_secret_segments_0, + client_secret_segments_1, + "*".repeat( + val_str.len() + - (client_secret_segments_0.len() + client_secret_segments_1.len() + 2) + ) ) - ) + } else { + #[cfg(feature = "logs")] + logger::error!("Invalid client secret: {val_str}"); + WithType::fmt(val, f) + } } } @@ -325,7 +338,13 @@ where } } - write!(f, "{}.**.**.**", segments[0]) + if let Some(segments) = segments.first() { + write!(f, "{}.**.**.**", segments) + } else { + #[cfg(feature = "logs")] + logger::error!("Invalid IP address: {val_str}"); + WithType::fmt(val, f) + } } } diff --git a/crates/connector_configs/Cargo.toml b/crates/connector_configs/Cargo.toml index f4df1e6a20b3..083a741ef50f 100644 --- a/crates/connector_configs/Cargo.toml +++ b/crates/connector_configs/Cargo.toml @@ -19,4 +19,4 @@ api_models = { version = "0.1.0", path = "../api_models", package = "api_models" serde = { version = "1.0.193", features = ["derive"] } serde_with = "3.4.0" toml = "0.7.3" -utoipa = { version = "3.3.0", features = ["preserve_order"] } +utoipa = { version = "3.3.0", features = ["preserve_order"] } \ No newline at end of file diff --git a/crates/connector_configs/src/response_modifier.rs b/crates/connector_configs/src/response_modifier.rs index 0eb447ace1a9..6a09c58a75ca 100644 --- a/crates/connector_configs/src/response_modifier.rs +++ b/crates/connector_configs/src/response_modifier.rs @@ -279,34 +279,28 @@ impl ConnectorApiIntegrationPayload { pub fn get_google_pay_metadata_response(response: Self) -> Option { match response.metadata { - Some(meta_data) => match meta_data.google_pay { - Some(google_pay) => match google_pay { - GoogleApiModelData::Standard(standard_data) => { - if standard_data.allowed_payment_methods.is_empty() { - None - } else { - let data = Some( - standard_data.allowed_payment_methods[0] - .tokenization_specification - .parameters - .clone(), - ); - match data { - Some(data) => Some(GooglePayData::Standard(GpayDashboardPayLoad { - gateway_merchant_id: data.gateway_merchant_id, - stripe_version: data.stripe_version, - stripe_publishable_key: data.stripe_publishable_key, - merchant_name: standard_data.merchant_info.merchant_name, - merchant_id: standard_data.merchant_info.merchant_id, - })), - None => None, - } + Some(meta_data) => { + match meta_data.google_pay { + Some(google_pay) => match google_pay { + GoogleApiModelData::Standard(standard_data) => { + let data = standard_data.allowed_payment_methods.first().map( + |allowed_pm| { + allowed_pm.tokenization_specification.parameters.clone() + }, + )?; + Some(GooglePayData::Standard(GpayDashboardPayLoad { + gateway_merchant_id: data.gateway_merchant_id, + stripe_version: data.stripe_version, + stripe_publishable_key: data.stripe_publishable_key, + merchant_name: standard_data.merchant_info.merchant_name, + merchant_id: standard_data.merchant_info.merchant_id, + })) } - } - GoogleApiModelData::Zen(data) => Some(GooglePayData::Zen(data)), - }, - None => None, - }, + GoogleApiModelData::Zen(data) => Some(GooglePayData::Zen(data)), + }, + None => None, + } + } None => None, } } diff --git a/crates/euclid/src/dssa/state_machine.rs b/crates/euclid/src/dssa/state_machine.rs index 4cd53911dfe4..93d394eece97 100644 --- a/crates/euclid/src/dssa/state_machine.rs +++ b/crates/euclid/src/dssa/state_machine.rs @@ -678,7 +678,9 @@ mod tests { .collect::>(); assert_eq!( values, - expected_contexts[expected_idx] + expected_contexts + .get(expected_idx) + .expect("Error deriving contexts") .iter() .collect::>() ); @@ -702,7 +704,9 @@ mod tests { .collect::>(); assert_eq!( values, - expected_contexts[expected_idx] + expected_contexts + .get(expected_idx) + .expect("Error deriving contexts") .iter() .collect::>() ); diff --git a/crates/euclid/src/frontend/dir.rs b/crates/euclid/src/frontend/dir.rs index f8cef1f92955..dc81359c51d5 100644 --- a/crates/euclid/src/frontend/dir.rs +++ b/crates/euclid/src/frontend/dir.rs @@ -722,7 +722,10 @@ mod test { }; let display_str = key.to_string(); - assert_eq!(&json_str[1..json_str.len() - 1], display_str); + assert_eq!( + json_str.get(1..json_str.len() - 1).expect("Value metadata"), + display_str + ); key_names.insert(key, display_str); } diff --git a/crates/euclid_macros/src/inner/knowledge.rs b/crates/euclid_macros/src/inner/knowledge.rs index 73b94919c903..9f33a6871c56 100644 --- a/crates/euclid_macros/src/inner/knowledge.rs +++ b/crates/euclid_macros/src/inner/knowledge.rs @@ -417,7 +417,10 @@ impl GenContext { .position(|v| *v == node_id) .ok_or_else(|| "Error deciding cycle order".to_string())?; - let cycle_order = order[position..].to_vec(); + let cycle_order = order + .get(position..) + .ok_or_else(|| "Error getting cycle order".to_string())? + .to_vec(); Ok(Some(cycle_order)) } else if visited.contains(&node_id) { Ok(None) diff --git a/crates/router/src/connector/authorizedotnet.rs b/crates/router/src/connector/authorizedotnet.rs index 9c8d2f470246..0686ee6a3b86 100644 --- a/crates/router/src/connector/authorizedotnet.rs +++ b/crates/router/src/connector/authorizedotnet.rs @@ -903,7 +903,12 @@ fn get_error_response( })), Some(authorizedotnet::TransactionResponse::AuthorizedotnetTransactionResponseError(_)) | None => { - let message = &response.messages.message[0].text; + let message = &response + .messages + .message + .first() + .ok_or(errors::ConnectorError::ResponseDeserializationFailed)? + .text; Ok(types::ErrorResponse { code: consts::NO_ERROR_CODE.to_string(), message: message.to_string(), diff --git a/crates/router/src/connector/authorizedotnet/transformers.rs b/crates/router/src/connector/authorizedotnet/transformers.rs index 30323ca4ef23..96cf3b6ffc51 100644 --- a/crates/router/src/connector/authorizedotnet/transformers.rs +++ b/crates/router/src/connector/authorizedotnet/transformers.rs @@ -619,7 +619,7 @@ impl Some(TransactionResponse::AuthorizedotnetTransactionResponseError(_)) | None => { Ok(Self { status: enums::AttemptStatus::Failure, - response: Err(get_err_response(item.http_code, item.response.messages)), + response: Err(get_err_response(item.http_code, item.response.messages)?), ..item.data }) } @@ -689,7 +689,7 @@ impl } None => Ok(Self { status: enums::AttemptStatus::Failure, - response: Err(get_err_response(item.http_code, item.response.messages)), + response: Err(get_err_response(item.http_code, item.response.messages)?), ..item.data }), } @@ -944,7 +944,7 @@ impl TryFrom Ok(Self { - response: Err(get_err_response(item.http_code, item.response.messages)), + response: Err(get_err_response(item.http_code, item.response.messages)?), ..item.data }), } @@ -986,7 +986,7 @@ impl }) } None => Ok(Self { - response: Err(get_err_response(item.http_code, item.response.messages)), + response: Err(get_err_response(item.http_code, item.response.messages)?), ..item.data }), } @@ -1024,15 +1024,22 @@ impl From> for TransactionType { } } -fn get_err_response(status_code: u16, message: ResponseMessages) -> types::ErrorResponse { - types::ErrorResponse { - code: message.message[0].code.clone(), - message: message.message[0].text.clone(), +fn get_err_response( + status_code: u16, + message: ResponseMessages, +) -> Result { + let response_message = message + .message + .first() + .ok_or(errors::ConnectorError::ResponseDeserializationFailed)?; + Ok(types::ErrorResponse { + code: response_message.code.clone(), + message: response_message.text.clone(), reason: None, status_code, attempt_status: None, connector_transaction_id: None, - } + }) } #[derive(Debug, Deserialize)] diff --git a/crates/router/src/connector/globalpay/transformers.rs b/crates/router/src/connector/globalpay/transformers.rs index 9cef564b3795..3124501bd6e5 100644 --- a/crates/router/src/connector/globalpay/transformers.rs +++ b/crates/router/src/connector/globalpay/transformers.rs @@ -385,7 +385,7 @@ fn get_payment_method_data( api::PaymentMethodData::Card(ccard) => Ok(PaymentMethodData::Card(requests::Card { number: ccard.card_number.clone(), expiry_month: ccard.card_exp_month.clone(), - expiry_year: ccard.get_card_expiry_year_2_digit(), + expiry_year: ccard.get_card_expiry_year_2_digit()?, cvv: ccard.card_cvc.clone(), account_type: None, authcode: None, diff --git a/crates/router/src/connector/helcim/transformers.rs b/crates/router/src/connector/helcim/transformers.rs index 823096d66482..599054163c3d 100644 --- a/crates/router/src/connector/helcim/transformers.rs +++ b/crates/router/src/connector/helcim/transformers.rs @@ -126,7 +126,8 @@ impl TryFrom<(&types::SetupMandateRouterData, &api::Card)> for HelcimVerifyReque fn try_from(value: (&types::SetupMandateRouterData, &api::Card)) -> Result { let (item, req_card) = value; let card_data = HelcimCard { - card_expiry: req_card.get_card_expiry_month_year_2_digit_with_delimiter("".to_string()), + card_expiry: req_card + .get_card_expiry_month_year_2_digit_with_delimiter("".to_string())?, card_number: req_card.card_number.clone(), card_c_v_v: req_card.card_cvc.clone(), }; @@ -196,7 +197,8 @@ impl ) -> Result { let (item, req_card) = value; let card_data = HelcimCard { - card_expiry: req_card.get_card_expiry_month_year_2_digit_with_delimiter("".to_string()), + card_expiry: req_card + .get_card_expiry_month_year_2_digit_with_delimiter("".to_string())?, card_number: req_card.card_number.clone(), card_c_v_v: req_card.card_cvc.clone(), }; diff --git a/crates/router/src/connector/mollie/transformers.rs b/crates/router/src/connector/mollie/transformers.rs index 5960e9cdb8d9..0fcb14d2cf59 100644 --- a/crates/router/src/connector/mollie/transformers.rs +++ b/crates/router/src/connector/mollie/transformers.rs @@ -292,7 +292,7 @@ impl TryFrom<&types::TokenizationRouterData> for MollieCardTokenRequest { .unwrap_or(Secret::new("".to_string())); let card_number = ccard.card_number.clone(); let card_expiry_date = - ccard.get_card_expiry_month_year_2_digit_with_delimiter("/".to_owned()); + ccard.get_card_expiry_month_year_2_digit_with_delimiter("/".to_owned())?; let card_cvv = ccard.card_cvc; let locale = item.request.get_browser_info()?.get_language()?; let testmode = diff --git a/crates/router/src/connector/multisafepay/transformers.rs b/crates/router/src/connector/multisafepay/transformers.rs index 0a034724a629..86096ed508b6 100644 --- a/crates/router/src/connector/multisafepay/transformers.rs +++ b/crates/router/src/connector/multisafepay/transformers.rs @@ -426,7 +426,7 @@ impl TryFrom<&MultisafepayRouterData<&types::PaymentsAuthorizeRouterData>> card_expiry_date: Some( (format!( "{}{}", - ccard.get_card_expiry_year_2_digit().expose(), + ccard.get_card_expiry_year_2_digit()?.expose(), ccard.card_exp_month.clone().expose() )) .parse::() diff --git a/crates/router/src/connector/nexinets/transformers.rs b/crates/router/src/connector/nexinets/transformers.rs index 8875abdb7868..698b2709a62d 100644 --- a/crates/router/src/connector/nexinets/transformers.rs +++ b/crates/router/src/connector/nexinets/transformers.rs @@ -643,7 +643,7 @@ fn get_card_data( Some(true) => CardDataDetails::PaymentInstrument(Box::new(PaymentInstrument { payment_instrument_id: item.request.connector_mandate_id(), })), - _ => CardDataDetails::CardDetails(Box::new(get_card_details(card))), + _ => CardDataDetails::CardDetails(Box::new(get_card_details(card)?)), }; let cof_contract = Some(CofContract { recurring_type: RecurringType::Unscheduled, @@ -651,7 +651,7 @@ fn get_card_data( (card_data, cof_contract) } false => ( - CardDataDetails::CardDetails(Box::new(get_card_details(card))), + CardDataDetails::CardDetails(Box::new(get_card_details(card)?)), None, ), }; @@ -677,13 +677,15 @@ fn get_applepay_details( }) } -fn get_card_details(req_card: &api_models::payments::Card) -> CardDetails { - CardDetails { +fn get_card_details( + req_card: &api_models::payments::Card, +) -> Result { + Ok(CardDetails { card_number: req_card.card_number.clone(), expiry_month: req_card.card_exp_month.clone(), - expiry_year: req_card.get_card_expiry_year_2_digit(), + expiry_year: req_card.get_card_expiry_year_2_digit()?, verification: req_card.card_cvc.clone(), - } + }) } fn get_wallet_details( diff --git a/crates/router/src/connector/nmi/transformers.rs b/crates/router/src/connector/nmi/transformers.rs index 931dac5a9664..b9ad5b8e1883 100644 --- a/crates/router/src/connector/nmi/transformers.rs +++ b/crates/router/src/connector/nmi/transformers.rs @@ -127,7 +127,7 @@ fn get_card_details( utils::CardData::get_card_expiry_month_year_2_digit_with_delimiter( card_details, "".to_string(), - ), + )?, card_details.card_cvc.clone(), )), _ => Err(errors::ConnectorError::NotImplemented( @@ -459,7 +459,7 @@ impl TryFrom<&api_models::payments::PaymentMethodData> for PaymentMethod { payment_method_data: &api_models::payments::PaymentMethodData, ) -> Result { match &payment_method_data { - api::PaymentMethodData::Card(ref card) => Ok(Self::from(card)), + api::PaymentMethodData::Card(ref card) => Ok(Self::try_from(card)?), api::PaymentMethodData::Wallet(ref wallet_type) => match wallet_type { api_models::payments::WalletData::GooglePay(ref googlepay_data) => { Ok(Self::from(googlepay_data)) @@ -518,18 +518,19 @@ impl TryFrom<&api_models::payments::PaymentMethodData> for PaymentMethod { } } -impl From<&api_models::payments::Card> for PaymentMethod { - fn from(card: &api_models::payments::Card) -> Self { +impl TryFrom<&api_models::payments::Card> for PaymentMethod { + type Error = Error; + fn try_from(card: &api_models::payments::Card) -> Result { let ccexp = utils::CardData::get_card_expiry_month_year_2_digit_with_delimiter( card, "".to_string(), - ); + )?; let card = CardData { ccnumber: card.card_number.clone(), ccexp, cvv: card.card_cvc.clone(), }; - Self::Card(Box::new(card)) + Ok(Self::Card(Box::new(card))) } } diff --git a/crates/router/src/connector/payeezy/transformers.rs b/crates/router/src/connector/payeezy/transformers.rs index 7ae7feba68af..c633fd3d99f9 100644 --- a/crates/router/src/connector/payeezy/transformers.rs +++ b/crates/router/src/connector/payeezy/transformers.rs @@ -246,7 +246,7 @@ fn get_payment_method_data( .clone() .unwrap_or(Secret::new("".to_string())), card_number: card.card_number.clone(), - exp_date: card.get_card_expiry_month_year_2_digit_with_delimiter("".to_string()), + exp_date: card.get_card_expiry_month_year_2_digit_with_delimiter("".to_string())?, cvv: card.card_cvc.clone(), }; Ok(PayeezyPaymentMethod::PayeezyCard(payeezy_card)) diff --git a/crates/router/src/connector/payme/transformers.rs b/crates/router/src/connector/payme/transformers.rs index a865b8fec3a9..a7b21ce292de 100644 --- a/crates/router/src/connector/payme/transformers.rs +++ b/crates/router/src/connector/payme/transformers.rs @@ -648,7 +648,7 @@ impl TryFrom<&types::PaymentsAuthorizeRouterData> for PayRequest { let card = PaymeCard { credit_card_cvv: req_card.card_cvc.clone(), credit_card_exp: req_card - .get_card_expiry_month_year_2_digit_with_delimiter("".to_string()), + .get_card_expiry_month_year_2_digit_with_delimiter("".to_string())?, credit_card_number: req_card.card_number, }; let buyer_email = item.request.get_email()?; @@ -755,7 +755,7 @@ impl TryFrom<&types::TokenizationRouterData> for CaptureBuyerRequest { let card = PaymeCard { credit_card_cvv: req_card.card_cvc.clone(), credit_card_exp: req_card - .get_card_expiry_month_year_2_digit_with_delimiter("".to_string()), + .get_card_expiry_month_year_2_digit_with_delimiter("".to_string())?, credit_card_number: req_card.card_number, }; Ok(Self { diff --git a/crates/router/src/connector/placetopay/transformers.rs b/crates/router/src/connector/placetopay/transformers.rs index 7fef8b8954ba..dfdd3f904df4 100644 --- a/crates/router/src/connector/placetopay/transformers.rs +++ b/crates/router/src/connector/placetopay/transformers.rs @@ -131,7 +131,7 @@ impl TryFrom<&PlacetopayRouterData<&types::PaymentsAuthorizeRouterData>> number: req_card.card_number.clone(), expiration: req_card .clone() - .get_card_expiry_month_year_2_digit_with_delimiter("/".to_owned()), + .get_card_expiry_month_year_2_digit_with_delimiter("/".to_owned())?, cvv: req_card.card_cvc.clone(), }; Ok(Self { diff --git a/crates/router/src/connector/powertranz/transformers.rs b/crates/router/src/connector/powertranz/transformers.rs index 005496332008..8dc3688da9eb 100644 --- a/crates/router/src/connector/powertranz/transformers.rs +++ b/crates/router/src/connector/powertranz/transformers.rs @@ -220,7 +220,7 @@ impl TryFrom<&Card> for Source { .clone() .unwrap_or(Secret::new("".to_string())), card_pan: card.card_number.clone(), - card_expiration: card.get_expiry_date_as_yymm(), + card_expiration: card.get_expiry_date_as_yymm()?, card_cvv: card.card_cvc.clone(), }; Ok(Self::Card(card)) diff --git a/crates/router/src/connector/prophetpay/transformers.rs b/crates/router/src/connector/prophetpay/transformers.rs index d05f2c3986a7..23cffa3da229 100644 --- a/crates/router/src/connector/prophetpay/transformers.rs +++ b/crates/router/src/connector/prophetpay/transformers.rs @@ -293,10 +293,19 @@ fn get_card_token( let values = param.peek().split('&').collect::>(); for value in values { let pair = value.split('=').collect::>(); - queries.insert(pair[0].to_string(), pair[1].to_string()); + queries.insert( + pair.first() + .ok_or(errors::ConnectorError::ResponseDeserializationFailed)? + .to_string(), + pair.get(1) + .ok_or(errors::ConnectorError::ResponseDeserializationFailed)? + .to_string(), + ); } - queries + Ok(queries) }) + .transpose() + .into_report()? .ok_or(errors::ConnectorError::ResponseDeserializationFailed)?; for (key, val) in queries_params { @@ -307,8 +316,8 @@ fn get_card_token( Err(errors::ConnectorError::MissingRequiredField { field_name: "card_token", - }) - .into_report() + } + .into()) } #[derive(Debug, Clone, Serialize)] diff --git a/crates/router/src/connector/stax/transformers.rs b/crates/router/src/connector/stax/transformers.rs index 081be000cf6c..01ae751f7487 100644 --- a/crates/router/src/connector/stax/transformers.rs +++ b/crates/router/src/connector/stax/transformers.rs @@ -225,7 +225,7 @@ impl TryFrom<&types::TokenizationRouterData> for StaxTokenRequest { api::PaymentMethodData::Card(card_data) => { let stax_card_data = StaxTokenizeData { card_exp: card_data - .get_card_expiry_month_year_2_digit_with_delimiter("".to_string()), + .get_card_expiry_month_year_2_digit_with_delimiter("".to_string())?, person_name: card_data .card_holder_name .unwrap_or(Secret::new("".to_string())), diff --git a/crates/router/src/connector/stripe/transformers.rs b/crates/router/src/connector/stripe/transformers.rs index 3a28f777907f..b044331379a1 100644 --- a/crates/router/src/connector/stripe/transformers.rs +++ b/crates/router/src/connector/stripe/transformers.rs @@ -3649,7 +3649,10 @@ mod test_validate_shipping_address_against_payment_method { assert!(result.is_err()); let missing_fields = get_missing_fields(result.unwrap_err().current_context()).to_owned(); assert_eq!(missing_fields.len(), 1); - assert_eq!(missing_fields[0], "shipping.address.first_name"); + assert_eq!( + *missing_fields.first().unwrap(), + "shipping.address.first_name" + ); } #[test] @@ -3674,7 +3677,7 @@ mod test_validate_shipping_address_against_payment_method { assert!(result.is_err()); let missing_fields = get_missing_fields(result.unwrap_err().current_context()).to_owned(); assert_eq!(missing_fields.len(), 1); - assert_eq!(missing_fields[0], "shipping.address.line1"); + assert_eq!(*missing_fields.first().unwrap(), "shipping.address.line1"); } #[test] @@ -3699,7 +3702,7 @@ mod test_validate_shipping_address_against_payment_method { assert!(result.is_err()); let missing_fields = get_missing_fields(result.unwrap_err().current_context()).to_owned(); assert_eq!(missing_fields.len(), 1); - assert_eq!(missing_fields[0], "shipping.address.country"); + assert_eq!(*missing_fields.first().unwrap(), "shipping.address.country"); } #[test] @@ -3723,7 +3726,7 @@ mod test_validate_shipping_address_against_payment_method { assert!(result.is_err()); let missing_fields = get_missing_fields(result.unwrap_err().current_context()).to_owned(); assert_eq!(missing_fields.len(), 1); - assert_eq!(missing_fields[0], "shipping.address.zip"); + assert_eq!(*missing_fields.first().unwrap(), "shipping.address.zip"); } #[test] diff --git a/crates/router/src/connector/trustpay/transformers.rs b/crates/router/src/connector/trustpay/transformers.rs index 8ae12622fb06..87d98c1b1bee 100644 --- a/crates/router/src/connector/trustpay/transformers.rs +++ b/crates/router/src/connector/trustpay/transformers.rs @@ -297,7 +297,7 @@ fn get_card_request_data( currency: item.request.currency.to_string(), pan: ccard.card_number.clone(), cvv: ccard.card_cvc.clone(), - expiry_date: ccard.get_card_expiry_month_year_2_digit_with_delimiter("/".to_owned()), + expiry_date: ccard.get_card_expiry_month_year_2_digit_with_delimiter("/".to_owned())?, cardholder: get_full_name(params.billing_first_name, billing_last_name), reference: item.connector_request_reference_id.clone(), redirect_url: return_url, diff --git a/crates/router/src/connector/tsys/transformers.rs b/crates/router/src/connector/tsys/transformers.rs index 8c9c6cd43df4..dd700d11bcbe 100644 --- a/crates/router/src/connector/tsys/transformers.rs +++ b/crates/router/src/connector/tsys/transformers.rs @@ -52,7 +52,7 @@ impl TryFrom<&types::PaymentsAuthorizeRouterData> for TsysPaymentsRequest { currency_code: item.request.currency, card_number: ccard.card_number.clone(), expiration_date: ccard - .get_card_expiry_month_year_2_digit_with_delimiter("/".to_owned()), + .get_card_expiry_month_year_2_digit_with_delimiter("/".to_owned())?, cvv2: ccard.card_cvc, terminal_capability: "ICC_CHIP_READ_ONLY".to_string(), terminal_operating_environment: "ON_MERCHANT_PREMISES_ATTENDED".to_string(), diff --git a/crates/router/src/connector/utils.rs b/crates/router/src/connector/utils.rs index 9a538a7207e9..24def6253726 100644 --- a/crates/router/src/connector/utils.rs +++ b/crates/router/src/connector/utils.rs @@ -757,23 +757,27 @@ pub enum CardIssuer { } pub trait CardData { - fn get_card_expiry_year_2_digit(&self) -> Secret; + fn get_card_expiry_year_2_digit(&self) -> Result, errors::ConnectorError>; fn get_card_issuer(&self) -> Result; fn get_card_expiry_month_year_2_digit_with_delimiter( &self, delimiter: String, - ) -> Secret; + ) -> Result, errors::ConnectorError>; fn get_expiry_date_as_yyyymm(&self, delimiter: &str) -> Secret; fn get_expiry_date_as_mmyyyy(&self, delimiter: &str) -> Secret; fn get_expiry_year_4_digit(&self) -> Secret; - fn get_expiry_date_as_yymm(&self) -> Secret; + fn get_expiry_date_as_yymm(&self) -> Result, errors::ConnectorError>; } impl CardData for api::Card { - fn get_card_expiry_year_2_digit(&self) -> Secret { + fn get_card_expiry_year_2_digit(&self) -> Result, errors::ConnectorError> { let binding = self.card_exp_year.clone(); let year = binding.peek(); - Secret::new(year[year.len() - 2..].to_string()) + Ok(Secret::new( + year.get(year.len() - 2..) + .ok_or(errors::ConnectorError::RequestEncodingFailed)? + .to_string(), + )) } fn get_card_issuer(&self) -> Result { get_card_issuer(self.card_number.peek()) @@ -781,14 +785,14 @@ impl CardData for api::Card { fn get_card_expiry_month_year_2_digit_with_delimiter( &self, delimiter: String, - ) -> Secret { - let year = self.get_card_expiry_year_2_digit(); - Secret::new(format!( + ) -> Result, errors::ConnectorError> { + let year = self.get_card_expiry_year_2_digit()?; + Ok(Secret::new(format!( "{}{}{}", self.card_exp_month.peek().clone(), delimiter, year.peek() - )) + ))) } fn get_expiry_date_as_yyyymm(&self, delimiter: &str) -> Secret { let year = self.get_expiry_year_4_digit(); @@ -815,10 +819,10 @@ impl CardData for api::Card { } Secret::new(year) } - fn get_expiry_date_as_yymm(&self) -> Secret { - let year = self.get_card_expiry_year_2_digit().expose(); + fn get_expiry_date_as_yymm(&self) -> Result, errors::ConnectorError> { + let year = self.get_card_expiry_year_2_digit()?.expose(); let month = self.card_exp_month.clone().expose(); - Secret::new(format!("{year}{month}")) + Ok(Secret::new(format!("{year}{month}"))) } } diff --git a/crates/router/src/connector/worldline/transformers.rs b/crates/router/src/connector/worldline/transformers.rs index b657756b6a86..c00913aa57d1 100644 --- a/crates/router/src/connector/worldline/transformers.rs +++ b/crates/router/src/connector/worldline/transformers.rs @@ -346,7 +346,9 @@ fn make_card_request( let secret_value = format!( "{}{}", ccard.card_exp_month.peek(), - &expiry_year[expiry_year.len() - 2..] + &expiry_year + .get(expiry_year.len() - 2..) + .ok_or(errors::ConnectorError::RequestEncodingFailed)? ); let expiry_date: Secret = Secret::new(secret_value); let card = Card { diff --git a/crates/router/src/connector/zen/transformers.rs b/crates/router/src/connector/zen/transformers.rs index c66b098fe751..7ea6953a3f2e 100644 --- a/crates/router/src/connector/zen/transformers.rs +++ b/crates/router/src/connector/zen/transformers.rs @@ -222,7 +222,7 @@ impl TryFrom<(&ZenRouterData<&types::PaymentsAuthorizeRouterData>, &Card)> for Z card: Some(ZenCardDetails { number: ccard.card_number.clone(), expiry_date: ccard - .get_card_expiry_month_year_2_digit_with_delimiter("".to_owned()), + .get_card_expiry_month_year_2_digit_with_delimiter("".to_owned())?, cvv: ccard.card_cvc.clone(), }), descriptor: item @@ -538,7 +538,7 @@ fn get_checkout_signature( .pay_wall_secret .clone() .ok_or(errors::ConnectorError::RequestEncodingFailed)?; - let mut signature_data = get_signature_data(checkout_request); + let mut signature_data = get_signature_data(checkout_request)?; signature_data.push_str(&pay_wall_secret); let payload_digest = digest::digest(&digest::SHA256, signature_data.as_bytes()); let mut signature = hex::encode(payload_digest); @@ -547,7 +547,9 @@ fn get_checkout_signature( } /// Fields should be in alphabetical order -fn get_signature_data(checkout_request: &CheckoutRequest) -> String { +fn get_signature_data( + checkout_request: &CheckoutRequest, +) -> Result { let specified_payment_channel = match checkout_request.specified_payment_channel { ZenPaymentChannels::PclCard => "pcl_card", ZenPaymentChannels::PclGooglepay => "pcl_googlepay", @@ -568,21 +570,19 @@ fn get_signature_data(checkout_request: &CheckoutRequest) -> String { ]; for index in 0..checkout_request.items.len() { let prefix = format!("items[{index}]."); + let checkout_request_items = checkout_request + .items + .get(index) + .ok_or(errors::ConnectorError::RequestEncodingFailed)?; signature_data.push(format!( "{prefix}lineamounttotal={}", - checkout_request.items[index].line_amount_total - )); - signature_data.push(format!( - "{prefix}name={}", - checkout_request.items[index].name - )); - signature_data.push(format!( - "{prefix}price={}", - checkout_request.items[index].price + checkout_request_items.line_amount_total )); + signature_data.push(format!("{prefix}name={}", checkout_request_items.name)); + signature_data.push(format!("{prefix}price={}", checkout_request_items.price)); signature_data.push(format!( "{prefix}quantity={}", - checkout_request.items[index].quantity + checkout_request_items.quantity )); } signature_data.push(format!( @@ -598,7 +598,7 @@ fn get_signature_data(checkout_request: &CheckoutRequest) -> String { )); signature_data.push(format!("urlredirect={}", checkout_request.url_redirect)); let signature = signature_data.join("&"); - signature.to_lowercase() + Ok(signature.to_lowercase()) } fn get_customer( diff --git a/crates/router/src/core/payments/helpers.rs b/crates/router/src/core/payments/helpers.rs index 2cd62fbd4914..08e2e5dab1ae 100644 --- a/crates/router/src/core/payments/helpers.rs +++ b/crates/router/src/core/payments/helpers.rs @@ -3621,8 +3621,12 @@ impl ApplePayData { .into_report() .change_context(errors::ApplePayDecryptionError::Base64DecodingFailed)?; let iv = [0u8; 16]; //Initialization vector IV is typically used in AES-GCM (Galois/Counter Mode) encryption for randomizing the encryption process. - let ciphertext = &data[..data.len() - 16]; - let tag = &data[data.len() - 16..]; + let ciphertext = data + .get(..data.len() - 16) + .ok_or(errors::ApplePayDecryptionError::DecryptionFailed)?; + let tag = data + .get(data.len() - 16..) + .ok_or(errors::ApplePayDecryptionError::DecryptionFailed)?; let cipher = Cipher::aes_256_gcm(); let decrypted_data = decrypt_aead(cipher, symmetric_key, Some(&iv), &[], ciphertext, tag) .into_report() diff --git a/crates/router/src/services/encryption.rs b/crates/router/src/services/encryption.rs index acea96f86607..9a8a5f4af4a9 100644 --- a/crates/router/src/services/encryption.rs +++ b/crates/router/src/services/encryption.rs @@ -1,9 +1,7 @@ -use std::{num::Wrapping, str}; +use std::str; use error_stack::{report, IntoReport, ResultExt}; use josekit::{jwe, jws}; -use rand; -use ring::{aead::*, error::Unspecified}; use serde::{Deserialize, Serialize}; use crate::{ @@ -11,44 +9,6 @@ use crate::{ utils, }; -struct NonceGen { - current: Wrapping, - start: u128, -} - -impl NonceGen { - fn new(start: [u8; 12]) -> Self { - let mut array = [0; 16]; - array[..12].copy_from_slice(&start); - let start = if cfg!(target_endian = "little") { - u128::from_le_bytes(array) - } else { - u128::from_be_bytes(array) - }; - Self { - current: Wrapping(start), - start, - } - } -} - -impl NonceSequence for NonceGen { - fn advance(&mut self) -> Result { - let n = self.current.0; - self.current += 1; - if self.current.0 == self.start { - return Err(Unspecified); - } - let value = if cfg!(target_endian = "little") { - n.to_le_bytes()[..12].try_into()? - } else { - n.to_be_bytes()[..12].try_into()? - }; - let nonce = Nonce::assume_unique_for_key(value); - Ok(nonce) - } -} - #[derive(Debug, Clone, Serialize, Deserialize)] pub struct JwsBody { pub header: String, @@ -66,57 +26,6 @@ pub struct JweBody { pub encrypted_key: String, } -pub fn encrypt(msg: &String, key: &[u8]) -> CustomResult, errors::EncryptionError> { - let nonce_seed = rand::random(); - let mut sealing_key = { - let key = UnboundKey::new(&AES_256_GCM, key) - .map_err(errors::EncryptionError::from) - .into_report() - .attach_printable("Unbound Key Error")?; - let nonce_gen = NonceGen::new(nonce_seed); - SealingKey::new(key, nonce_gen) - }; - let msg_byte = msg.as_bytes(); - let mut data = msg_byte.to_vec(); - - sealing_key - .seal_in_place_append_tag(Aad::empty(), &mut data) - .map_err(errors::EncryptionError::from) - .into_report() - .attach_printable("Error Encrypting")?; - let nonce_vec = nonce_seed.to_vec(); - data.splice(0..0, nonce_vec); //prepend nonce at the start - Ok(data) -} - -pub fn decrypt(mut data: Vec, key: &[u8]) -> CustomResult { - let nonce_seed = data[0..12] - .try_into() - .into_report() - .change_context(errors::EncryptionError) - .attach_printable("Error getting nonce")?; - data.drain(0..12); - - let mut opening_key = { - let key = UnboundKey::new(&AES_256_GCM, key) - .map_err(errors::EncryptionError::from) - .into_report() - .attach_printable("Unbound Key Error")?; - let nonce_gen = NonceGen::new(nonce_seed); - OpeningKey::new(key, nonce_gen) - }; - let res_byte = opening_key - .open_in_place(Aad::empty(), &mut data) - .map_err(errors::EncryptionError::from) - .into_report() - .attach_printable("Error Decrypting")?; - let response = str::from_utf8_mut(res_byte) - .into_report() - .change_context(errors::EncryptionError) - .attach_printable("Error from_utf8")?; - Ok(response.to_string()) -} - pub async fn encrypt_jwe( payload: &[u8], public_key: impl AsRef<[u8]>, @@ -220,7 +129,6 @@ mod tests { #![allow(clippy::unwrap_used, clippy::expect_used)] use super::*; - use crate::utils::{self, ValueExt}; // Keys used for tests // Can be generated using the following commands: @@ -308,21 +216,6 @@ VuY3OeNxi+dC2r7HppP3O/MJ4gX/RJJfSrcaGP8/Ke1W5+jE97Qy -----END RSA PRIVATE KEY----- "; - fn generate_key() -> [u8; 32] { - let key: [u8; 32] = rand::random(); - key - } - - #[test] - fn test_enc() { - let key = generate_key(); - let enc_data = encrypt(&"Test_Encrypt".to_string(), &key).unwrap(); - let card_info = utils::Encode::>::encode_to_value(&enc_data).unwrap(); - let data: Vec = card_info.parse_value("ParseEncryptedData").unwrap(); - let dec_data = decrypt(data, &key).unwrap(); - assert_eq!(dec_data, "Test_Encrypt".to_string()); - } - #[actix_rt::test] async fn test_jwe() { let jwt = encrypt_jwe("request_payload".as_bytes(), ENCRYPTION_KEY) diff --git a/crates/router/src/workflows/payment_sync.rs b/crates/router/src/workflows/payment_sync.rs index 43567ce27e23..b2296e17f70d 100644 --- a/crates/router/src/workflows/payment_sync.rs +++ b/crates/router/src/workflows/payment_sync.rs @@ -301,7 +301,10 @@ mod tests { let cpt_default = process_data::ConnectorPTMapping::default().default_mapping; assert_eq!( vec![schedule_time_delta, first_retry_time_delta], - vec![cpt_default.start_after, cpt_default.frequency[0]] + vec![ + cpt_default.start_after, + *cpt_default.frequency.first().unwrap() + ] ); } } diff --git a/crates/router/tests/integration_demo.rs b/crates/router/tests/integration_demo.rs index 5d2c4a7943b4..777e0a682985 100644 --- a/crates/router/tests/integration_demo.rs +++ b/crates/router/tests/integration_demo.rs @@ -153,7 +153,7 @@ async fn exceed_refund() { let message: serde_json::Value = user_client.create_refund(&server, &payment_id, 100).await; assert_eq!( - message["error"]["message"], + message.get("error").unwrap().get("message").unwrap(), "The refund amount exceeds the amount captured." ); } diff --git a/crates/router/tests/refunds.rs b/crates/router/tests/refunds.rs index 6b9dfd5ed4a2..8d6a158cdff2 100644 --- a/crates/router/tests/refunds.rs +++ b/crates/router/tests/refunds.rs @@ -19,7 +19,7 @@ async fn refund_create_fail_stripe() { let payment_id = format!("test_{}", uuid::Uuid::new_v4()); let refund: serde_json::Value = user_client.create_refund(&app, &payment_id, 10).await; - assert_eq!(refund["error"]["message"], "Access forbidden, invalid API key was used. Please create your new API key from the Dashboard Settings section."); + assert_eq!(refund.get("error").unwrap().get("message").unwrap(), "Access forbidden, invalid API key was used. Please create your new API key from the Dashboard Settings section."); } #[actix_web::test] @@ -33,7 +33,7 @@ async fn refund_create_fail_adyen() { let payment_id = format!("test_{}", uuid::Uuid::new_v4()); let refund: serde_json::Value = user_client.create_refund(&app, &payment_id, 10).await; - assert_eq!(refund["error"]["message"], "Access forbidden, invalid API key was used. Please create your new API key from the Dashboard Settings section."); + assert_eq!(refund.get("error").unwrap().get("message").unwrap(), "Access forbidden, invalid API key was used. Please create your new API key from the Dashboard Settings section."); } #[actix_web::test] diff --git a/crates/router_env/src/logger/storage.rs b/crates/router_env/src/logger/storage.rs index 04f00f71cb3e..51e701213b9c 100644 --- a/crates/router_env/src/logger/storage.rs +++ b/crates/router_env/src/logger/storage.rs @@ -77,8 +77,12 @@ impl Visit for Storage<'_> { // Skip fields which are already handled name if name.starts_with("log.") => (), name if name.starts_with("r#") => { - self.values - .insert(&name[2..], serde_json::Value::from(format!("{value:?}"))); + self.values.insert( + #[allow(clippy::expect_used)] + name.get(2..) + .expect("field name must have a minimum of two characters"), + serde_json::Value::from(format!("{value:?}")), + ); } name => { self.values @@ -88,12 +92,12 @@ impl Visit for Storage<'_> { } } -#[allow(clippy::expect_used)] impl tracing_subscriber::registry::LookupSpan<'a>> Layer for StorageSubscription { /// On new span. fn on_new_span(&self, attrs: &Attributes<'_>, id: &Id, ctx: Context<'_, S>) { + #[allow(clippy::expect_used)] let span = ctx.span(id).expect("No span"); let mut visitor = if let Some(parent_span) = span.parent() { @@ -113,8 +117,10 @@ impl tracing_subscriber::registry::LookupSpan<'a>> Layer /// On additional key value pairs store it. fn on_record(&self, span: &Id, values: &Record<'_>, ctx: Context<'_, S>) { + #[allow(clippy::expect_used)] let span = ctx.span(span).expect("No span"); let mut extensions = span.extensions_mut(); + #[allow(clippy::expect_used)] let visitor = extensions .get_mut::>() .expect("The span does not have storage"); @@ -123,6 +129,7 @@ impl tracing_subscriber::registry::LookupSpan<'a>> Layer /// On enter store time. fn on_enter(&self, span: &Id, ctx: Context<'_, S>) { + #[allow(clippy::expect_used)] let span = ctx.span(span).expect("No span"); let mut extensions = span.extensions_mut(); if extensions.get_mut::().is_none() { @@ -132,6 +139,7 @@ impl tracing_subscriber::registry::LookupSpan<'a>> Layer /// On close create an entry about how long did it take. fn on_close(&self, span: Id, ctx: Context<'_, S>) { + #[allow(clippy::expect_used)] let span = ctx.span(&span).expect("No span"); let elapsed_milliseconds = { @@ -143,6 +151,7 @@ impl tracing_subscriber::registry::LookupSpan<'a>> Layer }; let mut extensions_mut = span.extensions_mut(); + #[allow(clippy::expect_used)] let visitor = extensions_mut .get_mut::>() .expect("No visitor in extensions"); diff --git a/crates/test_utils/tests/connectors/selenium.rs b/crates/test_utils/tests/connectors/selenium.rs index 865cd950f764..303d4cd7ccbf 100644 --- a/crates/test_utils/tests/connectors/selenium.rs +++ b/crates/test_utils/tests/connectors/selenium.rs @@ -397,7 +397,7 @@ pub trait SeleniumTest { ) -> Result<(), WebDriverError> { let config = self.get_configs().automation_configs.unwrap(); if config.run_minimum_steps.unwrap() { - self.complete_actions(&web_driver, actions[..3].to_vec()) + self.complete_actions(&web_driver, actions.get(..3).unwrap().to_vec()) .await } else { self.complete_actions(&web_driver, actions).await @@ -538,7 +538,7 @@ pub trait SeleniumTest { let response = client.get(outgoing_webhook_url).send().await.unwrap(); // get events from outgoing webhook endpoint let body_text = response.text().await.unwrap(); let data: WebhookResponse = serde_json::from_str(&body_text).unwrap(); - let last_three_events = &data.data[data.data.len().saturating_sub(3)..]; // Get the last three elements if available + let last_three_events = data.data.get(data.data.len().saturating_sub(3)..).unwrap(); // Get the last three elements if available for last_event in last_three_events { let last_event_body = &last_event.step.request.body; let decoded_bytes = base64::engine::general_purpose::STANDARD //decode the encoded outgoing webhook event @@ -762,7 +762,7 @@ macro_rules! function { std::any::type_name::() } let name = type_name_of(f); - &name[..name.len() - 3] + &name.get(..name.len() - 3).unwrap() }}; } @@ -812,8 +812,14 @@ pub fn should_ignore_test(name: &str) -> bool { let tests_to_ignore: HashSet = serde_json::from_value(conf).unwrap_or_else(|_| HashSet::new()); let modules: Vec<_> = name.split("::").collect(); - let file_match = format!("{}::*", <&str>::clone(&modules[1])); - let module_name = modules[1..3].join("::"); + let file_match = format!( + "{}::*", + <&str>::clone(modules.get(1).expect("Error obtaining module path segment")) + ); + let module_name = modules + .get(1..3) + .expect("Error obtaining module path segment") + .join("::"); // Ignore if it matches patterns like nuvei_ui::*, nuvei_ui::should_make_nuvei_eps_payment_test tests_to_ignore.contains(&file_match) || tests_to_ignore.contains(&module_name) } From 1d26df28bc5e1db359272b40adae70bfba9b7360 Mon Sep 17 00:00:00 2001 From: harsh-sharma-juspay <125131007+harsh-sharma-juspay@users.noreply.github.com> Date: Fri, 5 Jan 2024 16:01:56 +0530 Subject: [PATCH 10/19] feat(analytics): adding outgoing webhooks kafka event (#3140) Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com> --- config/config.example.toml | 13 ++- config/development.toml | 1 + config/docker_compose.toml | 1 + .../scripts/outgoing_webhook_events.sql | 109 +++++++++++++++++ crates/router/src/core/errors.rs | 2 +- crates/router/src/core/webhooks.rs | 37 +++++- crates/router/src/events.rs | 2 + .../src/events/outgoing_webhook_logs.rs | 110 ++++++++++++++++++ crates/router/src/services/kafka.rs | 4 + 9 files changed, 268 insertions(+), 11 deletions(-) create mode 100644 crates/analytics/docs/clickhouse/scripts/outgoing_webhook_events.sql create mode 100644 crates/router/src/events/outgoing_webhook_logs.rs diff --git a/config/config.example.toml b/config/config.example.toml index f9ae71d3b9ee..21a3ba6de93c 100644 --- a/config/config.example.toml +++ b/config/config.example.toml @@ -524,9 +524,10 @@ enabled = true # Switch to enable or disable PayPal onboarding source = "logs" # The event sink to push events supports kafka or logs (stdout) [events.kafka] -brokers = [] # Kafka broker urls for bootstrapping the client -intent_analytics_topic = "topic" # Kafka topic to be used for PaymentIntent events -attempt_analytics_topic = "topic" # Kafka topic to be used for PaymentAttempt events -refund_analytics_topic = "topic" # Kafka topic to be used for Refund events -api_logs_topic = "topic" # Kafka topic to be used for incoming api events -connector_logs_topic = "topic" # Kafka topic to be used for connector api events \ No newline at end of file +brokers = [] # Kafka broker urls for bootstrapping the client +intent_analytics_topic = "topic" # Kafka topic to be used for PaymentIntent events +attempt_analytics_topic = "topic" # Kafka topic to be used for PaymentAttempt events +refund_analytics_topic = "topic" # Kafka topic to be used for Refund events +api_logs_topic = "topic" # Kafka topic to be used for incoming api events +connector_logs_topic = "topic" # Kafka topic to be used for connector api events +outgoing_webhook_logs_topic = "topic" # Kafka topic to be used for outgoing webhook events diff --git a/config/development.toml b/config/development.toml index 6e7e040906a5..80d594b248bd 100644 --- a/config/development.toml +++ b/config/development.toml @@ -519,6 +519,7 @@ attempt_analytics_topic = "hyperswitch-payment-attempt-events" refund_analytics_topic = "hyperswitch-refund-events" api_logs_topic = "hyperswitch-api-log-events" connector_logs_topic = "hyperswitch-connector-api-events" +outgoing_webhook_logs_topic = "hyperswitch-outgoing-webhook-events" [analytics] source = "sqlx" diff --git a/config/docker_compose.toml b/config/docker_compose.toml index 63be7339c7bc..1d3c845aa54f 100644 --- a/config/docker_compose.toml +++ b/config/docker_compose.toml @@ -366,6 +366,7 @@ attempt_analytics_topic = "hyperswitch-payment-attempt-events" refund_analytics_topic = "hyperswitch-refund-events" api_logs_topic = "hyperswitch-api-log-events" connector_logs_topic = "hyperswitch-connector-api-events" +outgoing_webhook_logs_topic = "hyperswitch-outgoing-webhook-events" [analytics] source = "sqlx" diff --git a/crates/analytics/docs/clickhouse/scripts/outgoing_webhook_events.sql b/crates/analytics/docs/clickhouse/scripts/outgoing_webhook_events.sql new file mode 100644 index 000000000000..3dc907629d0a --- /dev/null +++ b/crates/analytics/docs/clickhouse/scripts/outgoing_webhook_events.sql @@ -0,0 +1,109 @@ +CREATE TABLE + outgoing_webhook_events_queue ( + `merchant_id` String, + `event_id` Nullable(String), + `event_type` LowCardinality(String), + `outgoing_webhook_event_type` LowCardinality(String), + `payment_id` Nullable(String), + `refund_id` Nullable(String), + `attempt_id` Nullable(String), + `dispute_id` Nullable(String), + `payment_method_id` Nullable(String), + `mandate_id` Nullable(String), + `content` Nullable(String), + `is_error` Bool, + `error` Nullable(String), + `created_at_timestamp` DateTime64(3) + ) ENGINE = Kafka SETTINGS kafka_broker_list = 'kafka0:29092', + kafka_topic_list = 'hyperswitch-outgoing-webhook-events', + kafka_group_name = 'hyper-c1', + kafka_format = 'JSONEachRow', + kafka_handle_error_mode = 'stream'; + +CREATE TABLE + outgoing_webhook_events_cluster ( + `merchant_id` String, + `event_id` String, + `event_type` LowCardinality(String), + `outgoing_webhook_event_type` LowCardinality(String), + `payment_id` Nullable(String), + `refund_id` Nullable(String), + `attempt_id` Nullable(String), + `dispute_id` Nullable(String), + `payment_method_id` Nullable(String), + `mandate_id` Nullable(String), + `content` Nullable(String), + `is_error` Bool, + `error` Nullable(String), + `created_at_timestamp` DateTime64(3), + `inserted_at` DateTime DEFAULT now() CODEC(T64, LZ4), + INDEX eventIndex event_type TYPE bloom_filter GRANULARITY 1, + INDEX webhookeventIndex outgoing_webhook_event_type TYPE bloom_filter GRANULARITY 1 + ) ENGINE = MergeTree PARTITION BY toStartOfDay(created_at_timestamp) +ORDER BY ( + created_at_timestamp, + merchant_id, + event_id, + event_type, + outgoing_webhook_event_type + ) TTL inserted_at + toIntervalMonth(6); + +CREATE MATERIALIZED VIEW outgoing_webhook_events_mv TO outgoing_webhook_events_cluster ( + `merchant_id` String, + `event_id` Nullable(String), + `event_type` LowCardinality(String), + `outgoing_webhook_event_type` LowCardinality(String), + `payment_id` Nullable(String), + `refund_id` Nullable(String), + `attempt_id` Nullable(String), + `dispute_id` Nullable(String), + `payment_method_id` Nullable(String), + `mandate_id` Nullable(String), + `content` Nullable(String), + `is_error` Bool, + `error` Nullable(String), + `created_at_timestamp` DateTime64(3), + `inserted_at` DateTime DEFAULT now() CODEC(T64, LZ4), +) AS +SELECT + merchant_id, + event_id, + event_type, + outgoing_webhook_event_type, + payment_id, + refund_id, + attempt_id, + dispute_id, + payment_method_id, + mandate_id, + content, + is_error, + error, + created_at_timestamp, + now() AS inserted_at +FROM + outgoing_webhook_events_queue +where length(_error) = 0; + +CREATE MATERIALIZED VIEW outgoing_webhook_parse_errors ( + `topic` String, + `partition` Int64, + `offset` Int64, + `raw` String, + `error` String +) ENGINE = MergeTree +ORDER BY ( + topic, partition, + offset + ) SETTINGS index_granularity = 8192 AS +SELECT + _topic AS topic, + _partition AS partition, + _offset AS +offset +, + _raw_message AS raw, + _error AS error +FROM + outgoing_webhook_events_queue +WHERE length(_error) > 0; \ No newline at end of file diff --git a/crates/router/src/core/errors.rs b/crates/router/src/core/errors.rs index 054f4053504e..cbc4290f63bb 100644 --- a/crates/router/src/core/errors.rs +++ b/crates/router/src/core/errors.rs @@ -226,7 +226,7 @@ pub enum KmsError { Utf8DecodingFailed, } -#[derive(Debug, thiserror::Error)] +#[derive(Debug, thiserror::Error, serde::Serialize)] pub enum WebhooksFlowError { #[error("Merchant webhook config not found")] MerchantConfigNotFound, diff --git a/crates/router/src/core/webhooks.rs b/crates/router/src/core/webhooks.rs index 762ee19b6415..c7e7548f00bd 100644 --- a/crates/router/src/core/webhooks.rs +++ b/crates/router/src/core/webhooks.rs @@ -25,7 +25,10 @@ use crate::{ payments, refunds, }, db::StorageInterface, - events::api_logs::ApiEvent, + events::{ + api_logs::ApiEvent, + outgoing_webhook_logs::{OutgoingWebhookEvent, OutgoingWebhookEventMetric}, + }, logger, routes::{app::AppStateInfo, lock_utils, metrics::request::add_attributes, AppState}, services::{self, authentication as auth}, @@ -731,21 +734,47 @@ pub async fn create_event_and_trigger_outgoing_webhook(business_profile, outgoing_webhook, state).await; if let Err(e) = result { + error.replace( + serde_json::to_value(e.current_context()) + .into_report() + .attach_printable("Failed to serialize json error response") + .change_context(errors::ApiErrorResponse::WebhookProcessingFailure) + .ok() + .into(), + ); logger::error!(?e); } + let outgoing_webhook_event_type = content.get_outgoing_webhook_event_type(); + let webhook_event = OutgoingWebhookEvent::new( + merchant_account.merchant_id.clone(), + event.event_id.clone(), + event_type, + outgoing_webhook_event_type, + error.is_some(), + error, + ); + match webhook_event.clone().try_into() { + Ok(event) => { + state_clone.event_handler().log_event(event); + } + Err(err) => { + logger::error!(error=?err, event=?webhook_event, "Error Logging Outgoing Webhook Event"); + } + } }); } diff --git a/crates/router/src/events.rs b/crates/router/src/events.rs index 2dc9258e19df..0091de588f13 100644 --- a/crates/router/src/events.rs +++ b/crates/router/src/events.rs @@ -9,6 +9,7 @@ pub mod api_logs; pub mod connector_api_logs; pub mod event_logger; pub mod kafka_handler; +pub mod outgoing_webhook_logs; pub(super) trait EventHandler: Sync + Send + dyn_clone::DynClone { fn log_event(&self, event: RawEvent); @@ -31,6 +32,7 @@ pub enum EventType { Refund, ApiLogs, ConnectorApiLogs, + OutgoingWebhookLogs, } #[derive(Debug, Default, Deserialize, Clone)] diff --git a/crates/router/src/events/outgoing_webhook_logs.rs b/crates/router/src/events/outgoing_webhook_logs.rs new file mode 100644 index 000000000000..ebf36caf706e --- /dev/null +++ b/crates/router/src/events/outgoing_webhook_logs.rs @@ -0,0 +1,110 @@ +use api_models::{enums::EventType as OutgoingWebhookEventType, webhooks::OutgoingWebhookContent}; +use serde::Serialize; +use serde_json::Value; +use time::OffsetDateTime; + +use super::{EventType, RawEvent}; + +#[derive(Clone, Debug, PartialEq, Serialize)] +#[serde(rename_all = "snake_case")] +pub struct OutgoingWebhookEvent { + merchant_id: String, + event_id: String, + event_type: OutgoingWebhookEventType, + #[serde(flatten)] + content: Option, + is_error: bool, + error: Option, + created_at_timestamp: i128, +} + +#[derive(Clone, Debug, PartialEq, Serialize)] +#[serde(tag = "outgoing_webhook_event_type", rename_all = "snake_case")] +pub enum OutgoingWebhookEventContent { + Payment { + payment_id: Option, + content: Value, + }, + Refund { + payment_id: String, + refund_id: String, + content: Value, + }, + Dispute { + payment_id: String, + attempt_id: String, + dispute_id: String, + content: Value, + }, + Mandate { + payment_method_id: String, + mandate_id: String, + content: Value, + }, +} +pub trait OutgoingWebhookEventMetric { + fn get_outgoing_webhook_event_type(&self) -> Option; +} +impl OutgoingWebhookEventMetric for OutgoingWebhookContent { + fn get_outgoing_webhook_event_type(&self) -> Option { + match self { + Self::PaymentDetails(payment_payload) => Some(OutgoingWebhookEventContent::Payment { + payment_id: payment_payload.payment_id.clone(), + content: masking::masked_serialize(&payment_payload) + .unwrap_or(serde_json::json!({"error":"failed to serialize"})), + }), + Self::RefundDetails(refund_payload) => Some(OutgoingWebhookEventContent::Refund { + payment_id: refund_payload.payment_id.clone(), + refund_id: refund_payload.refund_id.clone(), + content: masking::masked_serialize(&refund_payload) + .unwrap_or(serde_json::json!({"error":"failed to serialize"})), + }), + Self::DisputeDetails(dispute_payload) => Some(OutgoingWebhookEventContent::Dispute { + payment_id: dispute_payload.payment_id.clone(), + attempt_id: dispute_payload.attempt_id.clone(), + dispute_id: dispute_payload.dispute_id.clone(), + content: masking::masked_serialize(&dispute_payload) + .unwrap_or(serde_json::json!({"error":"failed to serialize"})), + }), + Self::MandateDetails(mandate_payload) => Some(OutgoingWebhookEventContent::Mandate { + payment_method_id: mandate_payload.payment_method_id.clone(), + mandate_id: mandate_payload.mandate_id.clone(), + content: masking::masked_serialize(&mandate_payload) + .unwrap_or(serde_json::json!({"error":"failed to serialize"})), + }), + } + } +} + +impl OutgoingWebhookEvent { + pub fn new( + merchant_id: String, + event_id: String, + event_type: OutgoingWebhookEventType, + content: Option, + is_error: bool, + error: Option, + ) -> Self { + Self { + merchant_id, + event_id, + event_type, + content, + is_error, + error, + created_at_timestamp: OffsetDateTime::now_utc().unix_timestamp_nanos() / 1_000_000, + } + } +} + +impl TryFrom for RawEvent { + type Error = serde_json::Error; + + fn try_from(value: OutgoingWebhookEvent) -> Result { + Ok(Self { + event_type: EventType::OutgoingWebhookLogs, + key: value.merchant_id.clone(), + payload: serde_json::to_value(value)?, + }) + } +} diff --git a/crates/router/src/services/kafka.rs b/crates/router/src/services/kafka.rs index 4c65b4677872..5a6d7043e6d0 100644 --- a/crates/router/src/services/kafka.rs +++ b/crates/router/src/services/kafka.rs @@ -84,6 +84,7 @@ pub struct KafkaSettings { refund_analytics_topic: String, api_logs_topic: String, connector_logs_topic: String, + outgoing_webhook_logs_topic: String, } impl KafkaSettings { @@ -140,6 +141,7 @@ pub struct KafkaProducer { refund_analytics_topic: String, api_logs_topic: String, connector_logs_topic: String, + outgoing_webhook_logs_topic: String, } struct RdKafkaProducer(ThreadedProducer); @@ -177,6 +179,7 @@ impl KafkaProducer { refund_analytics_topic: conf.refund_analytics_topic.clone(), api_logs_topic: conf.api_logs_topic.clone(), connector_logs_topic: conf.connector_logs_topic.clone(), + outgoing_webhook_logs_topic: conf.outgoing_webhook_logs_topic.clone(), }) } @@ -309,6 +312,7 @@ impl KafkaProducer { EventType::PaymentIntent => &self.intent_analytics_topic, EventType::Refund => &self.refund_analytics_topic, EventType::ConnectorApiLogs => &self.connector_logs_topic, + EventType::OutgoingWebhookLogs => &self.outgoing_webhook_logs_topic, } } } From f30ba89884d3abf2356cf1870d833a97d2411f69 Mon Sep 17 00:00:00 2001 From: Chethan Rao <70657455+Chethan-rao@users.noreply.github.com> Date: Fri, 5 Jan 2024 16:21:40 +0530 Subject: [PATCH 11/19] feat: add deep health check (#3210) Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com> --- crates/api_models/src/health_check.rs | 6 + crates/api_models/src/lib.rs | 1 + crates/router/src/consts.rs | 2 + crates/router/src/db.rs | 2 + crates/router/src/db/health_check.rs | 147 +++++++++++++++++++++++ crates/router/src/db/kafka_store.rs | 23 ++++ crates/router/src/routes/app.rs | 5 +- crates/router/src/routes/health.rs | 62 +++++++++- crates/router/src/services/api.rs | 8 ++ crates/router/src/services/api/client.rs | 2 + crates/storage_impl/src/errors.rs | 50 ++++++++ 11 files changed, 304 insertions(+), 4 deletions(-) create mode 100644 crates/api_models/src/health_check.rs create mode 100644 crates/router/src/db/health_check.rs diff --git a/crates/api_models/src/health_check.rs b/crates/api_models/src/health_check.rs new file mode 100644 index 000000000000..d7bb120d0176 --- /dev/null +++ b/crates/api_models/src/health_check.rs @@ -0,0 +1,6 @@ +#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] +pub struct RouterHealthCheckResponse { + pub database: String, + pub redis: String, + pub locker: String, +} diff --git a/crates/api_models/src/lib.rs b/crates/api_models/src/lib.rs index 935944cf74c2..459443747e36 100644 --- a/crates/api_models/src/lib.rs +++ b/crates/api_models/src/lib.rs @@ -16,6 +16,7 @@ pub mod errors; pub mod events; pub mod files; pub mod gsm; +pub mod health_check; pub mod locker_migration; pub mod mandates; pub mod organization; diff --git a/crates/router/src/consts.rs b/crates/router/src/consts.rs index 4a2d2831d103..eff42c0cd7c4 100644 --- a/crates/router/src/consts.rs +++ b/crates/router/src/consts.rs @@ -70,3 +70,5 @@ pub const EMAIL_TOKEN_TIME_IN_SECS: u64 = 60 * 60 * 24; // 1 day pub const VERIFY_CONNECTOR_ID_PREFIX: &str = "conn_verify"; #[cfg(feature = "olap")] pub const VERIFY_CONNECTOR_MERCHANT_ID: &str = "test_merchant"; + +pub const LOCKER_HEALTH_CALL_PATH: &str = "/health"; diff --git a/crates/router/src/db.rs b/crates/router/src/db.rs index 0cd4cb218810..5beace9cbb83 100644 --- a/crates/router/src/db.rs +++ b/crates/router/src/db.rs @@ -14,6 +14,7 @@ pub mod events; pub mod file; pub mod fraud_check; pub mod gsm; +pub mod health_check; mod kafka_store; pub mod locker_mock_up; pub mod mandate; @@ -103,6 +104,7 @@ pub trait StorageInterface: + user_role::UserRoleInterface + authorization::AuthorizationInterface + user::sample_data::BatchSampleDataInterface + + health_check::HealthCheckInterface + 'static { fn get_scheduler_db(&self) -> Box; diff --git a/crates/router/src/db/health_check.rs b/crates/router/src/db/health_check.rs new file mode 100644 index 000000000000..73bc2a4321d7 --- /dev/null +++ b/crates/router/src/db/health_check.rs @@ -0,0 +1,147 @@ +use async_bb8_diesel::{AsyncConnection, AsyncRunQueryDsl}; +use diesel_models::ConfigNew; +use error_stack::ResultExt; +use router_env::logger; + +use super::{MockDb, StorageInterface, Store}; +use crate::{ + connection, + consts::LOCKER_HEALTH_CALL_PATH, + core::errors::{self, CustomResult}, + routes, + services::api as services, + types::storage, +}; + +#[async_trait::async_trait] +pub trait HealthCheckInterface { + async fn health_check_db(&self) -> CustomResult<(), errors::HealthCheckDBError>; + async fn health_check_redis( + &self, + db: &dyn StorageInterface, + ) -> CustomResult<(), errors::HealthCheckRedisError>; + async fn health_check_locker( + &self, + state: &routes::AppState, + ) -> CustomResult<(), errors::HealthCheckLockerError>; +} + +#[async_trait::async_trait] +impl HealthCheckInterface for Store { + async fn health_check_db(&self) -> CustomResult<(), errors::HealthCheckDBError> { + let conn = connection::pg_connection_write(self) + .await + .change_context(errors::HealthCheckDBError::DBError)?; + + let _data = conn + .transaction_async(|conn| { + Box::pin(async move { + let query = + diesel::select(diesel::dsl::sql::("1 + 1")); + let _x: i32 = query.get_result_async(&conn).await.map_err(|err| { + logger::error!(read_err=?err,"Error while reading element in the database"); + errors::HealthCheckDBError::DBReadError + })?; + + logger::debug!("Database read was successful"); + + let config = ConfigNew { + key: "test_key".to_string(), + config: "test_value".to_string(), + }; + + config.insert(&conn).await.map_err(|err| { + logger::error!(write_err=?err,"Error while writing to database"); + errors::HealthCheckDBError::DBWriteError + })?; + + logger::debug!("Database write was successful"); + + storage::Config::delete_by_key(&conn, "test_key").await.map_err(|err| { + logger::error!(delete_err=?err,"Error while deleting element in the database"); + errors::HealthCheckDBError::DBDeleteError + })?; + + logger::debug!("Database delete was successful"); + + Ok::<_, errors::HealthCheckDBError>(()) + }) + }) + .await?; + + Ok(()) + } + + async fn health_check_redis( + &self, + db: &dyn StorageInterface, + ) -> CustomResult<(), errors::HealthCheckRedisError> { + let redis_conn = db + .get_redis_conn() + .change_context(errors::HealthCheckRedisError::RedisConnectionError)?; + + redis_conn + .serialize_and_set_key_with_expiry("test_key", "test_value", 30) + .await + .change_context(errors::HealthCheckRedisError::SetFailed)?; + + logger::debug!("Redis set_key was successful"); + + redis_conn + .get_key("test_key") + .await + .change_context(errors::HealthCheckRedisError::GetFailed)?; + + logger::debug!("Redis get_key was successful"); + + redis_conn + .delete_key("test_key") + .await + .change_context(errors::HealthCheckRedisError::DeleteFailed)?; + + logger::debug!("Redis delete_key was successful"); + + Ok(()) + } + + async fn health_check_locker( + &self, + state: &routes::AppState, + ) -> CustomResult<(), errors::HealthCheckLockerError> { + let locker = &state.conf.locker; + if !locker.mock_locker { + let mut url = locker.host_rs.to_owned(); + url.push_str(LOCKER_HEALTH_CALL_PATH); + let request = services::Request::new(services::Method::Get, &url); + services::call_connector_api(state, request) + .await + .change_context(errors::HealthCheckLockerError::FailedToCallLocker)? + .ok(); + } + + logger::debug!("Locker call was successful"); + + Ok(()) + } +} + +#[async_trait::async_trait] +impl HealthCheckInterface for MockDb { + async fn health_check_db(&self) -> CustomResult<(), errors::HealthCheckDBError> { + Ok(()) + } + + async fn health_check_redis( + &self, + _: &dyn StorageInterface, + ) -> CustomResult<(), errors::HealthCheckRedisError> { + Ok(()) + } + + async fn health_check_locker( + &self, + _: &routes::AppState, + ) -> CustomResult<(), errors::HealthCheckLockerError> { + Ok(()) + } +} diff --git a/crates/router/src/db/kafka_store.rs b/crates/router/src/db/kafka_store.rs index db94c1bcbca9..1184992a8f7c 100644 --- a/crates/router/src/db/kafka_store.rs +++ b/crates/router/src/db/kafka_store.rs @@ -43,6 +43,7 @@ use crate::{ events::EventInterface, file::FileMetadataInterface, gsm::GsmInterface, + health_check::HealthCheckInterface, locker_mock_up::LockerMockUpInterface, mandate::MandateInterface, merchant_account::MerchantAccountInterface, @@ -57,6 +58,7 @@ use crate::{ routing_algorithm::RoutingAlgorithmInterface, MasterKeyInterface, StorageInterface, }, + routes, services::{authentication, kafka::KafkaProducer, Store}, types::{ domain, @@ -2131,3 +2133,24 @@ impl AuthorizationInterface for KafkaStore { .await } } + +#[async_trait::async_trait] +impl HealthCheckInterface for KafkaStore { + async fn health_check_db(&self) -> CustomResult<(), errors::HealthCheckDBError> { + self.diesel_store.health_check_db().await + } + + async fn health_check_redis( + &self, + db: &dyn StorageInterface, + ) -> CustomResult<(), errors::HealthCheckRedisError> { + self.diesel_store.health_check_redis(db).await + } + + async fn health_check_locker( + &self, + state: &routes::AppState, + ) -> CustomResult<(), errors::HealthCheckLockerError> { + self.diesel_store.health_check_locker(state).await + } +} diff --git a/crates/router/src/routes/app.rs b/crates/router/src/routes/app.rs index 0357cedd443c..6625a206be21 100644 --- a/crates/router/src/routes/app.rs +++ b/crates/router/src/routes/app.rs @@ -253,9 +253,10 @@ pub struct Health; impl Health { pub fn server(state: AppState) -> Scope { - web::scope("") + web::scope("health") .app_data(web::Data::new(state)) - .service(web::resource("/health").route(web::get().to(health))) + .service(web::resource("").route(web::get().to(health))) + .service(web::resource("/deep_check").route(web::post().to(deep_health_check))) } } diff --git a/crates/router/src/routes/health.rs b/crates/router/src/routes/health.rs index 7c7f29bd1819..f07b744f7f52 100644 --- a/crates/router/src/routes/health.rs +++ b/crates/router/src/routes/health.rs @@ -1,7 +1,9 @@ +use actix_web::web; +use api_models::health_check::RouterHealthCheckResponse; use router_env::{instrument, logger, tracing}; -use crate::routes::metrics; - +use super::app; +use crate::{routes::metrics, services}; /// . // #[logger::instrument(skip_all, name = "name1", level = "warn", fields( key1 = "val1" ))] #[instrument(skip_all)] @@ -11,3 +13,59 @@ pub async fn health() -> impl actix_web::Responder { logger::info!("Health was called"); actix_web::HttpResponse::Ok().body("health is good") } + +#[instrument(skip_all)] +pub async fn deep_health_check(state: web::Data) -> impl actix_web::Responder { + metrics::HEALTH_METRIC.add(&metrics::CONTEXT, 1, &[]); + let db = &*state.store; + let mut status_code = 200; + logger::info!("Deep health check was called"); + + logger::debug!("Database health check begin"); + + let db_status = match db.health_check_db().await { + Ok(_) => "Health is good".to_string(), + Err(err) => { + status_code = 500; + err.to_string() + } + }; + logger::debug!("Database health check end"); + + logger::debug!("Redis health check begin"); + + let redis_status = match db.health_check_redis(db).await { + Ok(_) => "Health is good".to_string(), + Err(err) => { + status_code = 500; + err.to_string() + } + }; + + logger::debug!("Redis health check end"); + + logger::debug!("Locker health check begin"); + + let locker_status = match db.health_check_locker(&state).await { + Ok(_) => "Health is good".to_string(), + Err(err) => { + status_code = 500; + err.to_string() + } + }; + + logger::debug!("Locker health check end"); + + let response = serde_json::to_string(&RouterHealthCheckResponse { + database: db_status, + redis: redis_status, + locker: locker_status, + }) + .unwrap_or_default(); + + if status_code == 200 { + services::http_response_json(response) + } else { + services::http_server_error_json_response(response) + } +} diff --git a/crates/router/src/services/api.rs b/crates/router/src/services/api.rs index 92fda578727c..71687e02c121 100644 --- a/crates/router/src/services/api.rs +++ b/crates/router/src/services/api.rs @@ -1138,6 +1138,14 @@ pub fn http_response_json(response: T) -> HttpRe .body(response) } +pub fn http_server_error_json_response( + response: T, +) -> HttpResponse { + HttpResponse::InternalServerError() + .content_type(mime::APPLICATION_JSON) + .body(response) +} + pub fn http_response_json_with_headers( response: T, mut headers: Vec<(String, String)>, diff --git a/crates/router/src/services/api/client.rs b/crates/router/src/services/api/client.rs index cc7353dcda6b..fca85c41699a 100644 --- a/crates/router/src/services/api/client.rs +++ b/crates/router/src/services/api/client.rs @@ -10,6 +10,7 @@ use router_env::tracing_actix_web::RequestId; use super::{request::Maskable, Request}; use crate::{ configs::settings::{Locker, Proxy}, + consts::LOCKER_HEALTH_CALL_PATH, core::{ errors::{ApiClientError, CustomResult}, payments, @@ -119,6 +120,7 @@ pub fn proxy_bypass_urls(locker: &Locker) -> Vec { format!("{locker_host_rs}/cards/add"), format!("{locker_host_rs}/cards/retrieve"), format!("{locker_host_rs}/cards/delete"), + format!("{locker_host_rs}{}", LOCKER_HEALTH_CALL_PATH), format!("{locker_host}/card/addCard"), format!("{locker_host}/card/getCard"), format!("{locker_host}/card/deleteCard"), diff --git a/crates/storage_impl/src/errors.rs b/crates/storage_impl/src/errors.rs index f0cbebf78c55..50173bb1c739 100644 --- a/crates/storage_impl/src/errors.rs +++ b/crates/storage_impl/src/errors.rs @@ -376,3 +376,53 @@ pub enum ConnectorError { #[error("Missing 3DS redirection payload: {field_name}")] MissingConnectorRedirectionPayload { field_name: &'static str }, } + +#[derive(Debug, thiserror::Error)] +pub enum HealthCheckDBError { + #[error("Error while connecting to database")] + DBError, + #[error("Error while writing to database")] + DBWriteError, + #[error("Error while reading element in the database")] + DBReadError, + #[error("Error while deleting element in the database")] + DBDeleteError, + #[error("Unpredictable error occurred")] + UnknownError, + #[error("Error in database transaction")] + TransactionError, +} + +impl From for HealthCheckDBError { + fn from(error: diesel::result::Error) -> Self { + match error { + diesel::result::Error::DatabaseError(_, _) => Self::DBError, + + diesel::result::Error::RollbackErrorOnCommit { .. } + | diesel::result::Error::RollbackTransaction + | diesel::result::Error::AlreadyInTransaction + | diesel::result::Error::NotInTransaction + | diesel::result::Error::BrokenTransactionManager => Self::TransactionError, + + _ => Self::UnknownError, + } + } +} + +#[derive(Debug, thiserror::Error)] +pub enum HealthCheckRedisError { + #[error("Failed to establish Redis connection")] + RedisConnectionError, + #[error("Failed to set key value in Redis")] + SetFailed, + #[error("Failed to get key value in Redis")] + GetFailed, + #[error("Failed to delete key value in Redis")] + DeleteFailed, +} + +#[derive(Debug, Clone, thiserror::Error)] +pub enum HealthCheckLockerError { + #[error("Failed to establish Locker connection")] + FailedToCallLocker, +} From c8279b110e6c55784f042aebb956931e1870b0ca Mon Sep 17 00:00:00 2001 From: Chethan Rao <70657455+Chethan-rao@users.noreply.github.com> Date: Fri, 5 Jan 2024 16:22:31 +0530 Subject: [PATCH 12/19] chore: address Rust 1.75 clippy lints (#3231) Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com> --- crates/common_utils/src/request.rs | 3 +- crates/kgraph_utils/src/mca.rs | 2 +- crates/masking/src/diesel.rs | 1 - crates/masking/src/serde.rs | 2 +- crates/redis_interface/src/lib.rs | 2 +- crates/router/src/configs/settings.rs | 2 +- .../braintree_graphql_transformers.rs | 4 +- .../src/connector/checkout/transformers.rs | 5 +- .../src/connector/stripe/transformers.rs | 2 +- crates/router/src/connector/utils.rs | 160 +++++++++--------- crates/router/src/connector/wise.rs | 4 +- crates/router/src/core/fraud_check.rs | 10 +- crates/router/src/core/payments.rs | 5 +- .../router/src/core/payments/transformers.rs | 2 +- crates/router/src/db/dispute.rs | 4 +- crates/router/src/macros.rs | 5 +- crates/router/src/services/api.rs | 28 +-- .../types/api/connector_onboarding/paypal.rs | 2 +- crates/router/src/types/storage.rs | 1 - crates/router/src/types/storage/query.rs | 1 - crates/router/src/utils.rs | 20 +-- crates/router/src/utils/user/sample_data.rs | 4 +- crates/router/tests/connectors/utils.rs | 2 +- crates/scheduler/src/consumer.rs | 6 + crates/scheduler/src/producer.rs | 6 + 25 files changed, 141 insertions(+), 142 deletions(-) delete mode 100644 crates/router/src/types/storage/query.rs diff --git a/crates/common_utils/src/request.rs b/crates/common_utils/src/request.rs index e3aecb4b5695..f063a1940bef 100644 --- a/crates/common_utils/src/request.rs +++ b/crates/common_utils/src/request.rs @@ -138,8 +138,7 @@ impl RequestBuilder { } pub fn headers(mut self, headers: Vec<(String, Maskable)>) -> Self { - let mut h = headers.into_iter().map(|(h, v)| (h, v)); - self.headers.extend(&mut h); + self.headers.extend(headers); self } diff --git a/crates/kgraph_utils/src/mca.rs b/crates/kgraph_utils/src/mca.rs index 0e224a8f3d9d..a04e052514d6 100644 --- a/crates/kgraph_utils/src/mca.rs +++ b/crates/kgraph_utils/src/mca.rs @@ -156,7 +156,7 @@ fn compile_request_pm_types( let or_node_neighbor_id = if amount_nodes.len() == 1 { amount_nodes - .get(0) + .first() .copied() .ok_or(KgraphError::IndexingError)? } else { diff --git a/crates/masking/src/diesel.rs b/crates/masking/src/diesel.rs index 307f083d27fb..f3576298bdb1 100644 --- a/crates/masking/src/diesel.rs +++ b/crates/masking/src/diesel.rs @@ -2,7 +2,6 @@ //! Diesel-related. //! -pub use diesel::Expression; use diesel::{ backend::Backend, deserialize::{self, FromSql, Queryable}, diff --git a/crates/masking/src/serde.rs b/crates/masking/src/serde.rs index 944392e693ff..bb81717fd670 100644 --- a/crates/masking/src/serde.rs +++ b/crates/masking/src/serde.rs @@ -3,7 +3,7 @@ //! pub use erased_serde::Serialize as ErasedSerialize; -pub use serde::{de, ser, Deserialize, Serialize, Serializer}; +pub use serde::{de, Deserialize, Serialize, Serializer}; use serde_json::{value::Serializer as JsonValueSerializer, Value}; use crate::{Secret, Strategy, StrongSecret, ZeroizableSecret}; diff --git a/crates/redis_interface/src/lib.rs b/crates/redis_interface/src/lib.rs index 7111869a5c03..33d40ebe155d 100644 --- a/crates/redis_interface/src/lib.rs +++ b/crates/redis_interface/src/lib.rs @@ -28,7 +28,7 @@ pub use fred::interfaces::PubsubInterface; use fred::{interfaces::ClientLike, prelude::EventInterface}; use router_env::logger; -pub use self::{commands::*, types::*}; +pub use self::types::*; pub struct RedisConnectionPool { pub pool: fred::prelude::RedisPool, diff --git a/crates/router/src/configs/settings.rs b/crates/router/src/configs/settings.rs index b62831950856..db59d7f29148 100644 --- a/crates/router/src/configs/settings.rs +++ b/crates/router/src/configs/settings.rs @@ -556,7 +556,7 @@ impl From for storage_impl::config::Database { dbname: val.dbname, pool_size: val.pool_size, connection_timeout: val.connection_timeout, - queue_strategy: val.queue_strategy.into(), + queue_strategy: val.queue_strategy, min_idle: val.min_idle, max_lifetime: val.max_lifetime, } diff --git a/crates/router/src/connector/braintree/braintree_graphql_transformers.rs b/crates/router/src/connector/braintree/braintree_graphql_transformers.rs index 9bdbd4392f7c..e0baf034f72a 100644 --- a/crates/router/src/connector/braintree/braintree_graphql_transformers.rs +++ b/crates/router/src/connector/braintree/braintree_graphql_transformers.rs @@ -297,11 +297,11 @@ fn build_error_response( get_error_response( response - .get(0) + .first() .and_then(|err_details| err_details.extensions.as_ref()) .and_then(|extensions| extensions.legacy_code.clone()), response - .get(0) + .first() .map(|err_details| err_details.message.clone()), reason, http_code, diff --git a/crates/router/src/connector/checkout/transformers.rs b/crates/router/src/connector/checkout/transformers.rs index 5bd80a10c4b5..6e7656c38a6f 100644 --- a/crates/router/src/connector/checkout/transformers.rs +++ b/crates/router/src/connector/checkout/transformers.rs @@ -1026,10 +1026,7 @@ impl utils::MultipleCaptureSyncResponse for Box { self.status == CheckoutPaymentStatus::Captured } fn get_amount_captured(&self) -> Option { - match self.amount { - Some(amount) => amount.try_into().ok(), - None => None, - } + self.amount.map(Into::into) } } diff --git a/crates/router/src/connector/stripe/transformers.rs b/crates/router/src/connector/stripe/transformers.rs index b044331379a1..ba5dfc7fef91 100644 --- a/crates/router/src/connector/stripe/transformers.rs +++ b/crates/router/src/connector/stripe/transformers.rs @@ -2336,7 +2336,7 @@ pub fn get_connector_metadata( let next_action_response = next_action .and_then(|next_action_response| match next_action_response { StripeNextActionResponse::DisplayBankTransferInstructions(response) => { - let bank_instructions = response.financial_addresses.get(0); + let bank_instructions = response.financial_addresses.first(); let (sepa_bank_instructions, bacs_bank_instructions) = bank_instructions.map_or((None, None), |financial_address| { ( diff --git a/crates/router/src/connector/utils.rs b/crates/router/src/connector/utils.rs index 24def6253726..0dca3ace9479 100644 --- a/crates/router/src/connector/utils.rs +++ b/crates/router/src/connector/utils.rs @@ -1512,86 +1512,6 @@ pub fn get_error_code_error_message_based_on_priority( .cloned() } -#[cfg(test)] -mod error_code_error_message_tests { - #![allow(clippy::unwrap_used)] - use super::*; - - struct TestConnector; - - impl ConnectorErrorTypeMapping for TestConnector { - fn get_connector_error_type( - &self, - error_code: String, - error_message: String, - ) -> ConnectorErrorType { - match (error_code.as_str(), error_message.as_str()) { - ("01", "INVALID_MERCHANT") => ConnectorErrorType::BusinessError, - ("03", "INVALID_CVV") => ConnectorErrorType::UserError, - ("04", "04") => ConnectorErrorType::TechnicalError, - _ => ConnectorErrorType::UnknownError, - } - } - } - - #[test] - fn test_get_error_code_error_message_based_on_priority() { - let error_code_message_list_unknown = vec![ - ErrorCodeAndMessage { - error_code: "01".to_string(), - error_message: "INVALID_MERCHANT".to_string(), - }, - ErrorCodeAndMessage { - error_code: "05".to_string(), - error_message: "05".to_string(), - }, - ErrorCodeAndMessage { - error_code: "03".to_string(), - error_message: "INVALID_CVV".to_string(), - }, - ErrorCodeAndMessage { - error_code: "04".to_string(), - error_message: "04".to_string(), - }, - ]; - let error_code_message_list_user = vec![ - ErrorCodeAndMessage { - error_code: "01".to_string(), - error_message: "INVALID_MERCHANT".to_string(), - }, - ErrorCodeAndMessage { - error_code: "03".to_string(), - error_message: "INVALID_CVV".to_string(), - }, - ]; - let error_code_error_message_unknown = get_error_code_error_message_based_on_priority( - TestConnector, - error_code_message_list_unknown, - ); - let error_code_error_message_user = get_error_code_error_message_based_on_priority( - TestConnector, - error_code_message_list_user, - ); - let error_code_error_message_none = - get_error_code_error_message_based_on_priority(TestConnector, vec![]); - assert_eq!( - error_code_error_message_unknown, - Some(ErrorCodeAndMessage { - error_code: "05".to_string(), - error_message: "05".to_string(), - }) - ); - assert_eq!( - error_code_error_message_user, - Some(ErrorCodeAndMessage { - error_code: "03".to_string(), - error_message: "INVALID_CVV".to_string(), - }) - ); - assert_eq!(error_code_error_message_none, None); - } -} - pub trait MultipleCaptureSyncResponse { fn get_connector_capture_id(&self) -> String; fn get_capture_attempt_status(&self) -> enums::AttemptStatus; @@ -1785,3 +1705,83 @@ impl FrmTransactionRouterDataRequest for fraud_check::FrmTransactionRouterData { } } } + +#[cfg(test)] +mod error_code_error_message_tests { + #![allow(clippy::unwrap_used)] + use super::*; + + struct TestConnector; + + impl ConnectorErrorTypeMapping for TestConnector { + fn get_connector_error_type( + &self, + error_code: String, + error_message: String, + ) -> ConnectorErrorType { + match (error_code.as_str(), error_message.as_str()) { + ("01", "INVALID_MERCHANT") => ConnectorErrorType::BusinessError, + ("03", "INVALID_CVV") => ConnectorErrorType::UserError, + ("04", "04") => ConnectorErrorType::TechnicalError, + _ => ConnectorErrorType::UnknownError, + } + } + } + + #[test] + fn test_get_error_code_error_message_based_on_priority() { + let error_code_message_list_unknown = vec![ + ErrorCodeAndMessage { + error_code: "01".to_string(), + error_message: "INVALID_MERCHANT".to_string(), + }, + ErrorCodeAndMessage { + error_code: "05".to_string(), + error_message: "05".to_string(), + }, + ErrorCodeAndMessage { + error_code: "03".to_string(), + error_message: "INVALID_CVV".to_string(), + }, + ErrorCodeAndMessage { + error_code: "04".to_string(), + error_message: "04".to_string(), + }, + ]; + let error_code_message_list_user = vec![ + ErrorCodeAndMessage { + error_code: "01".to_string(), + error_message: "INVALID_MERCHANT".to_string(), + }, + ErrorCodeAndMessage { + error_code: "03".to_string(), + error_message: "INVALID_CVV".to_string(), + }, + ]; + let error_code_error_message_unknown = get_error_code_error_message_based_on_priority( + TestConnector, + error_code_message_list_unknown, + ); + let error_code_error_message_user = get_error_code_error_message_based_on_priority( + TestConnector, + error_code_message_list_user, + ); + let error_code_error_message_none = + get_error_code_error_message_based_on_priority(TestConnector, vec![]); + assert_eq!( + error_code_error_message_unknown, + Some(ErrorCodeAndMessage { + error_code: "05".to_string(), + error_message: "05".to_string(), + }) + ); + assert_eq!( + error_code_error_message_user, + Some(ErrorCodeAndMessage { + error_code: "03".to_string(), + error_message: "INVALID_CVV".to_string(), + }) + ); + assert_eq!(error_code_error_message_none, None); + } +} diff --git a/crates/router/src/connector/wise.rs b/crates/router/src/connector/wise.rs index 0674cc2ff8bc..d2ec08c607c4 100644 --- a/crates/router/src/connector/wise.rs +++ b/crates/router/src/connector/wise.rs @@ -90,7 +90,7 @@ impl ConnectorCommon for Wise { let default_status = response.status.unwrap_or_default().to_string(); match response.errors { Some(errs) => { - if let Some(e) = errs.get(0) { + if let Some(e) = errs.first() { Ok(types::ErrorResponse { status_code: res.status_code, code: e.code.clone(), @@ -301,7 +301,7 @@ impl services::ConnectorIntegration = list.into_iter().map(ForeignFrom::foreign_from).collect(); diff --git a/crates/router/src/core/payments/transformers.rs b/crates/router/src/core/payments/transformers.rs index 577480d311d7..ff8b95d4ab44 100644 --- a/crates/router/src/core/payments/transformers.rs +++ b/crates/router/src/core/payments/transformers.rs @@ -547,7 +547,7 @@ where if third_party_sdk_session_next_action(&payment_attempt, operation) { next_action_response = Some( api_models::payments::NextActionData::ThirdPartySdkSessionToken { - session_token: payment_data.sessions_token.get(0).cloned(), + session_token: payment_data.sessions_token.first().cloned(), }, ) } diff --git a/crates/router/src/db/dispute.rs b/crates/router/src/db/dispute.rs index c63585205bb3..4529b121fa24 100644 --- a/crates/router/src/db/dispute.rs +++ b/crates/router/src/db/dispute.rs @@ -572,7 +572,7 @@ mod tests { assert_eq!(1, found_disputes.len()); - assert_eq!(created_dispute, found_disputes.get(0).unwrap().clone()); + assert_eq!(created_dispute, found_disputes.first().unwrap().clone()); } #[tokio::test] @@ -611,7 +611,7 @@ mod tests { assert_eq!(1, found_disputes.len()); - assert_eq!(created_dispute, found_disputes.get(0).unwrap().clone()); + assert_eq!(created_dispute, found_disputes.first().unwrap().clone()); } mod update_dispute { diff --git a/crates/router/src/macros.rs b/crates/router/src/macros.rs index e6c9dba7d6e2..efe71e49bb04 100644 --- a/crates/router/src/macros.rs +++ b/crates/router/src/macros.rs @@ -1,4 +1 @@ -pub use common_utils::{ - async_spawn, collect_missing_value_keys, fallback_reverse_lookup_not_found, newtype, - newtype_impl, -}; +pub use common_utils::{collect_missing_value_keys, newtype}; diff --git a/crates/router/src/services/api.rs b/crates/router/src/services/api.rs index 71687e02c121..9ac8d5e5eb41 100644 --- a/crates/router/src/services/api.rs +++ b/crates/router/src/services/api.rs @@ -1539,16 +1539,16 @@ pub fn build_redirection_form( var responseForm = document.createElement('form'); responseForm.action=window.location.pathname.replace(/payments\\/redirect\\/(\\w+)\\/(\\w+)\\/\\w+/, \"payments/$1/$2/redirect/complete/nmi\"); responseForm.method='POST'; - + const threeDSsecureInterface = threeDS.createUI(options); threeDSsecureInterface.start('body'); - + threeDSsecureInterface.on('challenge', function(e) {{ console.log('Challenged'); }}); - + threeDSsecureInterface.on('complete', function(e) {{ - + var item1=document.createElement('input'); item1.type='hidden'; item1.name='cavv'; @@ -1582,11 +1582,11 @@ pub fn build_redirection_form( document.body.appendChild(responseForm); responseForm.submit(); }}); - + threeDSsecureInterface.on('failure', function(e) {{ responseForm.submit(); }}); - + " ))) } @@ -1594,14 +1594,6 @@ pub fn build_redirection_form( } } -#[cfg(test)] -mod tests { - #[test] - fn test_mime_essence() { - assert_eq!(mime::APPLICATION_JSON.essence_str(), "application/json"); - } -} - pub fn build_payment_link_html( payment_link_data: PaymentLinkFormData, ) -> CustomResult { @@ -1631,3 +1623,11 @@ pub fn build_payment_link_html( fn get_hyper_loader_sdk(sdk_url: &str) -> String { format!("") } + +#[cfg(test)] +mod tests { + #[test] + fn test_mime_essence() { + assert_eq!(mime::APPLICATION_JSON.essence_str(), "application/json"); + } +} diff --git a/crates/router/src/types/api/connector_onboarding/paypal.rs b/crates/router/src/types/api/connector_onboarding/paypal.rs index 0cc026d4d7ad..dbfdd6f50075 100644 --- a/crates/router/src/types/api/connector_onboarding/paypal.rs +++ b/crates/router/src/types/api/connector_onboarding/paypal.rs @@ -177,7 +177,7 @@ pub enum VettingStatus { impl SellerStatusResponse { pub fn extract_merchant_details_url(self, paypal_base_url: &str) -> RouterResult { self.links - .get(0) + .first() .and_then(|link| link.href.strip_prefix('/')) .map(|link| format!("{}{}", paypal_base_url, link)) .ok_or(ApiErrorResponse::InternalServerError) diff --git a/crates/router/src/types/storage.rs b/crates/router/src/types/storage.rs index 1dc241cde20c..56d3272b9471 100644 --- a/crates/router/src/types/storage.rs +++ b/crates/router/src/types/storage.rs @@ -26,7 +26,6 @@ pub mod payment_link; pub mod payment_method; pub mod payout_attempt; pub mod payouts; -mod query; pub mod refund; pub mod reverse_lookup; pub mod routing_algorithm; diff --git a/crates/router/src/types/storage/query.rs b/crates/router/src/types/storage/query.rs deleted file mode 100644 index 1483dec3eab3..000000000000 --- a/crates/router/src/types/storage/query.rs +++ /dev/null @@ -1 +0,0 @@ -pub use diesel_models::query::*; diff --git a/crates/router/src/utils.rs b/crates/router/src/utils.rs index 42116e1ecbf0..aaa145099e4e 100644 --- a/crates/router/src/utils.rs +++ b/crates/router/src/utils.rs @@ -196,16 +196,6 @@ impl QrImage { } } -#[cfg(test)] -mod tests { - use crate::utils; - #[test] - fn test_image_data_source_url() { - let qr_image_data_source_url = utils::QrImage::new_from_data("Hyperswitch".to_string()); - assert!(qr_image_data_source_url.is_ok()); - } -} - pub async fn find_payment_intent_from_payment_id_type( db: &dyn StorageInterface, payment_id_type: payments::PaymentIdType, @@ -804,3 +794,13 @@ pub async fn flatten_join_error(handle: Handle) -> RouterResult { .attach_printable("Join Error"), } } + +#[cfg(test)] +mod tests { + use crate::utils; + #[test] + fn test_image_data_source_url() { + let qr_image_data_source_url = utils::QrImage::new_from_data("Hyperswitch".to_string()); + assert!(qr_image_data_source_url.is_ok()); + } +} diff --git a/crates/router/src/utils/user/sample_data.rs b/crates/router/src/utils/user/sample_data.rs index 9f95e2d078dd..5ce0818b82b3 100644 --- a/crates/router/src/utils/user/sample_data.rs +++ b/crates/router/src/utils/user/sample_data.rs @@ -48,9 +48,9 @@ pub async fn generate_sample_data( .change_context(SampleDataError::InternalServerError) .attach_printable("Error while parsing primary business details")?; - let business_country_default = merchant_parsed_details.get(0).map(|x| x.country); + let business_country_default = merchant_parsed_details.first().map(|x| x.country); - let business_label_default = merchant_parsed_details.get(0).map(|x| x.business.clone()); + let business_label_default = merchant_parsed_details.first().map(|x| x.business.clone()); let profile_id = crate::core::utils::get_profile_id_from_business_details( business_country_default, diff --git a/crates/router/tests/connectors/utils.rs b/crates/router/tests/connectors/utils.rs index 62fce84f1f9d..c27a648a3051 100644 --- a/crates/router/tests/connectors/utils.rs +++ b/crates/router/tests/connectors/utils.rs @@ -458,7 +458,7 @@ pub trait ConnectorActions: Connector { customer_details: Some(payments::CustomerDetails { customer_id: core_utils::get_or_generate_id("customer_id", &None, "cust_").ok(), name: Some(Secret::new("John Doe".to_string())), - email: TryFrom::try_from(Secret::new("john.doe@example".to_string())).ok(), + email: TryFrom::try_from("john.doe@example".to_string()).ok(), phone: Some(Secret::new("620874518".to_string())), phone_country_code: Some("+31".to_string()), }), diff --git a/crates/scheduler/src/consumer.rs b/crates/scheduler/src/consumer.rs index ef0386bec299..ccc943afba3c 100644 --- a/crates/scheduler/src/consumer.rs +++ b/crates/scheduler/src/consumer.rs @@ -40,9 +40,15 @@ pub async fn start_consumer( use rand::distributions::{Distribution, Uniform}; let mut rng = rand::thread_rng(); + + // TODO: this can be removed once rand-0.9 is released + // reference - https://github.com/rust-random/rand/issues/1326#issuecomment-1635331942 + #[allow(unknown_lints)] + #[allow(clippy::unnecessary_fallible_conversions)] let timeout = Uniform::try_from(0..=settings.loop_interval) .into_report() .change_context(errors::ProcessTrackerError::ConfigurationError)?; + tokio::time::sleep(Duration::from_millis(timeout.sample(&mut rng))).await; let mut interval = tokio::time::interval(Duration::from_millis(settings.loop_interval)); diff --git a/crates/scheduler/src/producer.rs b/crates/scheduler/src/producer.rs index 52510e1842e0..bcf37cdf6f22 100644 --- a/crates/scheduler/src/producer.rs +++ b/crates/scheduler/src/producer.rs @@ -30,9 +30,15 @@ where use rand::distributions::{Distribution, Uniform}; let mut rng = rand::thread_rng(); + + // TODO: this can be removed once rand-0.9 is released + // reference - https://github.com/rust-random/rand/issues/1326#issuecomment-1635331942 + #[allow(unknown_lints)] + #[allow(clippy::unnecessary_fallible_conversions)] let timeout = Uniform::try_from(0..=scheduler_settings.loop_interval) .into_report() .change_context(errors::ProcessTrackerError::ConfigurationError)?; + tokio::time::sleep(Duration::from_millis(timeout.sample(&mut rng))).await; let mut interval = tokio::time::interval(std::time::Duration::from_millis( From 252443a50dc48939eb08b3bcd67273bb71bbe349 Mon Sep 17 00:00:00 2001 From: Sanchith Hegde <22217505+SanchithHegde@users.noreply.github.com> Date: Fri, 5 Jan 2024 17:32:36 +0530 Subject: [PATCH 13/19] feat: include version number in response headers and on application startup (#3045) --- crates/drainer/src/main.rs | 3 +++ crates/router/Cargo.toml | 2 +- crates/router/src/bin/router.rs | 3 +++ crates/router/src/bin/scheduler.rs | 8 ++++++-- crates/router/src/middleware.rs | 8 +++++++- crates/router_env/src/env.rs | 10 ++++++++++ 6 files changed, 30 insertions(+), 4 deletions(-) diff --git a/crates/drainer/src/main.rs b/crates/drainer/src/main.rs index 2b4142abc0c7..9e8b8e275cbd 100644 --- a/crates/drainer/src/main.rs +++ b/crates/drainer/src/main.rs @@ -20,6 +20,9 @@ async fn main() -> DrainerResult<()> { let shutdown_intervals = conf.drainer.shutdown_interval; let loop_interval = conf.drainer.loop_interval; + #[cfg(feature = "vergen")] + println!("Starting drainer (Version: {})", router_env::git_tag!()); + let _guard = router_env::setup( &conf.log, router_env::service_name!(), diff --git a/crates/router/Cargo.toml b/crates/router/Cargo.toml index a1ddc37bbf2c..eb7fbc7ddbc9 100644 --- a/crates/router/Cargo.toml +++ b/crates/router/Cargo.toml @@ -16,7 +16,7 @@ email = ["external_services/email", "dep:aws-config", "olap"] frm = [] basilisk = ["kms"] stripe = ["dep:serde_qs"] -release = ["kms", "stripe", "basilisk", "s3", "email", "backwards_compatibility", "business_profile_routing", "accounts_cache", "kv_store", "connector_choice_mca_id", "profile_specific_fallback_routing"] +release = ["kms", "stripe", "basilisk", "s3", "email", "backwards_compatibility", "business_profile_routing", "accounts_cache", "kv_store", "connector_choice_mca_id", "profile_specific_fallback_routing", "vergen"] olap = ["data_models/olap", "storage_impl/olap", "scheduler/olap", "dep:analytics"] oltp = ["storage_impl/oltp"] kv_store = ["scheduler/kv_store"] diff --git a/crates/router/src/bin/router.rs b/crates/router/src/bin/router.rs index beb2869f998c..a02758d8edd5 100644 --- a/crates/router/src/bin/router.rs +++ b/crates/router/src/bin/router.rs @@ -34,6 +34,9 @@ async fn main() -> ApplicationResult<()> { conf.validate() .expect("Failed to validate router configuration"); + #[cfg(feature = "vergen")] + println!("Starting router (Version: {})", router_env::git_tag!()); + let _guard = router_env::setup( &conf.log, router_env::service_name!(), diff --git a/crates/router/src/bin/scheduler.rs b/crates/router/src/bin/scheduler.rs index 32e9cfc6ca29..b800ecb897e5 100644 --- a/crates/router/src/bin/scheduler.rs +++ b/crates/router/src/bin/scheduler.rs @@ -22,8 +22,6 @@ use tokio::sync::{mpsc, oneshot}; const SCHEDULER_FLOW: &str = "SCHEDULER_FLOW"; #[tokio::main] async fn main() -> CustomResult<(), ProcessTrackerError> { - // console_subscriber::init(); - let cmd_line = ::parse(); #[allow(clippy::expect_used)] @@ -58,6 +56,12 @@ async fn main() -> CustomResult<(), ProcessTrackerError> { let scheduler_flow = scheduler::SchedulerFlow::from_str(&scheduler_flow_str) .expect("Unable to parse SchedulerFlow from environment variable"); + #[cfg(feature = "vergen")] + println!( + "Starting {scheduler_flow} (Version: {})", + router_env::git_tag!() + ); + let _guard = router_env::setup( &state.conf.log, &scheduler_flow_str, diff --git a/crates/router/src/middleware.rs b/crates/router/src/middleware.rs index 0f2c5bd2cb7f..c6c94d3a78ea 100644 --- a/crates/router/src/middleware.rs +++ b/crates/router/src/middleware.rs @@ -70,7 +70,13 @@ where pub fn default_response_headers() -> actix_web::middleware::DefaultHeaders { use actix_web::http::header; - actix_web::middleware::DefaultHeaders::new() + let default_headers_middleware = actix_web::middleware::DefaultHeaders::new(); + + #[cfg(feature = "vergen")] + let default_headers_middleware = + default_headers_middleware.add(("x-hyperswitch-version", router_env::git_tag!())); + + default_headers_middleware // Max age of 1 year in seconds, equal to `60 * 60 * 24 * 365` seconds. .add((header::STRICT_TRANSPORT_SECURITY, "max-age=31536000")) .add((header::VIA, "HyperSwitch")) diff --git a/crates/router_env/src/env.rs b/crates/router_env/src/env.rs index e57c38e7e4ad..644f9b50a126 100644 --- a/crates/router_env/src/env.rs +++ b/crates/router_env/src/env.rs @@ -167,3 +167,13 @@ macro_rules! profile { env!("CARGO_PROFILE") }; } + +/// The latest git tag. If tags are not present in the repository, the short commit hash is used +/// instead. Refer to the [`git describe`](https://git-scm.com/docs/git-describe) documentation for +/// more details. +#[macro_export] +macro_rules! git_tag { + () => { + env!("VERGEN_GIT_DESCRIBE") + }; +} From c3172ef60603325a1d9e5cab45e72d23a383e218 Mon Sep 17 00:00:00 2001 From: Mani Chandra <84711804+ThisIsMani@users.noreply.github.com> Date: Fri, 5 Jan 2024 18:26:03 +0530 Subject: [PATCH 14/19] feat(merchant_account): Add list multiple merchants in `MerchantAccountInterface` (#3220) Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com> --- .../src/query/merchant_account.rs | 20 ++++++ .../src/query/merchant_key_store.rs | 20 ++++++ crates/router/src/db/kafka_store.rs | 21 ++++++ crates/router/src/db/merchant_account.rs | 68 +++++++++++++++++++ crates/router/src/db/merchant_key_store.rs | 56 +++++++++++++++ 5 files changed, 185 insertions(+) diff --git a/crates/diesel_models/src/query/merchant_account.rs b/crates/diesel_models/src/query/merchant_account.rs index ef9a4165d6f4..ba20f2e36607 100644 --- a/crates/diesel_models/src/query/merchant_account.rs +++ b/crates/diesel_models/src/query/merchant_account.rs @@ -110,4 +110,24 @@ impl MerchantAccount { ) .await } + + #[instrument(skip_all)] + pub async fn list_multiple_merchant_accounts( + conn: &PgPooledConn, + merchant_ids: Vec, + ) -> StorageResult> { + generics::generic_filter::< + ::Table, + _, + <::Table as Table>::PrimaryKey, + _, + >( + conn, + dsl::merchant_id.eq_any(merchant_ids), + None, + None, + None, + ) + .await + } } diff --git a/crates/diesel_models/src/query/merchant_key_store.rs b/crates/diesel_models/src/query/merchant_key_store.rs index 27ec3be9fcd0..0e2ec1ddadbd 100644 --- a/crates/diesel_models/src/query/merchant_key_store.rs +++ b/crates/diesel_models/src/query/merchant_key_store.rs @@ -39,4 +39,24 @@ impl MerchantKeyStore { ) .await } + + #[instrument(skip(conn))] + pub async fn list_multiple_key_stores( + conn: &PgPooledConn, + merchant_ids: Vec, + ) -> StorageResult> { + generics::generic_filter::< + ::Table, + _, + <::Table as diesel::Table>::PrimaryKey, + _, + >( + conn, + dsl::merchant_id.eq_any(merchant_ids), + None, + None, + None, + ) + .await + } } diff --git a/crates/router/src/db/kafka_store.rs b/crates/router/src/db/kafka_store.rs index 1184992a8f7c..19a83088a06f 100644 --- a/crates/router/src/db/kafka_store.rs +++ b/crates/router/src/db/kafka_store.rs @@ -662,6 +662,16 @@ impl MerchantAccountInterface for KafkaStore { .delete_merchant_account_by_merchant_id(merchant_id) .await } + + #[cfg(feature = "olap")] + async fn list_multiple_merchant_accounts( + &self, + merchant_ids: Vec, + ) -> CustomResult, errors::StorageError> { + self.diesel_store + .list_multiple_merchant_accounts(merchant_ids) + .await + } } #[async_trait::async_trait] @@ -1615,6 +1625,17 @@ impl MerchantKeyStoreInterface for KafkaStore { .delete_merchant_key_store_by_merchant_id(merchant_id) .await } + + #[cfg(feature = "olap")] + async fn list_multiple_key_stores( + &self, + merchant_ids: Vec, + key: &Secret>, + ) -> CustomResult, errors::StorageError> { + self.diesel_store + .list_multiple_key_stores(merchant_ids, key) + .await + } } #[async_trait::async_trait] diff --git a/crates/router/src/db/merchant_account.rs b/crates/router/src/db/merchant_account.rs index 0d3ce99b948d..70d417c0366d 100644 --- a/crates/router/src/db/merchant_account.rs +++ b/crates/router/src/db/merchant_account.rs @@ -1,3 +1,6 @@ +#[cfg(feature = "olap")] +use std::collections::HashMap; + use common_utils::ext_traits::AsyncExt; use error_stack::{IntoReport, ResultExt}; #[cfg(feature = "accounts_cache")] @@ -65,6 +68,12 @@ where &self, merchant_id: &str, ) -> CustomResult; + + #[cfg(feature = "olap")] + async fn list_multiple_merchant_accounts( + &self, + merchant_ids: Vec, + ) -> CustomResult, errors::StorageError>; } #[async_trait::async_trait] @@ -294,6 +303,57 @@ impl MerchantAccountInterface for Store { Ok(is_deleted) } + + #[cfg(feature = "olap")] + async fn list_multiple_merchant_accounts( + &self, + merchant_ids: Vec, + ) -> CustomResult, errors::StorageError> { + let conn = connection::pg_connection_read(self).await?; + + let encrypted_merchant_accounts = + storage::MerchantAccount::list_multiple_merchant_accounts(&conn, merchant_ids) + .await + .map_err(Into::into) + .into_report()?; + + let db_master_key = self.get_master_key().to_vec().into(); + + let merchant_key_stores = self + .list_multiple_key_stores( + encrypted_merchant_accounts + .iter() + .map(|merchant_account| &merchant_account.merchant_id) + .cloned() + .collect(), + &db_master_key, + ) + .await?; + + let key_stores_by_id: HashMap<_, _> = merchant_key_stores + .iter() + .map(|key_store| (key_store.merchant_id.to_owned(), key_store)) + .collect(); + + let merchant_accounts = + futures::future::try_join_all(encrypted_merchant_accounts.into_iter().map( + |merchant_account| async { + let key_store = key_stores_by_id.get(&merchant_account.merchant_id).ok_or( + errors::StorageError::ValueNotFound(format!( + "merchant_key_store with merchant_id = {}", + merchant_account.merchant_id + )), + )?; + merchant_account + .convert(key_store.key.get_inner()) + .await + .change_context(errors::StorageError::DecryptionError) + }, + )) + .await?; + + Ok(merchant_accounts) + } } #[async_trait::async_trait] @@ -392,6 +452,14 @@ impl MerchantAccountInterface for MockDb { ) -> CustomResult, errors::StorageError> { Err(errors::StorageError::MockDbError)? } + + #[cfg(feature = "olap")] + async fn list_multiple_merchant_accounts( + &self, + _merchant_ids: Vec, + ) -> CustomResult, errors::StorageError> { + Err(errors::StorageError::MockDbError)? + } } #[cfg(feature = "accounts_cache")] diff --git a/crates/router/src/db/merchant_key_store.rs b/crates/router/src/db/merchant_key_store.rs index 970e2b770324..630b833afdde 100644 --- a/crates/router/src/db/merchant_key_store.rs +++ b/crates/router/src/db/merchant_key_store.rs @@ -32,6 +32,13 @@ pub trait MerchantKeyStoreInterface { &self, merchant_id: &str, ) -> CustomResult; + + #[cfg(feature = "olap")] + async fn list_multiple_key_stores( + &self, + merchant_ids: Vec, + key: &Secret>, + ) -> CustomResult, errors::StorageError>; } #[async_trait::async_trait] @@ -128,6 +135,33 @@ impl MerchantKeyStoreInterface for Store { .await } } + + #[cfg(feature = "olap")] + async fn list_multiple_key_stores( + &self, + merchant_ids: Vec, + key: &Secret>, + ) -> CustomResult, errors::StorageError> { + let fetch_func = || async { + let conn = connection::pg_connection_read(self).await?; + + diesel_models::merchant_key_store::MerchantKeyStore::list_multiple_key_stores( + &conn, + merchant_ids, + ) + .await + .map_err(Into::into) + .into_report() + }; + + futures::future::try_join_all(fetch_func().await?.into_iter().map(|key_store| async { + key_store + .convert(key) + .await + .change_context(errors::StorageError::DecryptionError) + })) + .await + } } #[async_trait::async_trait] @@ -194,6 +228,28 @@ impl MerchantKeyStoreInterface for MockDb { merchant_key_stores.remove(index); Ok(true) } + + #[cfg(feature = "olap")] + async fn list_multiple_key_stores( + &self, + merchant_ids: Vec, + key: &Secret>, + ) -> CustomResult, errors::StorageError> { + let merchant_key_stores = self.merchant_key_store.lock().await; + futures::future::try_join_all( + merchant_key_stores + .iter() + .filter(|merchant_key| merchant_ids.contains(&merchant_key.merchant_id)) + .map(|merchant_key| async { + merchant_key + .to_owned() + .convert(key) + .await + .change_context(errors::StorageError::DecryptionError) + }), + ) + .await + } } #[cfg(test)] From 64babd34786ba8e6f63aa1dba1cbd1bc6264f2ac Mon Sep 17 00:00:00 2001 From: Sakil Mostak <73734619+Sakilmostak@users.noreply.github.com> Date: Fri, 5 Jan 2024 18:56:07 +0530 Subject: [PATCH 15/19] fix(connector): [NMI] Populating `ErrorResponse` with required fields and Mapping `connector_response_reference_id` (#3214) Co-authored-by: Prasunna Soppa --- crates/router/src/connector/nmi.rs | 8 +-- .../router/src/connector/nmi/transformers.rs | 53 ++++++++++--------- 2 files changed, 34 insertions(+), 27 deletions(-) diff --git a/crates/router/src/connector/nmi.rs b/crates/router/src/connector/nmi.rs index 0c01c752039f..d514eefb10aa 100644 --- a/crates/router/src/connector/nmi.rs +++ b/crates/router/src/connector/nmi.rs @@ -75,10 +75,12 @@ impl ConnectorCommon for Nmi { .parse_struct("StandardResponse") .change_context(errors::ConnectorError::ResponseDeserializationFailed)?; Ok(ErrorResponse { - message: response.responsetext, + message: response.responsetext.to_owned(), status_code: res.status_code, - reason: None, - ..Default::default() + reason: Some(response.responsetext), + code: response.response_code, + attempt_status: None, + connector_transaction_id: Some(response.transactionid), }) } } diff --git a/crates/router/src/connector/nmi/transformers.rs b/crates/router/src/connector/nmi/transformers.rs index b9ad5b8e1883..677bf303d95f 100644 --- a/crates/router/src/connector/nmi/transformers.rs +++ b/crates/router/src/connector/nmi/transformers.rs @@ -143,6 +143,7 @@ pub struct NmiVaultResponse { pub responsetext: String, pub customer_vault_id: Option, pub response_code: String, + pub transactionid: String, } impl @@ -205,7 +206,7 @@ impl mandate_reference: None, connector_metadata: None, network_txn_id: None, - connector_response_reference_id: None, + connector_response_reference_id: Some(item.response.transactionid), incremental_authorization_allowed: None, }), enums::AttemptStatus::AuthenticationPending, @@ -213,11 +214,11 @@ impl Response::Declined | Response::Error => ( Err(types::ErrorResponse { code: item.response.response_code, - message: item.response.responsetext, - reason: None, + message: item.response.responsetext.to_owned(), + reason: Some(item.response.responsetext), status_code: item.http_code, attempt_status: None, - connector_transaction_id: None, + connector_transaction_id: Some(item.response.transactionid), }), enums::AttemptStatus::Failure, ), @@ -346,12 +347,14 @@ impl let (response, status) = match item.response.response { Response::Approved => ( Ok(types::PaymentsResponseData::TransactionResponse { - resource_id: types::ResponseId::ConnectorTransactionId(item.response.orderid), + resource_id: types::ResponseId::ConnectorTransactionId( + item.response.transactionid, + ), redirection_data: None, mandate_reference: None, connector_metadata: None, network_txn_id: None, - connector_response_reference_id: None, + connector_response_reference_id: Some(item.response.orderid), incremental_authorization_allowed: None, }), if let Some(diesel_models::enums::CaptureMethod::Automatic) = @@ -382,11 +385,11 @@ impl ForeignFrom<(NmiCompleteResponse, u16)> for types::ErrorResponse { fn foreign_from((response, http_code): (NmiCompleteResponse, u16)) -> Self { Self { code: response.response_code, - message: response.responsetext, - reason: None, + message: response.responsetext.to_owned(), + reason: Some(response.responsetext), status_code: http_code, attempt_status: None, - connector_transaction_id: None, + connector_transaction_id: Some(response.transactionid), } } } @@ -632,13 +635,13 @@ impl Response::Approved => ( Ok(types::PaymentsResponseData::TransactionResponse { resource_id: types::ResponseId::ConnectorTransactionId( - item.response.transactionid, + item.response.transactionid.to_owned(), ), redirection_data: None, mandate_reference: None, connector_metadata: None, network_txn_id: None, - connector_response_reference_id: None, + connector_response_reference_id: Some(item.response.orderid), incremental_authorization_allowed: None, }), enums::AttemptStatus::CaptureInitiated, @@ -726,13 +729,13 @@ impl Response::Approved => ( Ok(types::PaymentsResponseData::TransactionResponse { resource_id: types::ResponseId::ConnectorTransactionId( - item.response.transactionid, + item.response.transactionid.to_owned(), ), redirection_data: None, mandate_reference: None, connector_metadata: None, network_txn_id: None, - connector_response_reference_id: None, + connector_response_reference_id: Some(item.response.orderid), incremental_authorization_allowed: None, }), enums::AttemptStatus::Charged, @@ -757,11 +760,11 @@ impl ForeignFrom<(StandardResponse, u16)> for types::ErrorResponse { fn foreign_from((response, http_code): (StandardResponse, u16)) -> Self { Self { code: response.response_code, - message: response.responsetext, - reason: None, + message: response.responsetext.to_owned(), + reason: Some(response.responsetext), status_code: http_code, attempt_status: None, - connector_transaction_id: None, + connector_transaction_id: Some(response.transactionid), } } } @@ -782,13 +785,13 @@ impl TryFrom> Response::Approved => ( Ok(types::PaymentsResponseData::TransactionResponse { resource_id: types::ResponseId::ConnectorTransactionId( - item.response.transactionid, + item.response.transactionid.to_owned(), ), redirection_data: None, mandate_reference: None, connector_metadata: None, network_txn_id: None, - connector_response_reference_id: None, + connector_response_reference_id: Some(item.response.orderid), incremental_authorization_allowed: None, }), if let Some(diesel_models::enums::CaptureMethod::Automatic) = @@ -832,13 +835,13 @@ impl Response::Approved => ( Ok(types::PaymentsResponseData::TransactionResponse { resource_id: types::ResponseId::ConnectorTransactionId( - item.response.transactionid, + item.response.transactionid.to_owned(), ), redirection_data: None, mandate_reference: None, connector_metadata: None, network_txn_id: None, - connector_response_reference_id: None, + connector_response_reference_id: Some(item.response.orderid), incremental_authorization_allowed: None, }), enums::AttemptStatus::VoidInitiated, @@ -1163,8 +1166,12 @@ pub enum NmiWebhookEventType { impl ForeignFrom for webhooks::IncomingWebhookEvent { fn foreign_from(status: NmiWebhookEventType) -> Self { match status { - NmiWebhookEventType::SaleSuccess => Self::PaymentIntentSuccess, - NmiWebhookEventType::SaleFailure => Self::PaymentIntentFailure, + NmiWebhookEventType::SaleSuccess | NmiWebhookEventType::CaptureSuccess => { + Self::PaymentIntentSuccess + } + NmiWebhookEventType::SaleFailure | NmiWebhookEventType::CaptureFailure => { + Self::PaymentIntentFailure + } NmiWebhookEventType::RefundSuccess => Self::RefundSuccess, NmiWebhookEventType::RefundFailure => Self::RefundFailure, NmiWebhookEventType::VoidSuccess => Self::PaymentIntentCancelled, @@ -1175,8 +1182,6 @@ impl ForeignFrom for webhooks::IncomingWebhookEvent { | NmiWebhookEventType::AuthUnknown | NmiWebhookEventType::VoidFailure | NmiWebhookEventType::VoidUnknown - | NmiWebhookEventType::CaptureSuccess - | NmiWebhookEventType::CaptureFailure | NmiWebhookEventType::CaptureUnknown => Self::EventNotSupported, } } From 00008c16c1c20f1f34381d0fc7e55ef05183e776 Mon Sep 17 00:00:00 2001 From: Sagar naik Date: Fri, 5 Jan 2024 18:58:29 +0530 Subject: [PATCH 16/19] fix(analytics): fixed response code to 501 (#3119) Co-authored-by: Sampras Lopes --- crates/analytics/src/api_event/core.rs | 21 +++++++++++++-------- crates/analytics/src/sdk_events/core.rs | 19 ++++++++++++------- crates/analytics/src/types.rs | 14 ++++++++++++-- crates/router/src/core/webhooks.rs | 2 +- crates/router/src/events/api_logs.rs | 6 +++--- crates/router/src/services/api.rs | 2 +- 6 files changed, 42 insertions(+), 22 deletions(-) diff --git a/crates/analytics/src/api_event/core.rs b/crates/analytics/src/api_event/core.rs index b368d6374f75..81b82c5dce15 100644 --- a/crates/analytics/src/api_event/core.rs +++ b/crates/analytics/src/api_event/core.rs @@ -8,6 +8,7 @@ use api_models::analytics::{ AnalyticsMetadata, ApiEventFiltersResponse, GetApiEventFiltersRequest, GetApiEventMetricRequest, MetricsResponse, }; +use common_utils::errors::ReportSwitchExt; use error_stack::{IntoReport, ResultExt}; use router_env::{ instrument, logger, @@ -32,16 +33,18 @@ pub async fn api_events_core( merchant_id: String, ) -> AnalyticsResult> { let data = match pool { - AnalyticsProvider::Sqlx(_) => Err(FiltersError::NotImplemented) - .into_report() - .attach_printable("SQL Analytics is not implemented for API Events"), + AnalyticsProvider::Sqlx(_) => Err(FiltersError::NotImplemented( + "API Events not implemented for SQLX", + )) + .into_report() + .attach_printable("SQL Analytics is not implemented for API Events"), AnalyticsProvider::Clickhouse(pool) => get_api_event(&merchant_id, req, pool).await, AnalyticsProvider::CombinedSqlx(_sqlx_pool, ckh_pool) | AnalyticsProvider::CombinedCkh(_sqlx_pool, ckh_pool) => { get_api_event(&merchant_id, req, ckh_pool).await } } - .change_context(AnalyticsError::UnknownError)?; + .switch()?; Ok(data) } @@ -58,9 +61,11 @@ pub async fn get_filters( let mut res = ApiEventFiltersResponse::default(); for dim in req.group_by_names { let values = match pool { - AnalyticsProvider::Sqlx(_pool) => Err(FiltersError::NotImplemented) - .into_report() - .attach_printable("SQL Analytics is not implemented for API Events"), + AnalyticsProvider::Sqlx(_pool) => Err(FiltersError::NotImplemented( + "API Events not implemented for SQLX", + )) + .into_report() + .attach_printable("SQL Analytics is not implemented for API Events"), AnalyticsProvider::Clickhouse(ckh_pool) | AnalyticsProvider::CombinedSqlx(_, ckh_pool) | AnalyticsProvider::CombinedCkh(_, ckh_pool) => { @@ -68,7 +73,7 @@ pub async fn get_filters( .await } } - .change_context(AnalyticsError::UnknownError)? + .switch()? .into_iter() .filter_map(|fil: ApiEventFilter| match dim { ApiEventDimensions::StatusCode => fil.status_code.map(|i| i.to_string()), diff --git a/crates/analytics/src/sdk_events/core.rs b/crates/analytics/src/sdk_events/core.rs index 34f23c745b05..46cc636f4388 100644 --- a/crates/analytics/src/sdk_events/core.rs +++ b/crates/analytics/src/sdk_events/core.rs @@ -7,6 +7,7 @@ use api_models::analytics::{ AnalyticsMetadata, GetSdkEventFiltersRequest, GetSdkEventMetricRequest, MetricsResponse, SdkEventFiltersResponse, }; +use common_utils::errors::ReportSwitchExt; use error_stack::{IntoReport, ResultExt}; use router_env::{instrument, logger, tracing}; @@ -28,16 +29,18 @@ pub async fn sdk_events_core( publishable_key: String, ) -> AnalyticsResult> { match pool { - AnalyticsProvider::Sqlx(_) => Err(FiltersError::NotImplemented) - .into_report() - .attach_printable("SQL Analytics is not implemented for Sdk Events"), + AnalyticsProvider::Sqlx(_) => Err(FiltersError::NotImplemented( + "SDK Events not implemented for SQLX", + )) + .into_report() + .attach_printable("SQL Analytics is not implemented for Sdk Events"), AnalyticsProvider::Clickhouse(pool) => get_sdk_event(&publishable_key, req, pool).await, AnalyticsProvider::CombinedSqlx(_sqlx_pool, ckh_pool) | AnalyticsProvider::CombinedCkh(_sqlx_pool, ckh_pool) => { get_sdk_event(&publishable_key, req, ckh_pool).await } } - .change_context(AnalyticsError::UnknownError) + .switch() } #[instrument(skip_all)] @@ -159,9 +162,11 @@ pub async fn get_filters( if let Some(publishable_key) = publishable_key { for dim in req.group_by_names { let values = match pool { - AnalyticsProvider::Sqlx(_pool) => Err(FiltersError::NotImplemented) - .into_report() - .attach_printable("SQL Analytics is not implemented for SDK Events"), + AnalyticsProvider::Sqlx(_pool) => Err(FiltersError::NotImplemented( + "SDK Events not implemented for SQLX", + )) + .into_report() + .attach_printable("SQL Analytics is not implemented for SDK Events"), AnalyticsProvider::Clickhouse(pool) => { get_sdk_event_filter_for_dimension(dim, publishable_key, &req.time_range, pool) .await diff --git a/crates/analytics/src/types.rs b/crates/analytics/src/types.rs index 16d342d3d2ee..8b1bdbd1ab92 100644 --- a/crates/analytics/src/types.rs +++ b/crates/analytics/src/types.rs @@ -8,6 +8,7 @@ use common_utils::{ use error_stack::{report, Report, ResultExt}; use super::query::QueryBuildingError; +use crate::errors::AnalyticsError; #[derive(serde::Deserialize, Debug, serde::Serialize)] #[serde(rename_all = "snake_case")] @@ -124,8 +125,8 @@ pub enum FiltersError { #[error("Error running Query")] QueryExecutionFailure, #[allow(dead_code)] - #[error("Not Implemented")] - NotImplemented, + #[error("Not Implemented: {0}")] + NotImplemented(&'static str), } impl ErrorSwitch for QueryBuildingError { @@ -134,4 +135,13 @@ impl ErrorSwitch for QueryBuildingError { } } +impl ErrorSwitch for FiltersError { + fn switch(&self) -> AnalyticsError { + match self { + Self::QueryBuildingError | Self::QueryExecutionFailure => AnalyticsError::UnknownError, + Self::NotImplemented(a) => AnalyticsError::NotImplemented(a), + } + } +} + impl_misc_api_event_type!(AnalyticsDomain); diff --git a/crates/router/src/core/webhooks.rs b/crates/router/src/core/webhooks.rs index c7e7548f00bd..4354a3ee1959 100644 --- a/crates/router/src/core/webhooks.rs +++ b/crates/router/src/core/webhooks.rs @@ -938,7 +938,7 @@ pub async fn webhooks_wrapper { diff --git a/crates/router/src/events/api_logs.rs b/crates/router/src/events/api_logs.rs index bfc10f722c1f..42017f4500ed 100644 --- a/crates/router/src/events/api_logs.rs +++ b/crates/router/src/events/api_logs.rs @@ -41,7 +41,7 @@ pub struct ApiEvent { #[serde(flatten)] event_type: ApiEventsType, hs_latency: Option, - http_method: Option, + http_method: String, } impl ApiEvent { @@ -59,7 +59,7 @@ impl ApiEvent { error: Option, event_type: ApiEventsType, http_req: &HttpRequest, - http_method: Option, + http_method: &http::Method, ) -> Self { Self { merchant_id, @@ -83,7 +83,7 @@ impl ApiEvent { url_path: http_req.path().to_string(), event_type, hs_latency, - http_method, + http_method: http_method.to_string(), } } } diff --git a/crates/router/src/services/api.rs b/crates/router/src/services/api.rs index 9ac8d5e5eb41..8298d9a105bf 100644 --- a/crates/router/src/services/api.rs +++ b/crates/router/src/services/api.rs @@ -938,7 +938,7 @@ where error, event_type.unwrap_or(ApiEventsType::Miscellaneous), request, - Some(request.method().to_string()), + request.method(), ); match api_event.clone().try_into() { Ok(event) => { From d152c3a1ca70c39f5c64edf63b5995f6cf02c88a Mon Sep 17 00:00:00 2001 From: Sagar naik Date: Fri, 5 Jan 2024 18:58:55 +0530 Subject: [PATCH 17/19] fix(analytics): added response to the connector outgoing event (#3129) Co-authored-by: harsh-sharma-juspay <125131007+harsh-sharma-juspay@users.noreply.github.com> Co-authored-by: Sampras lopes --- .../{api_events_v2.sql => api_events.sql} | 32 ++++-- .../clickhouse/scripts/connector_events.sql | 97 ++++++++++++++++ crates/common_utils/src/events.rs | 5 +- crates/router/src/events/api_logs.rs | 13 ++- crates/router/src/services/api.rs | 12 +- crates/router/src/services/kafka.rs | 8 -- crates/router/src/services/kafka/api_event.rs | 108 ------------------ .../src/services/kafka/outgoing_request.rs | 19 --- 8 files changed, 145 insertions(+), 149 deletions(-) rename crates/analytics/docs/clickhouse/scripts/{api_events_v2.sql => api_events.sql} (83%) create mode 100644 crates/analytics/docs/clickhouse/scripts/connector_events.sql delete mode 100644 crates/router/src/services/kafka/api_event.rs delete mode 100644 crates/router/src/services/kafka/outgoing_request.rs diff --git a/crates/analytics/docs/clickhouse/scripts/api_events_v2.sql b/crates/analytics/docs/clickhouse/scripts/api_events.sql similarity index 83% rename from crates/analytics/docs/clickhouse/scripts/api_events_v2.sql rename to crates/analytics/docs/clickhouse/scripts/api_events.sql index 33f158ce48b7..c3fc3d7b06d5 100644 --- a/crates/analytics/docs/clickhouse/scripts/api_events_v2.sql +++ b/crates/analytics/docs/clickhouse/scripts/api_events.sql @@ -1,4 +1,4 @@ -CREATE TABLE api_events_v2_queue ( +CREATE TABLE api_events_queue ( `merchant_id` String, `payment_id` Nullable(String), `refund_id` Nullable(String), @@ -14,12 +14,15 @@ CREATE TABLE api_events_v2_queue ( `api_auth_type` LowCardinality(String), `request` String, `response` Nullable(String), + `error` Nullable(String), `authentication_data` Nullable(String), `status_code` UInt32, - `created_at` DateTime CODEC(T64, LZ4), + `created_at_timestamp` DateTime64(3), `latency` UInt128, `user_agent` String, `ip_addr` String, + `hs_latency` Nullable(UInt128), + `http_method` LowCardinality(String), `url_path` String ) ENGINE = Kafka SETTINGS kafka_broker_list = 'kafka0:29092', kafka_topic_list = 'hyperswitch-api-log-events', @@ -28,7 +31,7 @@ kafka_format = 'JSONEachRow', kafka_handle_error_mode = 'stream'; -CREATE TABLE api_events_v2_dist ( +CREATE TABLE api_events_dist ( `merchant_id` String, `payment_id` Nullable(String), `refund_id` Nullable(String), @@ -44,13 +47,15 @@ CREATE TABLE api_events_v2_dist ( `api_auth_type` LowCardinality(String), `request` String, `response` Nullable(String), + `error` Nullable(String), `authentication_data` Nullable(String), `status_code` UInt32, - `created_at` DateTime CODEC(T64, LZ4), - `inserted_at` DateTime CODEC(T64, LZ4), + `created_at_timestamp` DateTime64(3), `latency` UInt128, `user_agent` String, `ip_addr` String, + `hs_latency` Nullable(UInt128), + `http_method` LowCardinality(String), `url_path` String, INDEX flowIndex flow_type TYPE bloom_filter GRANULARITY 1, INDEX apiIndex api_flow TYPE bloom_filter GRANULARITY 1, @@ -62,7 +67,7 @@ ORDER BY TTL created_at + toIntervalMonth(6) ; -CREATE MATERIALIZED VIEW api_events_v2_mv TO api_events_v2_dist ( +CREATE MATERIALIZED VIEW api_events_mv TO api_events_dist ( `merchant_id` String, `payment_id` Nullable(String), `refund_id` Nullable(String), @@ -78,13 +83,15 @@ CREATE MATERIALIZED VIEW api_events_v2_mv TO api_events_v2_dist ( `api_auth_type` LowCardinality(String), `request` String, `response` Nullable(String), + `error` Nullable(String), `authentication_data` Nullable(String), `status_code` UInt32, - `created_at` DateTime CODEC(T64, LZ4), - `inserted_at` DateTime CODEC(T64, LZ4), + `created_at_timestamp` DateTime64(3), `latency` UInt128, `user_agent` String, `ip_addr` String, + `hs_latency` Nullable(UInt128), + `http_method` LowCardinality(String), `url_path` String ) AS SELECT @@ -103,16 +110,19 @@ SELECT api_auth_type, request, response, + error, authentication_data, status_code, - created_at, + created_at_timestamp, now() as inserted_at, latency, user_agent, ip_addr, + hs_latency, + http_method, url_path FROM - api_events_v2_queue + api_events_queue where length(_error) = 0; @@ -133,6 +143,6 @@ SELECT _offset AS offset, _raw_message AS raw, _error AS error -FROM api_events_v2_queue +FROM api_events_queue WHERE length(_error) > 0 ; diff --git a/crates/analytics/docs/clickhouse/scripts/connector_events.sql b/crates/analytics/docs/clickhouse/scripts/connector_events.sql new file mode 100644 index 000000000000..5821cd035567 --- /dev/null +++ b/crates/analytics/docs/clickhouse/scripts/connector_events.sql @@ -0,0 +1,97 @@ +CREATE TABLE connector_events_queue ( + `merchant_id` String, + `payment_id` Nullable(String), + `connector_name` LowCardinality(String), + `request_id` String, + `flow` LowCardinality(String), + `request` String, + `response` Nullable(String), + `error` Nullable(String), + `status_code` UInt32, + `created_at` DateTime64(3), + `latency` UInt128, + `method` LowCardinality(String) +) ENGINE = Kafka SETTINGS kafka_broker_list = 'kafka0:29092', +kafka_topic_list = 'hyperswitch-connector-api-events', +kafka_group_name = 'hyper-c1', +kafka_format = 'JSONEachRow', +kafka_handle_error_mode = 'stream'; + + +CREATE TABLE connector_events_dist ( + `merchant_id` String, + `payment_id` Nullable(String), + `connector_name` LowCardinality(String), + `request_id` String, + `flow` LowCardinality(String), + `request` String, + `response` Nullable(String), + `error` Nullable(String), + `status_code` UInt32, + `created_at` DateTime64(3), + `inserted_at` DateTime64(3), + `latency` UInt128, + `method` LowCardinality(String), + INDEX flowIndex flowTYPE bloom_filter GRANULARITY 1, + INDEX connectorIndex connector_name TYPE bloom_filter GRANULARITY 1, + INDEX statusIndex status_code TYPE bloom_filter GRANULARITY 1 +) ENGINE = MergeTree +PARTITION BY toStartOfDay(created_at) +ORDER BY + (created_at, merchant_id, flow_type, status_code, api_flow) +TTL created_at + toIntervalMonth(6) +; + +CREATE MATERIALIZED VIEW connector_events_mv TO connector_events_dist ( + `merchant_id` String, + `payment_id` Nullable(String), + `connector_name` LowCardinality(String), + `request_id` String, + `flow` LowCardinality(String), + `request` String, + `response` Nullable(String), + `error` Nullable(String), + `status_code` UInt32, + `created_at` DateTime64(3), + `latency` UInt128, + `method` LowCardinality(String) +) AS +SELECT + merchant_id, + payment_id, + connector_name, + request_id, + flow, + request, + response, + error, + status_code, + created_at, + now() as inserted_at, + latency, + method, +FROM + connector_events_queue +where length(_error) = 0; + + +CREATE MATERIALIZED VIEW connector_events_parse_errors +( + `topic` String, + `partition` Int64, + `offset` Int64, + `raw` String, + `error` String +) +ENGINE = MergeTree +ORDER BY (topic, partition, offset) +SETTINGS index_granularity = 8192 AS +SELECT + _topic AS topic, + _partition AS partition, + _offset AS offset, + _raw_message AS raw, + _error AS error +FROM connector_events_queue +WHERE length(_error) > 0 +; diff --git a/crates/common_utils/src/events.rs b/crates/common_utils/src/events.rs index c9efbb73c208..6bbf78afe421 100644 --- a/crates/common_utils/src/events.rs +++ b/crates/common_utils/src/events.rs @@ -40,7 +40,10 @@ pub enum ApiEventsType { }, Routing, ResourceListAPI, - PaymentRedirectionResponse, + PaymentRedirectionResponse { + connector: Option, + payment_id: Option, + }, Gsm, // TODO: This has to be removed once the corresponding apiEventTypes are created Miscellaneous, diff --git a/crates/router/src/events/api_logs.rs b/crates/router/src/events/api_logs.rs index 42017f4500ed..78a66d2f04e7 100644 --- a/crates/router/src/events/api_logs.rs +++ b/crates/router/src/events/api_logs.rs @@ -116,7 +116,6 @@ impl_misc_api_event_type!( AttachEvidenceRequest, DisputeId, PaymentLinkFormData, - PaymentsRedirectResponseData, ConfigUpdate ); @@ -131,3 +130,15 @@ impl_misc_api_event_type!( DummyConnectorRefundResponse, DummyConnectorRefundRequest ); + +impl ApiEventMetric for PaymentsRedirectResponseData { + fn get_api_event_type(&self) -> Option { + Some(ApiEventsType::PaymentRedirectionResponse { + connector: self.connector.clone(), + payment_id: match &self.resource_id { + api_models::payments::PaymentIdType::PaymentIntentId(id) => Some(id.clone()), + _ => None, + }, + }) + } +} diff --git a/crates/router/src/services/api.rs b/crates/router/src/services/api.rs index 8298d9a105bf..ba3607fb7dc5 100644 --- a/crates/router/src/services/api.rs +++ b/crates/router/src/services/api.rs @@ -377,7 +377,17 @@ where req.connector.clone(), std::any::type_name::(), masked_request_body, - None, + response + .as_ref() + .map(|response| { + response + .as_ref() + .map_or_else(|value| value, |value| value) + .response + .escape_ascii() + .to_string() + }) + .ok(), request_url, request_method, req.payment_id.clone(), diff --git a/crates/router/src/services/kafka.rs b/crates/router/src/services/kafka.rs index 5a6d7043e6d0..2b29a61b4a4f 100644 --- a/crates/router/src/services/kafka.rs +++ b/crates/router/src/services/kafka.rs @@ -8,12 +8,9 @@ use rdkafka::{ }; use crate::events::EventType; -mod api_event; -pub mod outgoing_request; mod payment_attempt; mod payment_intent; mod refund; -pub use api_event::{ApiCallEventType, ApiEvents, ApiEventsType}; use data_models::payments::{payment_attempt::PaymentAttempt, PaymentIntent}; use diesel_models::refund::Refund; use serde::Serialize; @@ -300,11 +297,6 @@ impl KafkaProducer { }) } - pub async fn log_api_event(&self, event: &ApiEvents) -> MQResult<()> { - self.log_kafka_event(&self.api_logs_topic, event) - .attach_printable_lazy(|| format!("Failed to add api log event {event:?}")) - } - pub fn get_topic(&self, event: EventType) -> &str { match event { EventType::ApiLogs => &self.api_logs_topic, diff --git a/crates/router/src/services/kafka/api_event.rs b/crates/router/src/services/kafka/api_event.rs deleted file mode 100644 index 7de271915927..000000000000 --- a/crates/router/src/services/kafka/api_event.rs +++ /dev/null @@ -1,108 +0,0 @@ -use api_models::enums as api_enums; -use serde::{Deserialize, Serialize}; -use time::OffsetDateTime; - -#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)] -#[serde(tag = "flow_type")] -pub enum ApiEventsType { - Payment { - payment_id: String, - }, - Refund { - payment_id: String, - refund_id: String, - }, - Default, - PaymentMethod { - payment_method_id: String, - payment_method: Option, - payment_method_type: Option, - }, - Customer { - customer_id: String, - }, - User { - //specified merchant_id will overridden on global defined - merchant_id: String, - user_id: String, - }, - Webhooks { - connector: String, - payment_id: Option, - }, - OutgoingEvent, -} - -#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)] -pub struct ApiEvents { - pub api_name: String, - pub request_id: Option, - //It is require to solve ambiquity in case of event_type is User - #[serde(skip_serializing_if = "Option::is_none")] - pub merchant_id: Option, - pub request: String, - pub response: String, - pub status_code: u16, - #[serde(with = "time::serde::timestamp")] - pub created_at: OffsetDateTime, - pub latency: u128, - //conflicting fields underlying enums will be used - #[serde(flatten)] - pub event_type: ApiEventsType, - pub user_agent: Option, - pub ip_addr: Option, - pub url_path: Option, - pub api_event_type: Option, -} - -#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)] -pub enum ApiCallEventType { - IncomingApiEvent, - OutgoingApiEvent, -} - -impl super::KafkaMessage for ApiEvents { - fn key(&self) -> String { - match &self.event_type { - ApiEventsType::Payment { payment_id } => format!( - "{}_{}", - self.merchant_id - .as_ref() - .unwrap_or(&"default_merchant_id".to_string()), - payment_id - ), - ApiEventsType::Refund { - payment_id, - refund_id, - } => format!("{payment_id}_{refund_id}"), - ApiEventsType::Default => "key".to_string(), - ApiEventsType::PaymentMethod { - payment_method_id, - payment_method, - payment_method_type, - } => format!( - "{:?}_{:?}_{:?}", - payment_method_id.clone(), - payment_method.clone(), - payment_method_type.clone(), - ), - ApiEventsType::Customer { customer_id } => customer_id.to_string(), - ApiEventsType::User { - merchant_id, - user_id, - } => format!("{}_{}", merchant_id, user_id), - ApiEventsType::Webhooks { - connector, - payment_id, - } => format!( - "webhook_{}_{connector}", - payment_id.clone().unwrap_or_default() - ), - ApiEventsType::OutgoingEvent => "outgoing_event".to_string(), - } - } - - fn creation_timestamp(&self) -> Option { - Some(self.created_at.unix_timestamp()) - } -} diff --git a/crates/router/src/services/kafka/outgoing_request.rs b/crates/router/src/services/kafka/outgoing_request.rs deleted file mode 100644 index bb09fe91fe6d..000000000000 --- a/crates/router/src/services/kafka/outgoing_request.rs +++ /dev/null @@ -1,19 +0,0 @@ -use reqwest::Url; - -pub struct OutgoingRequest { - pub url: Url, - pub latency: u128, -} - -// impl super::KafkaMessage for OutgoingRequest { -// fn key(&self) -> String { -// format!( -// "{}_{}", - -// ) -// } - -// fn creation_timestamp(&self) -> Option { -// Some(self.created_at.unix_timestamp()) -// } -// } From 7ea50c3a78bc1a091077c23999a69dda1cf0f463 Mon Sep 17 00:00:00 2001 From: Jeeva Ramachandran <120017870+JeevaRamu0104@users.noreply.github.com> Date: Mon, 8 Jan 2024 11:25:05 +0530 Subject: [PATCH 18/19] refactor(euclid_wasm): Update wasm config (#3222) --- crates/connector_configs/src/common_config.rs | 47 +- crates/connector_configs/src/connector.rs | 55 +- .../src/response_modifier.rs | 121 +- crates/connector_configs/src/transformer.rs | 14 +- .../connector_configs/toml/development.toml | 2387 +++++++++++++--- crates/connector_configs/toml/production.toml | 1622 +++++++++-- crates/connector_configs/toml/sandbox.toml | 2398 ++++++++++++++--- 7 files changed, 5682 insertions(+), 962 deletions(-) diff --git a/crates/connector_configs/src/common_config.rs b/crates/connector_configs/src/common_config.rs index 6ba44d4ed7eb..c3cbaab4ab33 100644 --- a/crates/connector_configs/src/common_config.rs +++ b/crates/connector_configs/src/common_config.rs @@ -83,6 +83,49 @@ pub struct ApiModelMetaData { pub apple_pay_combined: Option, } +#[serde_with::skip_serializing_none] +#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, ToSchema, Deserialize)] +#[serde(rename_all = "snake_case")] +pub struct CardProvider { + pub payment_method_type: api_models::enums::CardNetwork, + /// List of currencies accepted or has the processing capabilities of the processor + #[schema(example = json!( + { + "type": "specific_accepted", + "list": ["USD", "INR"] + } + ), value_type = Option)] + pub accepted_currencies: Option, + #[schema(example = json!( + { + "type": "specific_accepted", + "list": ["UK", "AU"] + } + ), value_type = Option)] + pub accepted_countries: Option, +} +#[serde_with::skip_serializing_none] +#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, ToSchema, Deserialize)] +#[serde(rename_all = "snake_case")] +pub struct Provider { + pub payment_method_type: api_models::enums::PaymentMethodType, + /// List of currencies accepted or has the processing capabilities of the processor + #[schema(example = json!( + { + "type": "specific_accepted", + "list": ["USD", "INR"] + } + ), value_type = Option)] + pub accepted_currencies: Option, + #[schema(example = json!( + { + "type": "specific_accepted", + "list": ["UK", "AU"] + } + ), value_type = Option)] + pub accepted_countries: Option, +} + #[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ToSchema)] #[serde(rename_all = "snake_case")] pub struct ConnectorApiIntegrationPayload { @@ -105,8 +148,8 @@ pub struct ConnectorApiIntegrationPayload { pub struct DashboardPaymentMethodPayload { pub payment_method: api_models::enums::PaymentMethod, pub payment_method_type: String, - pub provider: Option>, - pub card_provider: Option>, + pub provider: Option>, + pub card_provider: Option>, } #[derive(Debug, Clone, Serialize, Deserialize)] diff --git a/crates/connector_configs/src/connector.rs b/crates/connector_configs/src/connector.rs index f41fa4aab457..f0997d53107e 100644 --- a/crates/connector_configs/src/connector.rs +++ b/crates/connector_configs/src/connector.rs @@ -2,24 +2,31 @@ use std::collections::HashMap; #[cfg(feature = "payouts")] use api_models::enums::PayoutConnectors; -use api_models::{ - enums::{CardNetwork, Connector, PaymentMethodType}, - payments, -}; +use api_models::{enums::Connector, payments}; use serde::Deserialize; #[cfg(any(feature = "sandbox", feature = "development", feature = "production"))] use toml; -use crate::common_config::{GooglePayData, ZenApplePay}; +use crate::common_config::{CardProvider, GooglePayData, Provider, ZenApplePay}; + +#[derive(Default, Debug, Clone, serde::Serialize, serde::Deserialize)] +pub struct Classic { + pub password_classic: String, + pub username_classic: String, + pub merchant_id_classic: String, +} + +#[derive(Default, Debug, Clone, serde::Serialize, serde::Deserialize)] +pub struct Evoucher { + pub password_evoucher: String, + pub username_evoucher: String, + pub merchant_id_evoucher: String, +} #[derive(Default, Debug, Clone, serde::Serialize, serde::Deserialize)] pub struct CurrencyAuthKeyType { - pub password_classic: Option, - pub username_classic: Option, - pub merchant_id_classic: Option, - pub password_evoucher: Option, - pub username_evoucher: Option, - pub merchant_id_evoucher: Option, + pub classic: Classic, + pub evoucher: Evoucher, } #[derive(Default, Debug, Clone, serde::Serialize, serde::Deserialize)] @@ -75,19 +82,19 @@ pub struct ConnectorTomlConfig { pub connector_auth: Option, pub connector_webhook_details: Option, pub metadata: Option, - pub credit: Option>, - pub debit: Option>, - pub bank_transfer: Option>, - pub bank_redirect: Option>, - pub bank_debit: Option>, - pub pay_later: Option>, - pub wallet: Option>, - pub crypto: Option>, - pub reward: Option>, - pub upi: Option>, - pub voucher: Option>, - pub gift_card: Option>, - pub card_redirect: Option>, + pub credit: Option>, + pub debit: Option>, + pub bank_transfer: Option>, + pub bank_redirect: Option>, + pub bank_debit: Option>, + pub pay_later: Option>, + pub wallet: Option>, + pub crypto: Option>, + pub reward: Option>, + pub upi: Option>, + pub voucher: Option>, + pub gift_card: Option>, + pub card_redirect: Option>, pub is_verifiable: Option, } #[serde_with::skip_serializing_none] diff --git a/crates/connector_configs/src/response_modifier.rs b/crates/connector_configs/src/response_modifier.rs index 6a09c58a75ca..80332612c13a 100644 --- a/crates/connector_configs/src/response_modifier.rs +++ b/crates/connector_configs/src/response_modifier.rs @@ -1,23 +1,23 @@ use crate::common_config::{ - ConnectorApiIntegrationPayload, DashboardMetaData, DashboardPaymentMethodPayload, - DashboardRequestPayload, GoogleApiModelData, GooglePayData, GpayDashboardPayLoad, + CardProvider, ConnectorApiIntegrationPayload, DashboardMetaData, DashboardPaymentMethodPayload, + DashboardRequestPayload, GoogleApiModelData, GooglePayData, GpayDashboardPayLoad, Provider, }; impl ConnectorApiIntegrationPayload { pub fn get_transformed_response_payload(response: Self) -> DashboardRequestPayload { - let mut wallet_details = Vec::new(); - let mut bank_redirect_details = Vec::new(); - let mut pay_later_details = Vec::new(); - let mut debit_details = Vec::new(); - let mut credit_details = Vec::new(); - let mut bank_transfer_details = Vec::new(); - let mut crypto_details = Vec::new(); - let mut bank_debit_details = Vec::new(); - let mut reward_details = Vec::new(); - let mut upi_details = Vec::new(); - let mut voucher_details = Vec::new(); - let mut gift_card_details = Vec::new(); - let mut card_redirect_details = Vec::new(); + let mut wallet_details: Vec = Vec::new(); + let mut bank_redirect_details: Vec = Vec::new(); + let mut pay_later_details: Vec = Vec::new(); + let mut debit_details: Vec = Vec::new(); + let mut credit_details: Vec = Vec::new(); + let mut bank_transfer_details: Vec = Vec::new(); + let mut crypto_details: Vec = Vec::new(); + let mut bank_debit_details: Vec = Vec::new(); + let mut reward_details: Vec = Vec::new(); + let mut upi_details: Vec = Vec::new(); + let mut voucher_details: Vec = Vec::new(); + let mut gift_card_details: Vec = Vec::new(); + let mut card_redirect_details: Vec = Vec::new(); if let Some(payment_methods_enabled) = response.payment_methods_enabled.clone() { for methods in payment_methods_enabled { @@ -25,19 +25,35 @@ impl ConnectorApiIntegrationPayload { api_models::enums::PaymentMethod::Card => { if let Some(payment_method_types) = methods.payment_method_types { for method_type in payment_method_types { - let payment_type = method_type.payment_method_type; - match payment_type { + match method_type.payment_method_type { api_models::enums::PaymentMethodType::Credit => { if let Some(card_networks) = method_type.card_networks { for card in card_networks { - credit_details.push(card) + credit_details.push(CardProvider { + payment_method_type: card, + accepted_currencies: method_type + .accepted_currencies + .clone(), + accepted_countries: method_type + .accepted_countries + .clone(), + }) } } } api_models::enums::PaymentMethodType::Debit => { if let Some(card_networks) = method_type.card_networks { for card in card_networks { - debit_details.push(card) + // debit_details.push(card) + debit_details.push(CardProvider { + payment_method_type: card, + accepted_currencies: method_type + .accepted_currencies + .clone(), + accepted_countries: method_type + .accepted_countries + .clone(), + }) } } } @@ -49,77 +65,122 @@ impl ConnectorApiIntegrationPayload { api_models::enums::PaymentMethod::Wallet => { if let Some(payment_method_types) = methods.payment_method_types { for method_type in payment_method_types { - wallet_details.push(method_type.payment_method_type) + // wallet_details.push(method_type.payment_method_type) + wallet_details.push(Provider { + payment_method_type: method_type.payment_method_type, + accepted_currencies: method_type.accepted_currencies.clone(), + accepted_countries: method_type.accepted_countries.clone(), + }) } } } api_models::enums::PaymentMethod::BankRedirect => { if let Some(payment_method_types) = methods.payment_method_types { for method_type in payment_method_types { - bank_redirect_details.push(method_type.payment_method_type) + bank_redirect_details.push(Provider { + payment_method_type: method_type.payment_method_type, + accepted_currencies: method_type.accepted_currencies.clone(), + accepted_countries: method_type.accepted_countries.clone(), + }) } } } api_models::enums::PaymentMethod::PayLater => { if let Some(payment_method_types) = methods.payment_method_types { for method_type in payment_method_types { - pay_later_details.push(method_type.payment_method_type) + pay_later_details.push(Provider { + payment_method_type: method_type.payment_method_type, + accepted_currencies: method_type.accepted_currencies.clone(), + accepted_countries: method_type.accepted_countries.clone(), + }) } } } api_models::enums::PaymentMethod::BankTransfer => { if let Some(payment_method_types) = methods.payment_method_types { for method_type in payment_method_types { - bank_transfer_details.push(method_type.payment_method_type) + bank_transfer_details.push(Provider { + payment_method_type: method_type.payment_method_type, + accepted_currencies: method_type.accepted_currencies.clone(), + accepted_countries: method_type.accepted_countries.clone(), + }) } } } api_models::enums::PaymentMethod::Crypto => { if let Some(payment_method_types) = methods.payment_method_types { for method_type in payment_method_types { - crypto_details.push(method_type.payment_method_type) + crypto_details.push(Provider { + payment_method_type: method_type.payment_method_type, + accepted_currencies: method_type.accepted_currencies.clone(), + accepted_countries: method_type.accepted_countries.clone(), + }) } } } api_models::enums::PaymentMethod::BankDebit => { if let Some(payment_method_types) = methods.payment_method_types { for method_type in payment_method_types { - bank_debit_details.push(method_type.payment_method_type) + bank_debit_details.push(Provider { + payment_method_type: method_type.payment_method_type, + accepted_currencies: method_type.accepted_currencies.clone(), + accepted_countries: method_type.accepted_countries.clone(), + }) } } } api_models::enums::PaymentMethod::Reward => { if let Some(payment_method_types) = methods.payment_method_types { for method_type in payment_method_types { - reward_details.push(method_type.payment_method_type) + reward_details.push(Provider { + payment_method_type: method_type.payment_method_type, + accepted_currencies: method_type.accepted_currencies.clone(), + accepted_countries: method_type.accepted_countries.clone(), + }) } } } api_models::enums::PaymentMethod::Upi => { if let Some(payment_method_types) = methods.payment_method_types { for method_type in payment_method_types { - upi_details.push(method_type.payment_method_type) + upi_details.push(Provider { + payment_method_type: method_type.payment_method_type, + accepted_currencies: method_type.accepted_currencies.clone(), + accepted_countries: method_type.accepted_countries.clone(), + }) } } } api_models::enums::PaymentMethod::Voucher => { if let Some(payment_method_types) = methods.payment_method_types { for method_type in payment_method_types { - voucher_details.push(method_type.payment_method_type) + voucher_details.push(Provider { + payment_method_type: method_type.payment_method_type, + accepted_currencies: method_type.accepted_currencies.clone(), + accepted_countries: method_type.accepted_countries.clone(), + }) } } } api_models::enums::PaymentMethod::GiftCard => { if let Some(payment_method_types) = methods.payment_method_types { for method_type in payment_method_types { - gift_card_details.push(method_type.payment_method_type) + gift_card_details.push(Provider { + payment_method_type: method_type.payment_method_type, + accepted_currencies: method_type.accepted_currencies.clone(), + accepted_countries: method_type.accepted_countries.clone(), + }) } } } api_models::enums::PaymentMethod::CardRedirect => { if let Some(payment_method_types) = methods.payment_method_types { for method_type in payment_method_types { - card_redirect_details.push(method_type.payment_method_type) + card_redirect_details.push(Provider { + payment_method_type: method_type.payment_method_type, + accepted_currencies: method_type.accepted_currencies.clone(), + accepted_countries: method_type.accepted_countries.clone(), + }) } } } diff --git a/crates/connector_configs/src/transformer.rs b/crates/connector_configs/src/transformer.rs index aff75128e9cf..be68a0c5f94b 100644 --- a/crates/connector_configs/src/transformer.rs +++ b/crates/connector_configs/src/transformer.rs @@ -10,7 +10,7 @@ use api_models::{ use crate::common_config::{ ApiModelMetaData, ConnectorApiIntegrationPayload, DashboardMetaData, DashboardRequestPayload, - GoogleApiModelData, GooglePayData, PaymentMethodsEnabled, + GoogleApiModelData, GooglePayData, PaymentMethodsEnabled, Provider, }; impl DashboardRequestPayload { @@ -63,23 +63,23 @@ impl DashboardRequestPayload { } pub fn transform_payment_method( connector: Connector, - provider: Vec, + provider: Vec, payment_method: PaymentMethod, ) -> Vec { let mut payment_method_types = Vec::new(); for method_type in provider { let data = payment_methods::RequestPaymentMethodTypes { - payment_method_type: method_type, + payment_method_type: method_type.payment_method_type, card_networks: None, minimum_amount: Some(0), maximum_amount: Some(68607706), recurring_enabled: true, installment_payment_enabled: false, - accepted_currencies: None, - accepted_countries: None, + accepted_currencies: method_type.accepted_currencies, + accepted_countries: method_type.accepted_countries, payment_experience: Self::get_payment_experience( connector, - method_type, + method_type.payment_method_type, payment_method, ), }; @@ -109,7 +109,7 @@ impl DashboardRequestPayload { for method in card_provider { let data = payment_methods::RequestPaymentMethodTypes { payment_method_type: payment_type, - card_networks: Some(vec![method]), + card_networks: Some(vec![method.payment_method_type]), minimum_amount: Some(0), maximum_amount: Some(68607706), recurring_enabled: true, diff --git a/crates/connector_configs/toml/development.toml b/crates/connector_configs/toml/development.toml index b69b1aabaff2..b24de92de101 100644 --- a/crates/connector_configs/toml/development.toml +++ b/crates/connector_configs/toml/development.toml @@ -1,32 +1,235 @@ - [aci] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -wallet = ["ali_pay","mb_way"] -bank_redirect=["ideal","giropay","sofort","eps","przelewy24","trustly","interac"] +[[aci.credit]] + payment_method_type = "Mastercard" +[[aci.credit]] + payment_method_type = "Visa" +[[aci.credit]] + payment_method_type = "Interac" +[[aci.credit]] + payment_method_type = "AmericanExpress" +[[aci.credit]] + payment_method_type = "JCB" +[[aci.credit]] + payment_method_type = "DinersClub" +[[aci.credit]] + payment_method_type = "Discover" +[[aci.credit]] + payment_method_type = "CartesBancaires" +[[aci.credit]] + payment_method_type = "UnionPay" +[[aci.debit]] + payment_method_type = "Mastercard" +[[aci.debit]] + payment_method_type = "Visa" +[[aci.debit]] + payment_method_type = "Interac" +[[aci.debit]] + payment_method_type = "AmericanExpress" +[[aci.debit]] + payment_method_type = "JCB" +[[aci.debit]] + payment_method_type = "DinersClub" +[[aci.debit]] + payment_method_type = "Discover" +[[aci.debit]] + payment_method_type = "CartesBancaires" +[[aci.debit]] + payment_method_type = "UnionPay" +[[aci.wallet]] + payment_method_type = "ali_pay" +[[aci.wallet]] + payment_method_type = "mb_way" +[[aci.bank_redirect]] + payment_method_type = "ideal" +[[aci.bank_redirect]] + payment_method_type = "giropay" +[[aci.bank_redirect]] + payment_method_type = "sofort" +[[aci.bank_redirect]] + payment_method_type = "eps" +[[aci.bank_redirect]] + payment_method_type = "przelewy24" +[[aci.bank_redirect]] + payment_method_type = "trustly" +[[aci.bank_redirect]] + payment_method_type = "interac" [aci.connector_auth.BodyKey] api_key="API Key" key1="Entity ID" [aci.connector_webhook_details] merchant_secret="Source verification key" + [adyen] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -pay_later=["klarna","affirm","afterpay_clearpay","pay_bright","walley", "alma", "atome"] -bank_debit=["ach","bacs","sepa"] -bank_redirect=["ideal","giropay","sofort","eps","blik","przelewy24","trustly","online_banking_czech_republic","online_banking_finland","online_banking_poland","online_banking_slovakia","bancontact_card", "online_banking_fpx", "online_banking_thailand", "bizum", "open_banking_uk"] -bank_transfer = ["permata_bank_transfer", "bca_bank_transfer", "bni_va", "bri_va", "cimb_va", "danamon_va", "mandiri_va"] -wallet = ["apple_pay","google_pay","paypal","we_chat_pay","ali_pay","mb_way", "ali_pay_hk", "go_pay", "kakao_pay", "twint", "gcash", "vipps", "dana", "momo", "swish", "touch_n_go"] -voucher = ["boleto", "alfamart", "indomaret", "oxxo", "seven_eleven", "lawson", "mini_stop", "family_mart", "seicomart", "pay_easy"] -gift_card = ["pay_safe_card", "givex"] -card_redirect = ["benefit", "knet", "momo_atm"] +[[adyen.credit]] + payment_method_type = "Mastercard" +[[adyen.credit]] + payment_method_type = "Visa" +[[adyen.credit]] + payment_method_type = "Interac" +[[adyen.credit]] + payment_method_type = "AmericanExpress" +[[adyen.credit]] + payment_method_type = "JCB" +[[adyen.credit]] + payment_method_type = "DinersClub" +[[adyen.credit]] + payment_method_type = "Discover" +[[adyen.credit]] + payment_method_type = "CartesBancaires" +[[adyen.credit]] + payment_method_type = "UnionPay" +[[adyen.debit]] + payment_method_type = "Mastercard" +[[adyen.debit]] + payment_method_type = "Visa" +[[adyen.debit]] + payment_method_type = "Interac" +[[adyen.debit]] + payment_method_type = "AmericanExpress" +[[adyen.debit]] + payment_method_type = "JCB" +[[adyen.debit]] + payment_method_type = "DinersClub" +[[adyen.debit]] + payment_method_type = "Discover" +[[adyen.debit]] + payment_method_type = "CartesBancaires" +[[adyen.debit]] + payment_method_type = "UnionPay" +[[adyen.pay_later]] + payment_method_type = "klarna" +[[adyen.pay_later]] + payment_method_type = "affirm" +[[adyen.pay_later]] + payment_method_type = "afterpay_clearpay" +[[adyen.pay_later]] + payment_method_type = "pay_bright" +[[adyen.pay_later]] + payment_method_type = "walley" +[[adyen.pay_later]] + payment_method_type = "alma" +[[adyen.pay_later]] + payment_method_type = "atome" +[[adyen.bank_debit]] + payment_method_type = "ach" +[[adyen.bank_debit]] + payment_method_type = "bacs" +[[adyen.bank_debit]] + payment_method_type = "sepa" +[[adyen.bank_redirect]] + payment_method_type = "ideal" +[[adyen.bank_redirect]] + payment_method_type = "giropay" +[[adyen.bank_redirect]] + payment_method_type = "sofort" +[[adyen.bank_redirect]] + payment_method_type = "eps" +[[adyen.bank_redirect]] + payment_method_type = "blik" +[[adyen.bank_redirect]] + payment_method_type = "przelewy24" +[[adyen.bank_redirect]] + payment_method_type = "trustly" +[[adyen.bank_redirect]] + payment_method_type = "online_banking_czech_republic" +[[adyen.bank_redirect]] + payment_method_type = "online_banking_finland" +[[adyen.bank_redirect]] + payment_method_type = "online_banking_poland" +[[adyen.bank_redirect]] + payment_method_type = "online_banking_slovakia" +[[adyen.bank_redirect]] + payment_method_type = "bancontact_card" +[[adyen.bank_redirect]] + payment_method_type = "online_banking_fpx" +[[adyen.bank_redirect]] + payment_method_type = "online_banking_thailand" +[[adyen.bank_redirect]] + payment_method_type = "bizum" +[[adyen.bank_redirect]] + payment_method_type = "open_banking_uk" +[[adyen.bank_transfer]] + payment_method_type = "permata_bank_transfer" +[[adyen.bank_transfer]] + payment_method_type = "bca_bank_transfer" +[[adyen.bank_transfer]] + payment_method_type = "bni_va" +[[adyen.bank_transfer]] + payment_method_type = "bri_va" +[[adyen.bank_transfer]] + payment_method_type = "cimb_va" +[[adyen.bank_transfer]] + payment_method_type = "danamon_va" +[[adyen.bank_transfer]] + payment_method_type = "mandiri_va" +[[adyen.wallet]] + payment_method_type = "apple_pay" +[[adyen.wallet]] + payment_method_type = "google_pay" +[[adyen.wallet]] + payment_method_type = "paypal" +[[adyen.wallet]] + payment_method_type = "we_chat_pay" +[[adyen.wallet]] + payment_method_type = "ali_pay" +[[adyen.wallet]] + payment_method_type = "mb_way" +[[adyen.wallet]] + payment_method_type = "ali_pay_hk" +[[adyen.wallet]] + payment_method_type = "go_pay" +[[adyen.wallet]] + payment_method_type = "kakao_pay" +[[adyen.wallet]] + payment_method_type = "twint" +[[adyen.wallet]] + payment_method_type = "gcash" +[[adyen.wallet]] + payment_method_type = "vipps" +[[adyen.wallet]] + payment_method_type = "dana" +[[adyen.wallet]] + payment_method_type = "momo" +[[adyen.wallet]] + payment_method_type = "swish" +[[adyen.wallet]] + payment_method_type = "touch_n_go" +[[adyen.voucher]] + payment_method_type = "boleto" +[[adyen.voucher]] + payment_method_type = "alfamart" +[[adyen.voucher]] + payment_method_type = "indomaret" +[[adyen.voucher]] + payment_method_type = "oxxo" +[[adyen.voucher]] + payment_method_type = "seven_eleven" +[[adyen.voucher]] + payment_method_type = "lawson" +[[adyen.voucher]] + payment_method_type = "mini_stop" +[[adyen.voucher]] + payment_method_type = "family_mart" +[[adyen.voucher]] + payment_method_type = "seicomart" +[[adyen.voucher]] + payment_method_type = "pay_easy" +[[adyen.gift_card]] + payment_method_type = "pay_safe_card" +[[adyen.gift_card]] + payment_method_type = "givex" +[[adyen.card_redirect]] + payment_method_type = "benefit" +[[adyen.card_redirect]] + payment_method_type = "knet" +[[adyen.card_redirect]] + payment_method_type = "momo_atm" [adyen.connector_auth.BodyKey] api_key="Adyen API Key" key1="Adyen Account Id" [adyen.connector_webhook_details] merchant_secret="Source verification key" - [adyen.metadata.google_pay] merchant_name="Google Pay Merchant Name" gateway_merchant_id="Google Pay Merchant Key" @@ -44,24 +247,93 @@ supported_networks=["visa","masterCard","amex","discover"] merchant_capabilities=["supports3DS"] label="apple" - - [airwallex] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -wallet = ["google_pay"] -body_type="BodyKey" +[[airwallex.credit]] + payment_method_type = "Mastercard" +[[airwallex.credit]] + payment_method_type = "Visa" +[[airwallex.credit]] + payment_method_type = "Interac" +[[airwallex.credit]] + payment_method_type = "AmericanExpress" +[[airwallex.credit]] + payment_method_type = "JCB" +[[airwallex.credit]] + payment_method_type = "DinersClub" +[[airwallex.credit]] + payment_method_type = "Discover" +[[airwallex.credit]] + payment_method_type = "CartesBancaires" +[[airwallex.credit]] + payment_method_type = "UnionPay" +[[airwallex.debit]] + payment_method_type = "Mastercard" +[[airwallex.debit]] + payment_method_type = "Visa" +[[airwallex.debit]] + payment_method_type = "Interac" +[[airwallex.debit]] + payment_method_type = "AmericanExpress" +[[airwallex.debit]] + payment_method_type = "JCB" +[[airwallex.debit]] + payment_method_type = "DinersClub" +[[airwallex.debit]] + payment_method_type = "Discover" +[[airwallex.debit]] + payment_method_type = "CartesBancaires" +[[airwallex.debit]] + payment_method_type = "UnionPay" +[[airwallex.wallet]] + payment_method_type = "google_pay" [airwallex.connector_auth.BodyKey] api_key="API Key" key1="Client ID" [airwallex.connector_webhook_details] merchant_secret="Source verification key" + [authorizedotnet] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -wallet = ["google_pay","paypal"] -body_type="BodyKey" +[[authorizedotnet.credit]] + payment_method_type = "Mastercard" +[[authorizedotnet.credit]] + payment_method_type = "Visa" +[[authorizedotnet.credit]] + payment_method_type = "Interac" +[[authorizedotnet.credit]] + payment_method_type = "AmericanExpress" +[[authorizedotnet.credit]] + payment_method_type = "JCB" +[[authorizedotnet.credit]] + payment_method_type = "DinersClub" +[[authorizedotnet.credit]] + payment_method_type = "Discover" +[[authorizedotnet.credit]] + payment_method_type = "CartesBancaires" +[[authorizedotnet.credit]] + payment_method_type = "UnionPay" +[[authorizedotnet.debit]] + payment_method_type = "Mastercard" +[[authorizedotnet.debit]] + payment_method_type = "Visa" +[[authorizedotnet.debit]] + payment_method_type = "Interac" +[[authorizedotnet.debit]] + payment_method_type = "AmericanExpress" +[[authorizedotnet.debit]] + payment_method_type = "JCB" +[[authorizedotnet.debit]] + payment_method_type = "DinersClub" +[[authorizedotnet.debit]] + payment_method_type = "Discover" +[[authorizedotnet.debit]] + payment_method_type = "CartesBancaires" +[[authorizedotnet.debit]] + payment_method_type = "UnionPay" +[[authorizedotnet.wallet]] + payment_method_type = "google_pay" +[[authorizedotnet.wallet]] + payment_method_type = "paypal" [authorizedotnet.connector_auth.BodyKey] api_key="API Login ID" key1="Transaction Key" @@ -72,17 +344,178 @@ merchant_id="Google Pay Merchant ID" [authorizedotnet.connector_webhook_details] merchant_secret="Source verification key" +[bambora] +[[bambora.credit]] + payment_method_type = "Mastercard" +[[bambora.credit]] + payment_method_type = "Visa" +[[bambora.credit]] + payment_method_type = "Interac" +[[bambora.credit]] + payment_method_type = "AmericanExpress" +[[bambora.credit]] + payment_method_type = "JCB" +[[bambora.credit]] + payment_method_type = "DinersClub" +[[bambora.credit]] + payment_method_type = "Discover" +[[bambora.credit]] + payment_method_type = "CartesBancaires" +[[bambora.credit]] + payment_method_type = "UnionPay" +[[bambora.debit]] + payment_method_type = "Mastercard" +[[bambora.debit]] + payment_method_type = "Visa" +[[bambora.debit]] + payment_method_type = "Interac" +[[bambora.debit]] + payment_method_type = "AmericanExpress" +[[bambora.debit]] + payment_method_type = "JCB" +[[bambora.debit]] + payment_method_type = "DinersClub" +[[bambora.debit]] + payment_method_type = "Discover" +[[bambora.debit]] + payment_method_type = "CartesBancaires" +[[bambora.debit]] + payment_method_type = "UnionPay" +[[bambora.wallet]] + payment_method_type = "apple_pay" +[[bambora.wallet]] + payment_method_type = "paypal" +[bambora.connector_auth.BodyKey] +api_key="Passcode" +key1="Merchant Id" +[bambora.connector_webhook_details] +merchant_secret="Source verification key" +[bambora.metadata.apple_pay.session_token_data] +certificate="Merchant Certificate (Base64 Encoded)" +certificate_keys="Merchant PrivateKey (Base64 Encoded)" +merchant_identifier="Apple Merchant Identifier" +display_name="Display Name" +initiative="Domain" +initiative_context="Domain Name" +[bambora.metadata.apple_pay.payment_request_data] +supported_networks=["visa","masterCard","amex","discover"] +merchant_capabilities=["supports3DS"] +label="apple" + +[bankofamerica] +[[bankofamerica.credit]] + payment_method_type = "Mastercard" +[[bankofamerica.credit]] + payment_method_type = "Visa" +[[bankofamerica.credit]] + payment_method_type = "Interac" +[[bankofamerica.credit]] + payment_method_type = "AmericanExpress" +[[bankofamerica.credit]] + payment_method_type = "JCB" +[[bankofamerica.credit]] + payment_method_type = "DinersClub" +[[bankofamerica.credit]] + payment_method_type = "Discover" +[[bankofamerica.credit]] + payment_method_type = "CartesBancaires" +[[bankofamerica.credit]] + payment_method_type = "UnionPay" +[[bankofamerica.debit]] + payment_method_type = "Mastercard" +[[bankofamerica.debit]] + payment_method_type = "Visa" +[[bankofamerica.debit]] + payment_method_type = "Interac" +[[bankofamerica.debit]] + payment_method_type = "AmericanExpress" +[[bankofamerica.debit]] + payment_method_type = "JCB" +[[bankofamerica.debit]] + payment_method_type = "DinersClub" +[[bankofamerica.debit]] + payment_method_type = "Discover" +[[bankofamerica.debit]] + payment_method_type = "CartesBancaires" +[[bankofamerica.debit]] + payment_method_type = "UnionPay" +[[bankofamerica.wallet]] + payment_method_type = "apple_pay" +[[bankofamerica.wallet]] + payment_method_type = "google_pay" +[bankofamerica.connector_auth.SignatureKey] +api_key="Key" +key1="Merchant ID" +api_secret="Shared Secret" +[bankofamerica.connector_webhook_details] +merchant_secret="Source verification key" + +[bankofamerica.metadata.apple_pay.session_token_data] +certificate="Merchant Certificate (Base64 Encoded)" +certificate_keys="Merchant PrivateKey (Base64 Encoded)" +merchant_identifier="Apple Merchant Identifier" +display_name="Display Name" +initiative="Domain" +initiative_context="Domain Name" +[bankofamerica.metadata.apple_pay.payment_request_data] +supported_networks=["visa","masterCard","amex","discover"] +merchant_capabilities=["supports3DS"] +label="apple" + +[bankofamerica.metadata.google_pay] +merchant_name="Google Pay Merchant Name" +gateway_merchant_id="Google Pay Merchant Key" +merchant_id="Google Pay Merchant ID" + [bitpay] -crypto = ["crypto_currency"] +[[bitpay.crypto]] + payment_method_type = "crypto_currency" [bitpay.connector_auth.HeaderKey] api_key="API Key" [bitpay.connector_webhook_details] merchant_secret="Source verification key" [bluesnap] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -wallet = ["google_pay","apple_pay"] +[[bluesnap.credit]] + payment_method_type = "Mastercard" +[[bluesnap.credit]] + payment_method_type = "Visa" +[[bluesnap.credit]] + payment_method_type = "Interac" +[[bluesnap.credit]] + payment_method_type = "AmericanExpress" +[[bluesnap.credit]] + payment_method_type = "JCB" +[[bluesnap.credit]] + payment_method_type = "DinersClub" +[[bluesnap.credit]] + payment_method_type = "Discover" +[[bluesnap.credit]] + payment_method_type = "CartesBancaires" +[[bluesnap.credit]] + payment_method_type = "UnionPay" +[[bluesnap.debit]] + payment_method_type = "Mastercard" +[[bluesnap.debit]] + payment_method_type = "Visa" +[[bluesnap.debit]] + payment_method_type = "Interac" +[[bluesnap.debit]] + payment_method_type = "AmericanExpress" +[[bluesnap.debit]] + payment_method_type = "JCB" +[[bluesnap.debit]] + payment_method_type = "DinersClub" +[[bluesnap.debit]] + payment_method_type = "Discover" +[[bluesnap.debit]] + payment_method_type = "CartesBancaires" +[[bluesnap.debit]] + payment_method_type = "UnionPay" +[[bluesnap.wallet]] + payment_method_type = "google_pay" +[[bluesnap.wallet]] + payment_method_type = "apple_pay" [bluesnap.connector_auth.BodyKey] api_key="Password" key1="Username" @@ -108,10 +541,63 @@ label="apple" [bluesnap.metadata] merchant_id="Merchant Id" +[boku] +[[boku.wallet]] + payment_method_type = "dana" +[[boku.wallet]] + payment_method_type = "gcash" +[[boku.wallet]] + payment_method_type = "go_pay" +[[boku.wallet]] + payment_method_type = "kakao_pay" +[[boku.wallet]] + payment_method_type = "momo" +[boku.connector_auth.BodyKey] +api_key="API KEY" +key1= "MERCHANT ID" +[boku.connector_webhook_details] +merchant_secret="Source verification key" + [braintree] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] +[[braintree.credit]] + payment_method_type = "Mastercard" +[[braintree.credit]] + payment_method_type = "Visa" +[[braintree.credit]] + payment_method_type = "Interac" +[[braintree.credit]] + payment_method_type = "AmericanExpress" +[[braintree.credit]] + payment_method_type = "JCB" +[[braintree.credit]] + payment_method_type = "DinersClub" +[[braintree.credit]] + payment_method_type = "Discover" +[[braintree.credit]] + payment_method_type = "CartesBancaires" +[[braintree.credit]] + payment_method_type = "UnionPay" +[[braintree.debit]] + payment_method_type = "Mastercard" +[[braintree.debit]] + payment_method_type = "Visa" +[[braintree.debit]] + payment_method_type = "Interac" +[[braintree.debit]] + payment_method_type = "AmericanExpress" +[[braintree.debit]] + payment_method_type = "JCB" +[[braintree.debit]] + payment_method_type = "DinersClub" +[[braintree.debit]] + payment_method_type = "Discover" +[[braintree.debit]] + payment_method_type = "CartesBancaires" +[[braintree.debit]] + payment_method_type = "UnionPay" +[[braintree.debit]] + payment_method_type = "UnionPay" [braintree.connector_webhook_details] merchant_secret="Source verification key" @@ -124,10 +610,83 @@ api_secret="Private Key" merchant_account_id="Merchant Account Id" merchant_config_currency="Currency" +[cashtocode] +[[cashtocode.reward]] + payment_method_type = "classic" +[[cashtocode.reward]] + payment_method_type = "evoucher" +[cashtocode.connector_auth.CurrencyAuthKey.auth_key_map.EUR.classic] +password_classic="Password Classic" +username_classic="Username Classic" +merchant_id_classic="MerchantId Classic" +[cashtocode.connector_auth.CurrencyAuthKey.auth_key_map.EUR.evoucher] +password_evoucher="Password Evoucher" +username_evoucher="Username Evoucher" +merchant_id_evoucher="MerchantId Evoucher" +[cashtocode.connector_auth.CurrencyAuthKey.auth_key_map.GBP.classic] +password_classic="Password Classic" +username_classic="Username Classic" +merchant_id_classic="MerchantId Classic" +[cashtocode.connector_auth.CurrencyAuthKey.auth_key_map.GBP.evoucher] +password_evoucher="Password Evoucher" +username_evoucher="Username Evoucher" +merchant_id_evoucher="MerchantId Evoucher" +[cashtocode.connector_auth.CurrencyAuthKey.auth_key_map.USD.classic] +password_classic="Password Classic" +username_classic="Username Classic" +merchant_id_classic="MerchantId Classic" +[cashtocode.connector_auth.CurrencyAuthKey.auth_key_map.USD.evoucher] +password_evoucher="Password Evoucher" +username_evoucher="Username Evoucher" +merchant_id_evoucher="MerchantId Evoucher" + + +[cashtocode.connector_webhook_details] +merchant_secret="Source verification key" + [checkout] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -wallet = ["apple_pay","google_pay","paypal"] +[[checkout.credit]] + payment_method_type = "Mastercard" +[[checkout.credit]] + payment_method_type = "Visa" +[[checkout.credit]] + payment_method_type = "Interac" +[[checkout.credit]] + payment_method_type = "AmericanExpress" +[[checkout.credit]] + payment_method_type = "JCB" +[[checkout.credit]] + payment_method_type = "DinersClub" +[[checkout.credit]] + payment_method_type = "Discover" +[[checkout.credit]] + payment_method_type = "CartesBancaires" +[[checkout.credit]] + payment_method_type = "UnionPay" +[[checkout.debit]] + payment_method_type = "Mastercard" +[[checkout.debit]] + payment_method_type = "Visa" +[[checkout.debit]] + payment_method_type = "Interac" +[[checkout.debit]] + payment_method_type = "AmericanExpress" +[[checkout.debit]] + payment_method_type = "JCB" +[[checkout.debit]] + payment_method_type = "DinersClub" +[[checkout.debit]] + payment_method_type = "Discover" +[[checkout.debit]] + payment_method_type = "CartesBancaires" +[[checkout.debit]] + payment_method_type = "UnionPay" +[[checkout.wallet]] + payment_method_type = "apple_pay" +[[checkout.wallet]] + payment_method_type = "google_pay" +[[checkout.wallet]] + payment_method_type = "paypal" [checkout.connector_auth.SignatureKey] api_key="Checkout API Public Key" key1="Processing Channel ID" @@ -152,19 +711,64 @@ supported_networks=["visa","masterCard","amex","discover"] merchant_capabilities=["supports3DS"] label="apple" - - [coinbase] -crypto = ["crypto_currency"] +[[coinbase.crypto]] + payment_method_type = "crypto_currency" [coinbase.connector_auth.HeaderKey] api_key="API Key" [coinbase.connector_webhook_details] merchant_secret="Source verification key" +[cryptopay] +[[cryptopay.crypto]] + payment_method_type = "crypto_currency" +[cryptopay.connector_auth.BodyKey] +api_key="API Key" +key1="Secret Key" +[cryptopay.connector_webhook_details] +merchant_secret="Source verification key" + [cybersource] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -wallet = ["apple_pay","google_pay"] +[[cybersource.credit]] + payment_method_type = "Mastercard" +[[cybersource.credit]] + payment_method_type = "Visa" +[[cybersource.credit]] + payment_method_type = "Interac" +[[cybersource.credit]] + payment_method_type = "AmericanExpress" +[[cybersource.credit]] + payment_method_type = "JCB" +[[cybersource.credit]] + payment_method_type = "DinersClub" +[[cybersource.credit]] + payment_method_type = "Discover" +[[cybersource.credit]] + payment_method_type = "CartesBancaires" +[[cybersource.credit]] + payment_method_type = "UnionPay" +[[cybersource.debit]] + payment_method_type = "Mastercard" +[[cybersource.debit]] + payment_method_type = "Visa" +[[cybersource.debit]] + payment_method_type = "Interac" +[[cybersource.debit]] + payment_method_type = "AmericanExpress" +[[cybersource.debit]] + payment_method_type = "JCB" +[[cybersource.debit]] + payment_method_type = "DinersClub" +[[cybersource.debit]] + payment_method_type = "Discover" +[[cybersource.debit]] + payment_method_type = "CartesBancaires" +[[cybersource.debit]] + payment_method_type = "UnionPay" +[[cybersource.wallet]] + payment_method_type = "apple_pay" +[[cybersource.wallet]] + payment_method_type = "google_pay" [cybersource.connector_auth.SignatureKey] api_key="Key" key1="Merchant ID" @@ -189,63 +793,43 @@ merchant_name="Google Pay Merchant Name" gateway_merchant_id="Google Pay Merchant Key" merchant_id="Google Pay Merchant ID" -[iatapay] -upi=["upi_collect"] -[iatapay.connector_auth.SignatureKey] -api_key="Client ID" -key1="Airline ID" -api_secret="Client Secret" -[iatapay.connector_webhook_details] -merchant_secret="Source verification key" - -[opennode] -crypto = ["crypto_currency"] -[opennode.connector_auth.HeaderKey] -api_key="API Key" -[opennode.connector_webhook_details] -merchant_secret="Source verification key" - -[prophetpay] -card_redirect = ["card_redirect"] -[prophetpay.connector_auth.SignatureKey] -api_key="Username" -key1="Token" -api_secret="Profile" - - -[bambora] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -wallet = ["apple_pay","paypal"] -[bambora.connector_auth.BodyKey] -api_key="Passcode" -key1="Merchant Id" -[bambora.connector_webhook_details] -merchant_secret="Source verification key" - -[bambora.metadata.apple_pay.session_token_data] -certificate="Merchant Certificate (Base64 Encoded)" -certificate_keys="Merchant PrivateKey (Base64 Encoded)" -merchant_identifier="Apple Merchant Identifier" -display_name="Display Name" -initiative="Domain" -initiative_context="Domain Name" -[bambora.metadata.apple_pay.payment_request_data] -supported_networks=["visa","masterCard","amex","discover"] -merchant_capabilities=["supports3DS"] -label="apple" - -[boku] -wallet = ["dana","gcash","go_pay","kakao_pay","momo"] -[boku.connector_auth.BodyKey] -api_key="API KEY" -key1= "MERCHANT ID" -[boku.connector_webhook_details] -merchant_secret="Source verification key" - [dlocal] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] +[[dlocal.credit]] + payment_method_type = "Mastercard" +[[dlocal.credit]] + payment_method_type = "Visa" +[[dlocal.credit]] + payment_method_type = "Interac" +[[dlocal.credit]] + payment_method_type = "AmericanExpress" +[[dlocal.credit]] + payment_method_type = "JCB" +[[dlocal.credit]] + payment_method_type = "DinersClub" +[[dlocal.credit]] + payment_method_type = "Discover" +[[dlocal.credit]] + payment_method_type = "CartesBancaires" +[[dlocal.credit]] + payment_method_type = "UnionPay" +[[dlocal.debit]] + payment_method_type = "Mastercard" +[[dlocal.debit]] + payment_method_type = "Visa" +[[dlocal.debit]] + payment_method_type = "Interac" +[[dlocal.debit]] + payment_method_type = "AmericanExpress" +[[dlocal.debit]] + payment_method_type = "JCB" +[[dlocal.debit]] + payment_method_type = "DinersClub" +[[dlocal.debit]] + payment_method_type = "Discover" +[[dlocal.debit]] + payment_method_type = "CartesBancaires" +[[dlocal.debit]] + payment_method_type = "UnionPay" [dlocal.connector_auth.SignatureKey] api_key="X Login" key1="X Trans Key" @@ -254,8 +838,42 @@ api_secret="Secret Key" merchant_secret="Source verification key" [fiserv] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] +[[fiserv.credit]] + payment_method_type = "Mastercard" +[[fiserv.credit]] + payment_method_type = "Visa" +[[fiserv.credit]] + payment_method_type = "Interac" +[[fiserv.credit]] + payment_method_type = "AmericanExpress" +[[fiserv.credit]] + payment_method_type = "JCB" +[[fiserv.credit]] + payment_method_type = "DinersClub" +[[fiserv.credit]] + payment_method_type = "Discover" +[[fiserv.credit]] + payment_method_type = "CartesBancaires" +[[fiserv.credit]] + payment_method_type = "UnionPay" +[[fiserv.debit]] + payment_method_type = "Mastercard" +[[fiserv.debit]] + payment_method_type = "Visa" +[[fiserv.debit]] + payment_method_type = "Interac" +[[fiserv.debit]] + payment_method_type = "AmericanExpress" +[[fiserv.debit]] + payment_method_type = "JCB" +[[fiserv.debit]] + payment_method_type = "DinersClub" +[[fiserv.debit]] + payment_method_type = "Discover" +[[fiserv.debit]] + payment_method_type = "CartesBancaires" +[[fiserv.debit]] + payment_method_type = "UnionPay" [fiserv.connector_auth.SignatureKey] api_key="API Key" key1="Merchant ID" @@ -266,8 +884,42 @@ terminal_id="Terminal ID" merchant_secret="Source verification key" [forte] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] +[[forte.credit]] + payment_method_type = "Mastercard" +[[forte.credit]] + payment_method_type = "Visa" +[[forte.credit]] + payment_method_type = "Interac" +[[forte.credit]] + payment_method_type = "AmericanExpress" +[[forte.credit]] + payment_method_type = "JCB" +[[forte.credit]] + payment_method_type = "DinersClub" +[[forte.credit]] + payment_method_type = "Discover" +[[forte.credit]] + payment_method_type = "CartesBancaires" +[[forte.credit]] + payment_method_type = "UnionPay" +[[forte.debit]] + payment_method_type = "Mastercard" +[[forte.debit]] + payment_method_type = "Visa" +[[forte.debit]] + payment_method_type = "Interac" +[[forte.debit]] + payment_method_type = "AmericanExpress" +[[forte.debit]] + payment_method_type = "JCB" +[[forte.debit]] + payment_method_type = "DinersClub" +[[forte.debit]] + payment_method_type = "Discover" +[[forte.debit]] + payment_method_type = "CartesBancaires" +[[forte.debit]] + payment_method_type = "UnionPay" [forte.connector_auth.MultiAuthKey] api_key="API Access ID" key1="Organization ID" @@ -277,10 +929,54 @@ key2="Location ID" merchant_secret="Source verification key" [globalpay] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -bank_redirect=["ideal","giropay","sofort","eps"] -wallet = ["google_pay","paypal"] +[[globalpay.credit]] + payment_method_type = "Mastercard" +[[globalpay.credit]] + payment_method_type = "Visa" +[[globalpay.credit]] + payment_method_type = "Interac" +[[globalpay.credit]] + payment_method_type = "AmericanExpress" +[[globalpay.credit]] + payment_method_type = "JCB" +[[globalpay.credit]] + payment_method_type = "DinersClub" +[[globalpay.credit]] + payment_method_type = "Discover" +[[globalpay.credit]] + payment_method_type = "CartesBancaires" +[[globalpay.credit]] + payment_method_type = "UnionPay" +[[globalpay.debit]] + payment_method_type = "Mastercard" +[[globalpay.debit]] + payment_method_type = "Visa" +[[globalpay.debit]] + payment_method_type = "Interac" +[[globalpay.debit]] + payment_method_type = "AmericanExpress" +[[globalpay.debit]] + payment_method_type = "JCB" +[[globalpay.debit]] + payment_method_type = "DinersClub" +[[globalpay.debit]] + payment_method_type = "Discover" +[[globalpay.debit]] + payment_method_type = "CartesBancaires" +[[globalpay.debit]] + payment_method_type = "UnionPay" +[[globalpay.bank_redirect]] + payment_method_type = "ideal" +[[globalpay.bank_redirect]] + payment_method_type = "giropay" +[[globalpay.bank_redirect]] + payment_method_type = "sofort" +[[globalpay.bank_redirect]] + payment_method_type = "eps" +[[globalpay.wallet]] + payment_method_type = "google_pay" +[[globalpay.wallet]] + payment_method_type = "paypal" [globalpay.connector_auth.BodyKey] api_key="Global App Key" key1="Global App ID" @@ -288,24 +984,103 @@ key1="Global App ID" account_name="Account Name" [globalpay.connector_webhook_details] merchant_secret="Source verification key" - [globalpay.metadata.google_pay] merchant_name="Google Pay Merchant Name" gateway_merchant_id="Google Pay Merchant Key" merchant_id="Google Pay Merchant ID" +[globepay] +[[globepay.wallet]] + payment_method_type = "we_chat_pay" +[[globepay.wallet]] + payment_method_type = "ali_pay" +[globepay.connector_auth.BodyKey] +api_key="Partner Code" +key1="Credential Code" +[globepay.connector_webhook_details] +merchant_secret="Source verification key" + +[gocardless] +[[gocardless.bank_debit]] + payment_method_type = "ach" +[[gocardless.bank_debit]] + payment_method_type = "becs" +[[gocardless.bank_debit]] + payment_method_type = "sepa" +[gocardless.connector_auth.HeaderKey] +api_key="Access Token" +[gocardless.connector_webhook_details] +merchant_secret="Source verification key" + +[iatapay] +[[iatapay.upi]] + payment_method_type = "upi_collect" +[iatapay.connector_auth.SignatureKey] +api_key="Client ID" +key1="Airline ID" +api_secret="Client Secret" +[iatapay.connector_webhook_details] +merchant_secret="Source verification key" + [klarna] -pay_later=["klarna"] +[[klarna.pay_later]] + payment_method_type = "klarna" [klarna.connector_auth.HeaderKey] api_key="Klarna API Key" [klarna.connector_webhook_details] merchant_secret="Source verification key" [mollie] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -bank_redirect=["ideal","giropay","sofort","eps","przelewy24","bancontact_card"] -wallet = ["paypal"] +[[mollie.credit]] + payment_method_type = "Mastercard" +[[mollie.credit]] + payment_method_type = "Visa" +[[mollie.credit]] + payment_method_type = "Interac" +[[mollie.credit]] + payment_method_type = "AmericanExpress" +[[mollie.credit]] + payment_method_type = "JCB" +[[mollie.credit]] + payment_method_type = "DinersClub" +[[mollie.credit]] + payment_method_type = "Discover" +[[mollie.credit]] + payment_method_type = "CartesBancaires" +[[mollie.credit]] + payment_method_type = "UnionPay" +[[mollie.debit]] + payment_method_type = "Mastercard" +[[mollie.debit]] + payment_method_type = "Visa" +[[mollie.debit]] + payment_method_type = "Interac" +[[mollie.debit]] + payment_method_type = "AmericanExpress" +[[mollie.debit]] + payment_method_type = "JCB" +[[mollie.debit]] + payment_method_type = "DinersClub" +[[mollie.debit]] + payment_method_type = "Discover" +[[mollie.debit]] + payment_method_type = "CartesBancaires" +[[mollie.debit]] + payment_method_type = "UnionPay" +[[mollie.bank_redirect]] + payment_method_type = "ideal" +[[mollie.bank_redirect]] + payment_method_type = "giropay" +[[mollie.bank_redirect]] + payment_method_type = "sofort" +[[mollie.bank_redirect]] + payment_method_type = "eps" +[[mollie.bank_redirect]] + payment_method_type = "przelewy24" +[[mollie.bank_redirect]] + payment_method_type = "bancontact_card" +[[mollie.wallet]] + payment_method_type = "paypal" [mollie.connector_auth.BodyKey] api_key="API Key" key1="Profile Token" @@ -313,30 +1088,109 @@ key1="Profile Token" merchant_secret="Source verification key" [multisafepay] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -wallet = ["google_pay","paypal"] +[[multisafepay.credit]] + payment_method_type = "Mastercard" +[[multisafepay.credit]] + payment_method_type = "Visa" +[[multisafepay.credit]] + payment_method_type = "Interac" +[[multisafepay.credit]] + payment_method_type = "AmericanExpress" +[[multisafepay.credit]] + payment_method_type = "JCB" +[[multisafepay.credit]] + payment_method_type = "DinersClub" +[[multisafepay.credit]] + payment_method_type = "Discover" +[[multisafepay.credit]] + payment_method_type = "CartesBancaires" +[[multisafepay.credit]] + payment_method_type = "UnionPay" +[[multisafepay.debit]] + payment_method_type = "Mastercard" +[[multisafepay.debit]] + payment_method_type = "Visa" +[[multisafepay.debit]] + payment_method_type = "Interac" +[[multisafepay.debit]] + payment_method_type = "AmericanExpress" +[[multisafepay.debit]] + payment_method_type = "JCB" +[[multisafepay.debit]] + payment_method_type = "DinersClub" +[[multisafepay.debit]] + payment_method_type = "Discover" +[[multisafepay.debit]] + payment_method_type = "CartesBancaires" +[[multisafepay.debit]] + payment_method_type = "UnionPay" +[[multisafepay.wallet]] + payment_method_type = "google_pay" +[[multisafepay.wallet]] + payment_method_type = "paypal" [multisafepay.connector_auth.HeaderKey] api_key="Enter API Key" [multisafepay.connector_webhook_details] merchant_secret="Source verification key" - [multisafepay.metadata.google_pay] merchant_name="Google Pay Merchant Name" gateway_merchant_id="Google Pay Merchant Key" merchant_id="Google Pay Merchant ID" [nexinets] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -bank_redirect=["ideal","giropay","sofort","eps"] -wallet = ["apple_pay","paypal"] +[[nexinets.credit]] + payment_method_type = "Mastercard" +[[nexinets.credit]] + payment_method_type = "Visa" +[[nexinets.credit]] + payment_method_type = "Interac" +[[nexinets.credit]] + payment_method_type = "AmericanExpress" +[[nexinets.credit]] + payment_method_type = "JCB" +[[nexinets.credit]] + payment_method_type = "DinersClub" +[[nexinets.credit]] + payment_method_type = "Discover" +[[nexinets.credit]] + payment_method_type = "CartesBancaires" +[[nexinets.credit]] + payment_method_type = "UnionPay" +[[nexinets.debit]] + payment_method_type = "Mastercard" +[[nexinets.debit]] + payment_method_type = "Visa" +[[nexinets.debit]] + payment_method_type = "Interac" +[[nexinets.debit]] + payment_method_type = "AmericanExpress" +[[nexinets.debit]] + payment_method_type = "JCB" +[[nexinets.debit]] + payment_method_type = "DinersClub" +[[nexinets.debit]] + payment_method_type = "Discover" +[[nexinets.debit]] + payment_method_type = "CartesBancaires" +[[nexinets.debit]] + payment_method_type = "UnionPay" +[[nexinets.bank_redirect]] + payment_method_type = "ideal" +[[nexinets.bank_redirect]] + payment_method_type = "giropay" +[[nexinets.bank_redirect]] + payment_method_type = "sofort" +[[nexinets.bank_redirect]] + payment_method_type = "eps" +[[nexinets.wallet]] + payment_method_type = "apple_pay" +[[nexinets.wallet]] + payment_method_type = "paypal" [nexinets.connector_auth.BodyKey] api_key="API Key" key1="Merchant ID" [nexinets.connector_webhook_details] merchant_secret="Source verification key" - [nexinets.metadata.apple_pay.session_token_data] certificate="Merchant Certificate (Base64 Encoded)" certificate_keys="Merchant PrivateKey (Base64 Encoded)" @@ -350,9 +1204,48 @@ merchant_capabilities=["supports3DS"] label="apple" [nmi] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -wallet = ["apple_pay","google_pay"] +[[nmi.credit]] + payment_method_type = "Mastercard" +[[nmi.credit]] + payment_method_type = "Visa" +[[nmi.credit]] + payment_method_type = "Interac" +[[nmi.credit]] + payment_method_type = "AmericanExpress" +[[nmi.credit]] + payment_method_type = "JCB" +[[nmi.credit]] + payment_method_type = "DinersClub" +[[nmi.credit]] + payment_method_type = "Discover" +[[nmi.credit]] + payment_method_type = "CartesBancaires" +[[nmi.credit]] + payment_method_type = "UnionPay" +[[nmi.debit]] + payment_method_type = "Mastercard" +[[nmi.debit]] + payment_method_type = "Visa" +[[nmi.debit]] + payment_method_type = "Interac" +[[nmi.debit]] + payment_method_type = "AmericanExpress" +[[nmi.debit]] + payment_method_type = "JCB" +[[nmi.debit]] + payment_method_type = "DinersClub" +[[nmi.debit]] + payment_method_type = "Discover" +[[nmi.debit]] + payment_method_type = "CartesBancaires" +[[nmi.debit]] + payment_method_type = "UnionPay" +[[nmi.bank_redirect]] + payment_method_type = "ideal" +[[nmi.wallet]] + payment_method_type = "apple_pay" +[[nmi.wallet]] + payment_method_type = "google_pay" [nmi.connector_auth.HeaderKey] api_key="API Key" [nmi.connector_webhook_details] @@ -376,9 +1269,48 @@ merchant_capabilities=["supports3DS"] label="apple" [noon] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -wallet = ["apple_pay","google_pay","paypal"] +[[noon.credit]] + payment_method_type = "Mastercard" +[[noon.credit]] + payment_method_type = "Visa" +[[noon.credit]] + payment_method_type = "Interac" +[[noon.credit]] + payment_method_type = "AmericanExpress" +[[noon.credit]] + payment_method_type = "JCB" +[[noon.credit]] + payment_method_type = "DinersClub" +[[noon.credit]] + payment_method_type = "Discover" +[[noon.credit]] + payment_method_type = "CartesBancaires" +[[noon.credit]] + payment_method_type = "UnionPay" +[[noon.debit]] + payment_method_type = "Mastercard" +[[noon.debit]] + payment_method_type = "Visa" +[[noon.debit]] + payment_method_type = "Interac" +[[noon.debit]] + payment_method_type = "AmericanExpress" +[[noon.debit]] + payment_method_type = "JCB" +[[noon.debit]] + payment_method_type = "DinersClub" +[[noon.debit]] + payment_method_type = "Discover" +[[noon.debit]] + payment_method_type = "CartesBancaires" +[[noon.debit]] + payment_method_type = "UnionPay" +[[noon.wallet]] + payment_method_type = "apple_pay" +[[noon.wallet]] + payment_method_type = "google_pay" +[[noon.wallet]] + payment_method_type = "paypal" [noon.connector_auth.SignatureKey] api_key="API Key" key1="Business Identifier" @@ -404,11 +1336,60 @@ merchant_capabilities=["supports3DS"] label="apple" [nuvei] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -pay_later=["klarna","afterpay_clearpay"] -bank_redirect=["ideal","giropay","sofort","eps"] -wallet = ["apple_pay","google_pay","paypal"] +[[nuvei.credit]] + payment_method_type = "Mastercard" +[[nuvei.credit]] + payment_method_type = "Visa" +[[nuvei.credit]] + payment_method_type = "Interac" +[[nuvei.credit]] + payment_method_type = "AmericanExpress" +[[nuvei.credit]] + payment_method_type = "JCB" +[[nuvei.credit]] + payment_method_type = "DinersClub" +[[nuvei.credit]] + payment_method_type = "Discover" +[[nuvei.credit]] + payment_method_type = "CartesBancaires" +[[nuvei.credit]] + payment_method_type = "UnionPay" +[[nuvei.debit]] + payment_method_type = "Mastercard" +[[nuvei.debit]] + payment_method_type = "Visa" +[[nuvei.debit]] + payment_method_type = "Interac" +[[nuvei.debit]] + payment_method_type = "AmericanExpress" +[[nuvei.debit]] + payment_method_type = "JCB" +[[nuvei.debit]] + payment_method_type = "DinersClub" +[[nuvei.debit]] + payment_method_type = "Discover" +[[nuvei.debit]] + payment_method_type = "CartesBancaires" +[[nuvei.debit]] + payment_method_type = "UnionPay" +[[nuvei.pay_later]] + payment_method_type = "klarna" +[[nuvei.pay_later]] + payment_method_type = "afterpay_clearpay" +[[nuvei.bank_redirect]] + payment_method_type = "ideal" +[[nuvei.bank_redirect]] + payment_method_type = "giropay" +[[nuvei.bank_redirect]] + payment_method_type = "sofort" +[[nuvei.bank_redirect]] + payment_method_type = "eps" +[[nuvei.wallet]] + payment_method_type = "apple_pay" +[[nuvei.wallet]] + payment_method_type = "google_pay" +[[nuvei.wallet]] + payment_method_type = "paypal" [nuvei.connector_auth.SignatureKey] api_key="Merchant ID" key1="Merchant Site ID" @@ -433,11 +1414,114 @@ supported_networks=["visa","masterCard","amex","discover"] merchant_capabilities=["supports3DS"] label="apple" + +[opennode] +[[opennode.crypto]] + payment_method_type = "crypto_currency" +[opennode.connector_auth.HeaderKey] +api_key="API Key" +[opennode.connector_webhook_details] +merchant_secret="Source verification key" + +[prophetpay] +[[prophetpay.card_redirect]] + payment_method_type = "card_redirect" +[prophetpay.connector_auth.SignatureKey] +api_key="Username" +key1="Token" +api_secret="Profile" + +[payme] +[[payme.credit]] + payment_method_type = "Mastercard" +[[payme.credit]] + payment_method_type = "Visa" +[[payme.credit]] + payment_method_type = "Interac" +[[payme.credit]] + payment_method_type = "AmericanExpress" +[[payme.credit]] + payment_method_type = "JCB" +[[payme.credit]] + payment_method_type = "DinersClub" +[[payme.credit]] + payment_method_type = "Discover" +[[payme.credit]] + payment_method_type = "CartesBancaires" +[[payme.credit]] + payment_method_type = "UnionPay" +[[payme.debit]] + payment_method_type = "Mastercard" +[[payme.debit]] + payment_method_type = "Visa" +[[payme.debit]] + payment_method_type = "Interac" +[[payme.debit]] + payment_method_type = "AmericanExpress" +[[payme.debit]] + payment_method_type = "JCB" +[[payme.debit]] + payment_method_type = "DinersClub" +[[payme.debit]] + payment_method_type = "Discover" +[[payme.debit]] + payment_method_type = "CartesBancaires" +[[payme.debit]] + payment_method_type = "UnionPay" +[payme.connector_auth.BodyKey] +api_key="Seller Payme Id" +key1="Payme Public Key" +[payme.connector_webhook_details] +merchant_secret="Payme Client Secret" +additional_secret="Payme Client Key" + [paypal] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -wallet = ["paypal"] -bank_redirect=["ideal","giropay","sofort","eps"] +[[paypal.credit]] + payment_method_type = "Mastercard" +[[paypal.credit]] + payment_method_type = "Visa" +[[paypal.credit]] + payment_method_type = "Interac" +[[paypal.credit]] + payment_method_type = "AmericanExpress" +[[paypal.credit]] + payment_method_type = "JCB" +[[paypal.credit]] + payment_method_type = "DinersClub" +[[paypal.credit]] + payment_method_type = "Discover" +[[paypal.credit]] + payment_method_type = "CartesBancaires" +[[paypal.credit]] + payment_method_type = "UnionPay" +[[paypal.debit]] + payment_method_type = "Mastercard" +[[paypal.debit]] + payment_method_type = "Visa" +[[paypal.debit]] + payment_method_type = "Interac" +[[paypal.debit]] + payment_method_type = "AmericanExpress" +[[paypal.debit]] + payment_method_type = "JCB" +[[paypal.debit]] + payment_method_type = "DinersClub" +[[paypal.debit]] + payment_method_type = "Discover" +[[paypal.debit]] + payment_method_type = "CartesBancaires" +[[paypal.debit]] + payment_method_type = "UnionPay" +[[paypal.wallet]] + payment_method_type = "paypal" +[[paypal.bank_redirect]] + payment_method_type = "ideal" +[[paypal.bank_redirect]] + payment_method_type = "giropay" +[[paypal.bank_redirect]] + payment_method_type = "sofort" +[[paypal.bank_redirect]] + payment_method_type = "eps" is_verifiable = true [paypal.connector_auth.BodyKey] api_key="Client Secret" @@ -445,10 +1529,46 @@ key1="Client ID" [paypal.connector_webhook_details] merchant_secret="Source verification key" + [payu] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -wallet = ["google_pay"] +[[payu.credit]] + payment_method_type = "Mastercard" +[[payu.credit]] + payment_method_type = "Visa" +[[payu.credit]] + payment_method_type = "Interac" +[[payu.credit]] + payment_method_type = "AmericanExpress" +[[payu.credit]] + payment_method_type = "JCB" +[[payu.credit]] + payment_method_type = "DinersClub" +[[payu.credit]] + payment_method_type = "Discover" +[[payu.credit]] + payment_method_type = "CartesBancaires" +[[payu.credit]] + payment_method_type = "UnionPay" +[[payu.debit]] + payment_method_type = "Mastercard" +[[payu.debit]] + payment_method_type = "Visa" +[[payu.debit]] + payment_method_type = "Interac" +[[payu.debit]] + payment_method_type = "AmericanExpress" +[[payu.debit]] + payment_method_type = "JCB" +[[payu.debit]] + payment_method_type = "DinersClub" +[[payu.debit]] + payment_method_type = "Discover" +[[payu.debit]] + payment_method_type = "CartesBancaires" +[[payu.debit]] + payment_method_type = "UnionPay" +[[payu.wallet]] + payment_method_type = "google_pay" [payu.connector_auth.BodyKey] api_key="API Key" key1="Merchant POS ID" @@ -460,10 +1580,129 @@ merchant_name="Google Pay Merchant Name" gateway_merchant_id="Google Pay Merchant Key" merchant_id="Google Pay Merchant ID" +[placetopay] +[[placetopay.credit]] + payment_method_type = "Mastercard" +[[placetopay.credit]] + payment_method_type = "Visa" +[[placetopay.credit]] + payment_method_type = "Interac" +[[placetopay.credit]] + payment_method_type = "AmericanExpress" +[[placetopay.credit]] + payment_method_type = "JCB" +[[placetopay.credit]] + payment_method_type = "DinersClub" +[[placetopay.credit]] + payment_method_type = "Discover" +[[placetopay.credit]] + payment_method_type = "CartesBancaires" +[[placetopay.credit]] + payment_method_type = "UnionPay" +[[placetopay.debit]] + payment_method_type = "Mastercard" +[[placetopay.debit]] + payment_method_type = "Visa" +[[placetopay.debit]] + payment_method_type = "Interac" +[[placetopay.debit]] + payment_method_type = "AmericanExpress" +[[placetopay.debit]] + payment_method_type = "JCB" +[[placetopay.debit]] + payment_method_type = "DinersClub" +[[placetopay.debit]] + payment_method_type = "Discover" +[[placetopay.debit]] + payment_method_type = "CartesBancaires" +[[placetopay.debit]] + payment_method_type = "UnionPay" +[placetopay.connector_auth.BodyKey] +api_key="Login" +key1="Trankey" + +[powertranz] +[[powertranz.credit]] + payment_method_type = "Mastercard" +[[powertranz.credit]] + payment_method_type = "Visa" +[[powertranz.credit]] + payment_method_type = "Interac" +[[powertranz.credit]] + payment_method_type = "AmericanExpress" +[[powertranz.credit]] + payment_method_type = "JCB" +[[powertranz.credit]] + payment_method_type = "DinersClub" +[[powertranz.credit]] + payment_method_type = "Discover" +[[powertranz.credit]] + payment_method_type = "CartesBancaires" +[[powertranz.credit]] + payment_method_type = "UnionPay" +[[powertranz.debit]] + payment_method_type = "Mastercard" +[[powertranz.debit]] + payment_method_type = "Visa" +[[powertranz.debit]] + payment_method_type = "Interac" +[[powertranz.debit]] + payment_method_type = "AmericanExpress" +[[powertranz.debit]] + payment_method_type = "JCB" +[[powertranz.debit]] + payment_method_type = "DinersClub" +[[powertranz.debit]] + payment_method_type = "Discover" +[[powertranz.debit]] + payment_method_type = "CartesBancaires" +[[powertranz.debit]] + payment_method_type = "UnionPay" +[powertranz.connector_auth.BodyKey] +key1 = "PowerTranz Id" +api_key="PowerTranz Password" +[powertranz.connector_webhook_details] +merchant_secret="Source verification key" + [rapyd] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -wallet = ["apple_pay"] +[[rapyd.credit]] + payment_method_type = "Mastercard" +[[rapyd.credit]] + payment_method_type = "Visa" +[[rapyd.credit]] + payment_method_type = "Interac" +[[rapyd.credit]] + payment_method_type = "AmericanExpress" +[[rapyd.credit]] + payment_method_type = "JCB" +[[rapyd.credit]] + payment_method_type = "DinersClub" +[[rapyd.credit]] + payment_method_type = "Discover" +[[rapyd.credit]] + payment_method_type = "CartesBancaires" +[[rapyd.credit]] + payment_method_type = "UnionPay" +[[rapyd.debit]] + payment_method_type = "Mastercard" +[[rapyd.debit]] + payment_method_type = "Visa" +[[rapyd.debit]] + payment_method_type = "Interac" +[[rapyd.debit]] + payment_method_type = "AmericanExpress" +[[rapyd.debit]] + payment_method_type = "JCB" +[[rapyd.debit]] + payment_method_type = "DinersClub" +[[rapyd.debit]] + payment_method_type = "Discover" +[[rapyd.debit]] + payment_method_type = "CartesBancaires" +[[rapyd.debit]] + payment_method_type = "UnionPay" +[[rapyd.wallet]] + payment_method_type = "apple_pay" [rapyd.connector_auth.BodyKey] api_key="Access Key" key1="API Secret" @@ -483,22 +1722,136 @@ merchant_capabilities=["supports3DS"] label="apple" [shift4] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -bank_redirect=["ideal","giropay","sofort","eps"] +[[shift4.credit]] + payment_method_type = "Mastercard" +[[shift4.credit]] + payment_method_type = "Visa" +[[shift4.credit]] + payment_method_type = "Interac" +[[shift4.credit]] + payment_method_type = "AmericanExpress" +[[shift4.credit]] + payment_method_type = "JCB" +[[shift4.credit]] + payment_method_type = "DinersClub" +[[shift4.credit]] + payment_method_type = "Discover" +[[shift4.credit]] + payment_method_type = "CartesBancaires" +[[shift4.credit]] + payment_method_type = "UnionPay" +[[shift4.debit]] + payment_method_type = "Mastercard" +[[shift4.debit]] + payment_method_type = "Visa" +[[shift4.debit]] + payment_method_type = "Interac" +[[shift4.debit]] + payment_method_type = "AmericanExpress" +[[shift4.debit]] + payment_method_type = "JCB" +[[shift4.debit]] + payment_method_type = "DinersClub" +[[shift4.debit]] + payment_method_type = "Discover" +[[shift4.debit]] + payment_method_type = "CartesBancaires" +[[shift4.debit]] + payment_method_type = "UnionPay" +[[shift4.bank_redirect]] + payment_method_type = "ideal" +[[shift4.bank_redirect]] + payment_method_type = "giropay" +[[shift4.bank_redirect]] + payment_method_type = "sofort" +[[shift4.bank_redirect]] + payment_method_type = "eps" [shift4.connector_auth.HeaderKey] api_key="API Key" [shift4.connector_webhook_details] merchant_secret="Source verification key" [stripe] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -pay_later=["klarna","affirm","afterpay_clearpay"] -bank_redirect=["ideal","giropay","sofort","eps","bancontact_card","przelewy24"] -bank_debit=["ach","bacs","becs","sepa"] -bank_transfer=["ach","bacs","sepa", "multibanco"] -wallet = ["apple_pay","google_pay","we_chat_pay","ali_pay", "cashapp"] +[[stripe.credit]] + payment_method_type = "Mastercard" +[[stripe.credit]] + payment_method_type = "Visa" +[[stripe.credit]] + payment_method_type = "Interac" +[[stripe.credit]] + payment_method_type = "AmericanExpress" +[[stripe.credit]] + payment_method_type = "JCB" +[[stripe.credit]] + payment_method_type = "DinersClub" +[[stripe.credit]] + payment_method_type = "Discover" +[[stripe.credit]] + payment_method_type = "CartesBancaires" +[[stripe.credit]] + payment_method_type = "UnionPay" +[[stripe.debit]] + payment_method_type = "Mastercard" +[[stripe.debit]] + payment_method_type = "Visa" +[[stripe.debit]] + payment_method_type = "Interac" +[[stripe.debit]] + payment_method_type = "AmericanExpress" +[[stripe.debit]] + payment_method_type = "JCB" +[[stripe.debit]] + payment_method_type = "DinersClub" +[[stripe.debit]] + payment_method_type = "Discover" +[[stripe.debit]] + payment_method_type = "CartesBancaires" +[[stripe.debit]] + payment_method_type = "UnionPay" +[[stripe.pay_later]] + payment_method_type = "klarna" +[[stripe.pay_later]] + payment_method_type = "affirm" +[[stripe.pay_later]] + payment_method_type = "afterpay_clearpay" +[[stripe.bank_redirect]] + payment_method_type = "ideal" +[[stripe.bank_redirect]] + payment_method_type = "giropay" +[[stripe.bank_redirect]] + payment_method_type = "sofort" +[[stripe.bank_redirect]] + payment_method_type = "eps" +[[stripe.bank_redirect]] + payment_method_type = "bancontact_card" +[[stripe.bank_redirect]] + payment_method_type = "przelewy24" +[[stripe.bank_debit]] + payment_method_type = "ach" +[[stripe.bank_debit]] + payment_method_type = "bacs" +[[stripe.bank_debit]] + payment_method_type = "becs" +[[stripe.bank_debit]] + payment_method_type = "sepa" +[[stripe.bank_transfer]] + payment_method_type = "ach" +[[stripe.bank_transfer]] + payment_method_type = "bacs" +[[stripe.bank_transfer]] + payment_method_type = "sepa" +[[stripe.bank_transfer]] + payment_method_type = "multibanco" +[[stripe.wallet]] + payment_method_type = "apple_pay" +[[stripe.wallet]] + payment_method_type = "google_pay" +[[stripe.wallet]] + payment_method_type = "we_chat_pay" +[[stripe.wallet]] + payment_method_type = "ali_pay" +[[stripe.wallet]] + payment_method_type = "cashapp" is_verifiable = true [stripe.connector_auth.HeaderKey] api_key="Secret Key" @@ -522,29 +1875,144 @@ supported_networks=["visa","masterCard","amex","discover"] merchant_capabilities=["supports3DS"] label="apple" -[zen] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -voucher = ["boleto", "efecty", "pago_efectivo", "red_compra", "red_pagos"] -bank_transfer = ["pix", "pse"] -wallet = ["apple_pay","google_pay"] -[zen.connector_auth.HeaderKey] -api_key="API Key" -[zen.connector_webhook_details] +[stax] +[[stax.credit]] + payment_method_type = "Mastercard" +[[stax.credit]] + payment_method_type = "Visa" +[[stax.credit]] + payment_method_type = "Interac" +[[stax.credit]] + payment_method_type = "AmericanExpress" +[[stax.credit]] + payment_method_type = "JCB" +[[stax.credit]] + payment_method_type = "DinersClub" +[[stax.credit]] + payment_method_type = "Discover" +[[stax.credit]] + payment_method_type = "CartesBancaires" +[[stax.credit]] + payment_method_type = "UnionPay" +[[stax.debit]] + payment_method_type = "Mastercard" +[[stax.debit]] + payment_method_type = "Visa" +[[stax.debit]] + payment_method_type = "Interac" +[[stax.debit]] + payment_method_type = "AmericanExpress" +[[stax.debit]] + payment_method_type = "JCB" +[[stax.debit]] + payment_method_type = "DinersClub" +[[stax.debit]] + payment_method_type = "Discover" +[[stax.debit]] + payment_method_type = "CartesBancaires" +[[stax.debit]] + payment_method_type = "UnionPay" +[[stax.bank_debit]] + payment_method_type = "ach" +[stax.connector_auth.HeaderKey] +api_key="Api Key" +[stax.connector_webhook_details] merchant_secret="Source verification key" -[zen.metadata.apple_pay] -terminal_uuid="Terminal UUID" -pay_wall_secret="Pay Wall Secret" -[zen.metadata.google_pay] -terminal_uuid="Terminal UUID" -pay_wall_secret="Pay Wall Secret" +[square] +[[square.credit]] + payment_method_type = "Mastercard" +[[square.credit]] + payment_method_type = "Visa" +[[square.credit]] + payment_method_type = "Interac" +[[square.credit]] + payment_method_type = "AmericanExpress" +[[square.credit]] + payment_method_type = "JCB" +[[square.credit]] + payment_method_type = "DinersClub" +[[square.credit]] + payment_method_type = "Discover" +[[square.credit]] + payment_method_type = "CartesBancaires" +[[square.credit]] + payment_method_type = "UnionPay" +[[square.debit]] + payment_method_type = "Mastercard" +[[square.debit]] + payment_method_type = "Visa" +[[square.debit]] + payment_method_type = "Interac" +[[square.debit]] + payment_method_type = "AmericanExpress" +[[square.debit]] + payment_method_type = "JCB" +[[square.debit]] + payment_method_type = "DinersClub" +[[square.debit]] + payment_method_type = "Discover" +[[square.debit]] + payment_method_type = "CartesBancaires" +[[square.debit]] + payment_method_type = "UnionPay" +[square_payout.connector_auth.BodyKey] +api_key = "Square API Key" +key1 = "Square Client Id" +[square.connector_webhook_details] +merchant_secret="Source verification key" [trustpay] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -bank_redirect=["ideal","giropay","sofort","eps","blik"] -wallet = ["apple_pay","google_pay"] +[[trustpay.credit]] + payment_method_type = "Mastercard" +[[trustpay.credit]] + payment_method_type = "Visa" +[[trustpay.credit]] + payment_method_type = "Interac" +[[trustpay.credit]] + payment_method_type = "AmericanExpress" +[[trustpay.credit]] + payment_method_type = "JCB" +[[trustpay.credit]] + payment_method_type = "DinersClub" +[[trustpay.credit]] + payment_method_type = "Discover" +[[trustpay.credit]] + payment_method_type = "CartesBancaires" +[[trustpay.credit]] + payment_method_type = "UnionPay" +[[trustpay.debit]] + payment_method_type = "Mastercard" +[[trustpay.debit]] + payment_method_type = "Visa" +[[trustpay.debit]] + payment_method_type = "Interac" +[[trustpay.debit]] + payment_method_type = "AmericanExpress" +[[trustpay.debit]] + payment_method_type = "JCB" +[[trustpay.debit]] + payment_method_type = "DinersClub" +[[trustpay.debit]] + payment_method_type = "Discover" +[[trustpay.debit]] + payment_method_type = "CartesBancaires" +[[trustpay.debit]] + payment_method_type = "UnionPay" +[[trustpay.bank_redirect]] + payment_method_type = "ideal" +[[trustpay.bank_redirect]] + payment_method_type = "giropay" +[[trustpay.bank_redirect]] + payment_method_type = "sofort" +[[trustpay.bank_redirect]] + payment_method_type = "eps" +[[trustpay.bank_redirect]] + payment_method_type = "blik" +[[trustpay.wallet]] + payment_method_type = "apple_pay" +[[trustpay.wallet]] + payment_method_type = "google_pay" [trustpay.connector_auth.SignatureKey] api_key="API Key" key1="Project ID" @@ -564,10 +2032,100 @@ supported_networks=["visa","masterCard","amex","discover"] merchant_capabilities=["supports3DS"] label="apple" +[tsys] +[[tsys.credit]] + payment_method_type = "Mastercard" +[[tsys.credit]] + payment_method_type = "Visa" +[[tsys.credit]] + payment_method_type = "Interac" +[[tsys.credit]] + payment_method_type = "AmericanExpress" +[[tsys.credit]] + payment_method_type = "JCB" +[[tsys.credit]] + payment_method_type = "DinersClub" +[[tsys.credit]] + payment_method_type = "Discover" +[[tsys.credit]] + payment_method_type = "CartesBancaires" +[[tsys.credit]] + payment_method_type = "UnionPay" +[[tsys.debit]] + payment_method_type = "Mastercard" +[[tsys.debit]] + payment_method_type = "Visa" +[[tsys.debit]] + payment_method_type = "Interac" +[[tsys.debit]] + payment_method_type = "AmericanExpress" +[[tsys.debit]] + payment_method_type = "JCB" +[[tsys.debit]] + payment_method_type = "DinersClub" +[[tsys.debit]] + payment_method_type = "Discover" +[[tsys.debit]] + payment_method_type = "CartesBancaires" +[[tsys.debit]] + payment_method_type = "UnionPay" +[tsys.connector_auth.SignatureKey] +api_key="Device Id" +key1="Transaction Key" +api_secret="Developer Id" +[tsys.connector_webhook_details] +merchant_secret="Source verification key" + +[volt] +[[volt.bank_redirect]] + payment_method_type = "open_banking_uk" +[volt.connector_auth.MultiAuthKey] +api_key = "Username" +api_secret = "Password" +key1 = "Client ID" +key2 = "Client Secret" + [worldline] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -bank_redirect=["ideal","giropay"] +[[worldline.credit]] + payment_method_type = "Mastercard" +[[worldline.credit]] + payment_method_type = "Visa" +[[worldline.credit]] + payment_method_type = "Interac" +[[worldline.credit]] + payment_method_type = "AmericanExpress" +[[worldline.credit]] + payment_method_type = "JCB" +[[worldline.credit]] + payment_method_type = "DinersClub" +[[worldline.credit]] + payment_method_type = "Discover" +[[worldline.credit]] + payment_method_type = "CartesBancaires" +[[worldline.credit]] + payment_method_type = "UnionPay" +[[worldline.debit]] + payment_method_type = "Mastercard" +[[worldline.debit]] + payment_method_type = "Visa" +[[worldline.debit]] + payment_method_type = "Interac" +[[worldline.debit]] + payment_method_type = "AmericanExpress" +[[worldline.debit]] + payment_method_type = "JCB" +[[worldline.debit]] + payment_method_type = "DinersClub" +[[worldline.debit]] + payment_method_type = "Discover" +[[worldline.debit]] + payment_method_type = "CartesBancaires" +[[worldline.debit]] + payment_method_type = "UnionPay" +[[worldline.bank_redirect]] + payment_method_type = "ideal" +[[worldline.bank_redirect]] + payment_method_type = "giropay" [worldline.connector_auth.SignatureKey] api_key="API Key ID" key1="Merchant ID" @@ -576,9 +2134,46 @@ api_secret="Secret API Key" merchant_secret="Source verification key" [worldpay] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -wallet = ["google_pay","apple_pay"] +[[worldpay.credit]] + payment_method_type = "Mastercard" +[[worldpay.credit]] + payment_method_type = "Visa" +[[worldpay.credit]] + payment_method_type = "Interac" +[[worldpay.credit]] + payment_method_type = "AmericanExpress" +[[worldpay.credit]] + payment_method_type = "JCB" +[[worldpay.credit]] + payment_method_type = "DinersClub" +[[worldpay.credit]] + payment_method_type = "Discover" +[[worldpay.credit]] + payment_method_type = "CartesBancaires" +[[worldpay.credit]] + payment_method_type = "UnionPay" +[[worldpay.debit]] + payment_method_type = "Mastercard" +[[worldpay.debit]] + payment_method_type = "Visa" +[[worldpay.debit]] + payment_method_type = "Interac" +[[worldpay.debit]] + payment_method_type = "AmericanExpress" +[[worldpay.debit]] + payment_method_type = "JCB" +[[worldpay.debit]] + payment_method_type = "DinersClub" +[[worldpay.debit]] + payment_method_type = "Discover" +[[worldpay.debit]] + payment_method_type = "CartesBancaires" +[[worldpay.debit]] + payment_method_type = "UnionPay" +[[worldpay.wallet]] + payment_method_type = "google_pay" +[[worldpay.wallet]] + payment_method_type = "apple_pay" [worldpay.connector_auth.BodyKey] api_key="Username" key1="Password" @@ -602,188 +2197,306 @@ supported_networks=["visa","masterCard","amex","discover"] merchant_capabilities=["supports3DS"] label="apple" -[cashtocode] -reward = ["classic", "evoucher"] -[cashtocode.connector_auth.CurrencyAuthKey.auth_key_map.EUR] -password_classic="Password Classic" -username_classic="Username Classic" -merchant_id_classic="MerchantId Classic" -password_evoucher="Password Evoucher" -username_evoucher="Username Evoucher" -merchant_id_evoucher="MerchantId Evoucher" -[cashtocode.connector_auth.CurrencyAuthKey.auth_key_map.GBP] -password_classic="Password Classic" -username_classic="Username Classic" -merchant_id_classic="MerchantId Classic" -password_evoucher="Password Evoucher" -username_evoucher="Username Evoucher" -merchant_id_evoucher="MerchantId Evoucher" -[cashtocode.connector_auth.CurrencyAuthKey.auth_key_map.USD] -password_classic="Password Classic" -username_classic="Username Classic" -merchant_id_classic="MerchantId Classic" -password_evoucher="Password Evoucher" -username_evoucher="Username Evoucher" -merchant_id_evoucher="MerchantId Evoucher" -[cashtocode.connector_webhook_details] -merchant_secret="Source verification key" - -[cryptopay] -crypto = ["crypto_currency"] -[cryptopay.connector_auth.BodyKey] +[zen] +[[zen.credit]] + payment_method_type = "Mastercard" +[[zen.credit]] + payment_method_type = "Visa" +[[zen.credit]] + payment_method_type = "Interac" +[[zen.credit]] + payment_method_type = "AmericanExpress" +[[zen.credit]] + payment_method_type = "JCB" +[[zen.credit]] + payment_method_type = "DinersClub" +[[zen.credit]] + payment_method_type = "Discover" +[[zen.credit]] + payment_method_type = "CartesBancaires" +[[zen.credit]] + payment_method_type = "UnionPay" +[[zen.debit]] + payment_method_type = "Mastercard" +[[zen.debit]] + payment_method_type = "Visa" +[[zen.debit]] + payment_method_type = "Interac" +[[zen.debit]] + payment_method_type = "AmericanExpress" +[[zen.debit]] + payment_method_type = "JCB" +[[zen.debit]] + payment_method_type = "DinersClub" +[[zen.debit]] + payment_method_type = "Discover" +[[zen.debit]] + payment_method_type = "CartesBancaires" +[[zen.debit]] + payment_method_type = "UnionPay" +[[zen.voucher]] + payment_method_type = "boleto" +[[zen.voucher]] + payment_method_type = "efecty" +[[zen.voucher]] + payment_method_type = "pago_efectivo" +[[zen.voucher]] + payment_method_type = "red_compra" +[[zen.voucher]] + payment_method_type = "red_pagos" +[[zen.bank_transfer]] + payment_method_type = "pix" +[[zen.bank_transfer]] + payment_method_type = "pse" +[[zen.wallet]] + payment_method_type = "apple_pay" +[[zen.wallet]] + payment_method_type = "google_pay" +[zen.connector_auth.HeaderKey] api_key="API Key" -key1="Secret Key" -[cryptopay.connector_webhook_details] +[zen.connector_webhook_details] merchant_secret="Source verification key" +[zen.metadata.apple_pay] +terminal_uuid="Terminal UUID" +pay_wall_secret="Pay Wall Secret" +[zen.metadata.google_pay] +terminal_uuid="Terminal UUID" +pay_wall_secret="Pay Wall Secret" + + [dummy_connector] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] +[[dummy_connector.credit]] + payment_method_type = "Mastercard" +[[dummy_connector.credit]] + payment_method_type = "Visa" +[[dummy_connector.credit]] + payment_method_type = "Interac" +[[dummy_connector.credit]] + payment_method_type = "AmericanExpress" +[[dummy_connector.credit]] + payment_method_type = "JCB" +[[dummy_connector.credit]] + payment_method_type = "DinersClub" +[[dummy_connector.credit]] + payment_method_type = "Discover" +[[dummy_connector.credit]] + payment_method_type = "CartesBancaires" +[[dummy_connector.credit]] + payment_method_type = "UnionPay" +[[dummy_connector.debit]] + payment_method_type = "Mastercard" +[[dummy_connector.debit]] + payment_method_type = "Visa" +[[dummy_connector.debit]] + payment_method_type = "Interac" +[[dummy_connector.debit]] + payment_method_type = "AmericanExpress" +[[dummy_connector.debit]] + payment_method_type = "JCB" +[[dummy_connector.debit]] + payment_method_type = "DinersClub" +[[dummy_connector.debit]] + payment_method_type = "Discover" +[[dummy_connector.debit]] + payment_method_type = "CartesBancaires" +[[dummy_connector.debit]] + payment_method_type = "UnionPay" [dummy_connector.connector_auth.HeaderKey] api_key="Api Key" -[helcim] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -[helcim.connector_auth.HeaderKey] +[paypal_test] +[[paypal_test.credit]] + payment_method_type = "Mastercard" +[[paypal_test.credit]] + payment_method_type = "Visa" +[[paypal_test.credit]] + payment_method_type = "Interac" +[[paypal_test.credit]] + payment_method_type = "AmericanExpress" +[[paypal_test.credit]] + payment_method_type = "JCB" +[[paypal_test.credit]] + payment_method_type = "DinersClub" +[[paypal_test.credit]] + payment_method_type = "Discover" +[[paypal_test.credit]] + payment_method_type = "CartesBancaires" +[[paypal_test.credit]] + payment_method_type = "UnionPay" +[[paypal_test.debit]] + payment_method_type = "Mastercard" +[[paypal_test.debit]] + payment_method_type = "Visa" +[[paypal_test.debit]] + payment_method_type = "Interac" +[[paypal_test.debit]] + payment_method_type = "AmericanExpress" +[[paypal_test.debit]] + payment_method_type = "JCB" +[[paypal_test.debit]] + payment_method_type = "DinersClub" +[[paypal_test.debit]] + payment_method_type = "Discover" +[[paypal_test.debit]] + payment_method_type = "CartesBancaires" +[[paypal_test.debit]] + payment_method_type = "UnionPay" +[[paypal_test.wallet]] + payment_method_type = "paypal" +[paypal_test.connector_auth.HeaderKey] api_key="Api Key" -[helcim.connector_webhook_details] -merchant_secret="Source verification key" [stripe_test] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -wallet = ["google_pay","ali_pay","we_chat_pay"] -pay_later=["klarna","affirm","afterpay_clearpay"] +[[stripe_test.credit]] + payment_method_type = "Mastercard" +[[stripe_test.credit]] + payment_method_type = "Visa" +[[stripe_test.credit]] + payment_method_type = "Interac" +[[stripe_test.credit]] + payment_method_type = "AmericanExpress" +[[stripe_test.credit]] + payment_method_type = "JCB" +[[stripe_test.credit]] + payment_method_type = "DinersClub" +[[stripe_test.credit]] + payment_method_type = "Discover" +[[stripe_test.credit]] + payment_method_type = "CartesBancaires" +[[stripe_test.credit]] + payment_method_type = "UnionPay" +[[stripe_test.debit]] + payment_method_type = "Mastercard" +[[stripe_test.debit]] + payment_method_type = "Visa" +[[stripe_test.debit]] + payment_method_type = "Interac" +[[stripe_test.debit]] + payment_method_type = "AmericanExpress" +[[stripe_test.debit]] + payment_method_type = "JCB" +[[stripe_test.debit]] + payment_method_type = "DinersClub" +[[stripe_test.debit]] + payment_method_type = "Discover" +[[stripe_test.debit]] + payment_method_type = "CartesBancaires" +[[stripe_test.debit]] + payment_method_type = "UnionPay" +[[stripe_test.wallet]] + payment_method_type = "google_pay" +[[stripe_test.wallet]] + payment_method_type = "ali_pay" +[[stripe_test.wallet]] + payment_method_type = "we_chat_pay" +[[stripe_test.pay_later]] + payment_method_type = "klarna" +[[stripe_test.pay_later]] + payment_method_type = "affirm" +[[stripe_test.pay_later]] + payment_method_type = "afterpay_clearpay" [stripe_test.connector_auth.HeaderKey] api_key="Api Key" - -[paypal_test] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -wallet = ["paypal"] -[paypal_test.connector_auth.HeaderKey] +[helcim] +[[helcim.credit]] + payment_method_type = "Mastercard" +[[helcim.credit]] + payment_method_type = "Visa" +[[helcim.credit]] + payment_method_type = "Interac" +[[helcim.credit]] + payment_method_type = "AmericanExpress" +[[helcim.credit]] + payment_method_type = "JCB" +[[helcim.credit]] + payment_method_type = "DinersClub" +[[helcim.credit]] + payment_method_type = "Discover" +[[helcim.credit]] + payment_method_type = "CartesBancaires" +[[helcim.credit]] + payment_method_type = "UnionPay" +[[helcim.debit]] + payment_method_type = "Mastercard" +[[helcim.debit]] + payment_method_type = "Visa" +[[helcim.debit]] + payment_method_type = "Interac" +[[helcim.debit]] + payment_method_type = "AmericanExpress" +[[helcim.debit]] + payment_method_type = "JCB" +[[helcim.debit]] + payment_method_type = "DinersClub" +[[helcim.debit]] + payment_method_type = "Discover" +[[helcim.debit]] + payment_method_type = "CartesBancaires" +[[helcim.debit]] + payment_method_type = "UnionPay" +[helcim.connector_auth.HeaderKey] api_key="Api Key" -[payme] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -[payme.connector_auth.BodyKey] -api_key="Seller Payme Id" -key1="Payme Public Key" -[payme.connector_webhook_details] -merchant_secret="Payme Client Secret" -additional_secret="Payme Client Key" - -[powertranz] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -[powertranz.connector_auth.BodyKey] -key1 = "PowerTranz Id" -api_key="PowerTranz Password" -[powertranz.connector_webhook_details] -merchant_secret="Source verification key" - -[globepay] -wallet = ["we_chat_pay","ali_pay"] -[globepay.connector_auth.BodyKey] -api_key="Partner Code" -key1="Credential Code" -[globepay.connector_webhook_details] -merchant_secret="Source verification key" - -[tsys] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -[tsys.connector_auth.SignatureKey] -api_key="Device Id" -key1="Transaction Key" -api_secret="Developer Id" -[tsys.connector_webhook_details] -merchant_secret="Source verification key" -[square] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -[square_payout.connector_auth.BodyKey] -api_key = "Square API Key" -key1 = "Square Client Id" -[square.connector_webhook_details] -merchant_secret="Source verification key" -[stax] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -bank_debit=["ach"] -[stax.connector_auth.HeaderKey] -api_key="Api Key" -[stax.connector_webhook_details] -merchant_secret="Source verification key" - -[volt] -bank_redirect = ["open_banking_uk"] -[volt.connector_auth.MultiAuthKey] -api_key = "Username" -api_secret = "Password" -key1 = "Client ID" -key2 = "Client Secret" - -[wise_payout] -bank_transfer = ["ach","bacs","sepa"] -[wise_payout.connector_auth.BodyKey] -api_key = "Wise API Key" -key1 = "Wise Account Id" [adyen_payout] -bank_transfer = ["ach","bacs","sepa"] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] +[[adyen_payout.credit]] + payment_method_type = "Mastercard" +[[adyen_payout.credit]] + payment_method_type = "Visa" +[[adyen_payout.credit]] + payment_method_type = "Interac" +[[adyen_payout.credit]] + payment_method_type = "AmericanExpress" +[[adyen_payout.credit]] + payment_method_type = "JCB" +[[adyen_payout.credit]] + payment_method_type = "DinersClub" +[[adyen_payout.credit]] + payment_method_type = "Discover" +[[adyen_payout.credit]] + payment_method_type = "CartesBancaires" +[[adyen_payout.credit]] + payment_method_type = "UnionPay" +[[adyen_payout.debit]] + payment_method_type = "Mastercard" +[[adyen_payout.debit]] + payment_method_type = "Visa" +[[adyen_payout.debit]] + payment_method_type = "Interac" +[[adyen_payout.debit]] + payment_method_type = "AmericanExpress" +[[adyen_payout.debit]] + payment_method_type = "JCB" +[[adyen_payout.debit]] + payment_method_type = "DinersClub" +[[adyen_payout.debit]] + payment_method_type = "Discover" +[[adyen_payout.debit]] + payment_method_type = "CartesBancaires" +[[adyen_payout.debit]] + payment_method_type = "UnionPay" +[[adyen_payout.bank_transfer]] + payment_method_type = "ach" +[[adyen_payout.bank_transfer]] + payment_method_type = "bacs" +[[adyen_payout.bank_transfer]] + payment_method_type = "sepa" [adyen_payout.connector_auth.SignatureKey] api_key = "Adyen API Key (Payout creation)" api_secret = "Adyen Key (Payout submission)" key1 = "Adyen Account Id" -[gocardless] -bank_debit=["ach","becs","sepa"] -[gocardless.connector_auth.HeaderKey] -api_key="Access Token" -[gocardless.connector_webhook_details] -merchant_secret="Source verification key" - -[bankofamerica] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -wallet = ["apple_pay","google_pay"] - -[bankofamerica.connector_auth.SignatureKey] -api_key="Key" -key1="Merchant ID" -api_secret="Shared Secret" -[bankofamerica.connector_webhook_details] -merchant_secret="Source verification key" - -[bankofamerica.metadata.apple_pay.session_token_data] -certificate="Merchant Certificate (Base64 Encoded)" -certificate_keys="Merchant PrivateKey (Base64 Encoded)" -merchant_identifier="Apple Merchant Identifier" -display_name="Display Name" -initiative="Domain" -initiative_context="Domain Name" -[bankofamerica.metadata.apple_pay.payment_request_data] -supported_networks=["visa","masterCard","amex","discover"] -merchant_capabilities=["supports3DS"] -label="apple" - -[bankofamerica.metadata.google_pay] -merchant_name="Google Pay Merchant Name" -gateway_merchant_id="Google Pay Merchant Key" -merchant_id="Google Pay Merchant ID" - -[placetopay] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] - -[placetopay.connector_auth.BodyKey] -api_key="Login" -key1="Trankey" \ No newline at end of file +[wise_payout] +[[wise_payout.bank_transfer]] + payment_method_type = "ach" +[[wise_payout.bank_transfer]] + payment_method_type = "bacs" +[[wise_payout.bank_transfer]] + payment_method_type = "sepa" +[wise_payout.connector_auth.BodyKey] +api_key = "Wise API Key" +key1 = "Wise Account Id" \ No newline at end of file diff --git a/crates/connector_configs/toml/production.toml b/crates/connector_configs/toml/production.toml index 225fc63912fc..38a41b40f7a7 100644 --- a/crates/connector_configs/toml/production.toml +++ b/crates/connector_configs/toml/production.toml @@ -1,9 +1,56 @@ - [aci] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -wallet = ["ali_pay","mb_way"] -bank_redirect=["ideal","giropay","sofort","eps","przelewy24","trustly"] +[[aci.credit]] + payment_method_type = "Mastercard" +[[aci.credit]] + payment_method_type = "Visa" +[[aci.credit]] + payment_method_type = "Interac" +[[aci.credit]] + payment_method_type = "AmericanExpress" +[[aci.credit]] + payment_method_type = "JCB" +[[aci.credit]] + payment_method_type = "DinersClub" +[[aci.credit]] + payment_method_type = "Discover" +[[aci.credit]] + payment_method_type = "CartesBancaires" +[[aci.credit]] + payment_method_type = "UnionPay" +[[aci.debit]] + payment_method_type = "Mastercard" +[[aci.debit]] + payment_method_type = "Visa" +[[aci.debit]] + payment_method_type = "Interac" +[[aci.debit]] + payment_method_type = "AmericanExpress" +[[aci.debit]] + payment_method_type = "JCB" +[[aci.debit]] + payment_method_type = "DinersClub" +[[aci.debit]] + payment_method_type = "Discover" +[[aci.debit]] + payment_method_type = "CartesBancaires" +[[aci.debit]] + payment_method_type = "UnionPay" +[[aci.wallet]] + payment_method_type = "ali_pay" +[[aci.wallet]] + payment_method_type = "mb_way" +[[aci.bank_redirect]] + payment_method_type = "ideal" +[[aci.bank_redirect]] + payment_method_type = "giropay" +[[aci.bank_redirect]] + payment_method_type = "sofort" +[[aci.bank_redirect]] + payment_method_type = "eps" +[[aci.bank_redirect]] + payment_method_type = "przelewy24" +[[aci.bank_redirect]] + payment_method_type = "trustly" [aci.connector_auth.BodyKey] api_key="API Key" key1="Entity ID" @@ -11,12 +58,66 @@ key1="Entity ID" merchant_secret="Source verification key" [adyen] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -pay_later=["klarna","affirm","afterpay_clearpay"] -bank_debit=["ach","bacs"] -bank_redirect=["ideal","giropay","sofort","eps"] -wallet = ["apple_pay","google_pay","paypal"] +[[adyen.credit]] + payment_method_type = "Mastercard" +[[adyen.credit]] + payment_method_type = "Visa" +[[adyen.credit]] + payment_method_type = "Interac" +[[adyen.credit]] + payment_method_type = "AmericanExpress" +[[adyen.credit]] + payment_method_type = "JCB" +[[adyen.credit]] + payment_method_type = "DinersClub" +[[adyen.credit]] + payment_method_type = "Discover" +[[adyen.credit]] + payment_method_type = "CartesBancaires" +[[adyen.credit]] + payment_method_type = "UnionPay" +[[adyen.debit]] + payment_method_type = "Mastercard" +[[adyen.debit]] + payment_method_type = "Visa" +[[adyen.debit]] + payment_method_type = "Interac" +[[adyen.debit]] + payment_method_type = "AmericanExpress" +[[adyen.debit]] + payment_method_type = "JCB" +[[adyen.debit]] + payment_method_type = "DinersClub" +[[adyen.debit]] + payment_method_type = "Discover" +[[adyen.debit]] + payment_method_type = "CartesBancaires" +[[adyen.debit]] + payment_method_type = "UnionPay" +[[adyen.pay_later]] + payment_method_type = "klarna" +[[adyen.pay_later]] + payment_method_type = "affirm" +[[adyen.pay_later]] + payment_method_type = "afterpay_clearpay" +[[adyen.bank_debit]] + payment_method_type = "ach" +[[adyen.bank_debit]] + payment_method_type = "bacs" +[[adyen.bank_redirect]] + payment_method_type = "ideal" +[[adyen.bank_redirect]] + payment_method_type = "giropay" +[[adyen.bank_redirect]] + payment_method_type = "sofort" +[[adyen.bank_redirect]] + payment_method_type = "eps" +[[adyen.wallet]] + payment_method_type = "apple_pay" +[[adyen.wallet]] + payment_method_type = "google_pay" +[[adyen.wallet]] + payment_method_type = "paypal" [adyen.connector_auth.BodyKey] api_key="Adyen API Key" key1="Adyen Account Id" @@ -43,8 +144,42 @@ label="apple" [airwallex] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] +[[airwallex.credit]] + payment_method_type = "Mastercard" +[[airwallex.credit]] + payment_method_type = "Visa" +[[airwallex.credit]] + payment_method_type = "Interac" +[[airwallex.credit]] + payment_method_type = "AmericanExpress" +[[airwallex.credit]] + payment_method_type = "JCB" +[[airwallex.credit]] + payment_method_type = "DinersClub" +[[airwallex.credit]] + payment_method_type = "Discover" +[[airwallex.credit]] + payment_method_type = "CartesBancaires" +[[airwallex.credit]] + payment_method_type = "UnionPay" +[[airwallex.debit]] + payment_method_type = "Mastercard" +[[airwallex.debit]] + payment_method_type = "Visa" +[[airwallex.debit]] + payment_method_type = "Interac" +[[airwallex.debit]] + payment_method_type = "AmericanExpress" +[[airwallex.debit]] + payment_method_type = "JCB" +[[airwallex.debit]] + payment_method_type = "DinersClub" +[[airwallex.debit]] + payment_method_type = "Discover" +[[airwallex.debit]] + payment_method_type = "CartesBancaires" +[[airwallex.debit]] + payment_method_type = "UnionPay" body_type="BodyKey" [airwallex.connector_auth.BodyKey] api_key="API Key" @@ -53,9 +188,46 @@ key1="Client ID" merchant_secret="Source verification key" [authorizedotnet] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -wallet = ["google_pay","paypal"] +[[authorizedotnet.credit]] + payment_method_type = "Mastercard" +[[authorizedotnet.credit]] + payment_method_type = "Visa" +[[authorizedotnet.credit]] + payment_method_type = "Interac" +[[authorizedotnet.credit]] + payment_method_type = "AmericanExpress" +[[authorizedotnet.credit]] + payment_method_type = "JCB" +[[authorizedotnet.credit]] + payment_method_type = "DinersClub" +[[authorizedotnet.credit]] + payment_method_type = "Discover" +[[authorizedotnet.credit]] + payment_method_type = "CartesBancaires" +[[authorizedotnet.credit]] + payment_method_type = "UnionPay" +[[authorizedotnet.debit]] + payment_method_type = "Mastercard" +[[authorizedotnet.debit]] + payment_method_type = "Visa" +[[authorizedotnet.debit]] + payment_method_type = "Interac" +[[authorizedotnet.debit]] + payment_method_type = "AmericanExpress" +[[authorizedotnet.debit]] + payment_method_type = "JCB" +[[authorizedotnet.debit]] + payment_method_type = "DinersClub" +[[authorizedotnet.debit]] + payment_method_type = "Discover" +[[authorizedotnet.debit]] + payment_method_type = "CartesBancaires" +[[authorizedotnet.debit]] + payment_method_type = "UnionPay" +[[authorizedotnet.wallet]] + payment_method_type = "google_pay" +[[authorizedotnet.wallet]] + payment_method_type = "paypal" body_type="BodyKey" [authorizedotnet.connector_auth.BodyKey] api_key="API Login ID" @@ -68,16 +240,54 @@ merchant_id="Google Pay Merchant ID" merchant_secret="Source verification key" [bitpay] -crypto = ["crypto_currency"] +[[bitpay.crypto]] + payment_method_type = "crypto_currency" [bitpay.connector_auth.HeaderKey] api_key="API Key" [bitpay.connector_webhook_details] merchant_secret="Source verification key" [bluesnap] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -wallet = ["google_pay","apple_pay"] +[[bluesnap.credit]] + payment_method_type = "Mastercard" +[[bluesnap.credit]] + payment_method_type = "Visa" +[[bluesnap.credit]] + payment_method_type = "Interac" +[[bluesnap.credit]] + payment_method_type = "AmericanExpress" +[[bluesnap.credit]] + payment_method_type = "JCB" +[[bluesnap.credit]] + payment_method_type = "DinersClub" +[[bluesnap.credit]] + payment_method_type = "Discover" +[[bluesnap.credit]] + payment_method_type = "CartesBancaires" +[[bluesnap.credit]] + payment_method_type = "UnionPay" +[[bluesnap.debit]] + payment_method_type = "Mastercard" +[[bluesnap.debit]] + payment_method_type = "Visa" +[[bluesnap.debit]] + payment_method_type = "Interac" +[[bluesnap.debit]] + payment_method_type = "AmericanExpress" +[[bluesnap.debit]] + payment_method_type = "JCB" +[[bluesnap.debit]] + payment_method_type = "DinersClub" +[[bluesnap.debit]] + payment_method_type = "Discover" +[[bluesnap.debit]] + payment_method_type = "CartesBancaires" +[[bluesnap.debit]] + payment_method_type = "UnionPay" +[[bluesnap.wallet]] + payment_method_type = "google_pay" +[[bluesnap.wallet]] + payment_method_type = "apple_pay" [bluesnap.connector_auth.BodyKey] api_key="Password" key1="Username" @@ -104,8 +314,44 @@ label="apple" merchant_id="Merchant Id" [braintree] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] +[[braintree.credit]] + payment_method_type = "Mastercard" +[[braintree.credit]] + payment_method_type = "Visa" +[[braintree.credit]] + payment_method_type = "Interac" +[[braintree.credit]] + payment_method_type = "AmericanExpress" +[[braintree.credit]] + payment_method_type = "JCB" +[[braintree.credit]] + payment_method_type = "DinersClub" +[[braintree.credit]] + payment_method_type = "Discover" +[[braintree.credit]] + payment_method_type = "CartesBancaires" +[[braintree.credit]] + payment_method_type = "UnionPay" +[[braintree.debit]] + payment_method_type = "Mastercard" +[[braintree.debit]] + payment_method_type = "Visa" +[[braintree.debit]] + payment_method_type = "Interac" +[[braintree.debit]] + payment_method_type = "AmericanExpress" +[[braintree.debit]] + payment_method_type = "JCB" +[[braintree.debit]] + payment_method_type = "DinersClub" +[[braintree.debit]] + payment_method_type = "Discover" +[[braintree.debit]] + payment_method_type = "CartesBancaires" +[[bluesnap.debit]] + payment_method_type = "UnionPay" +[[braintree.debit]] + payment_method_type = "UnionPay" [braintree.connector_auth.SignatureKey] api_key="Public Key" @@ -114,10 +360,212 @@ api_secret="Private Key" [braintree.connector_webhook_details] merchant_secret="Source verification key" +[bambora] +[[bambora.credit]] + payment_method_type = "Mastercard" +[[bambora.credit]] + payment_method_type = "Visa" +[[bambora.credit]] + payment_method_type = "Interac" +[[bambora.credit]] + payment_method_type = "AmericanExpress" +[[bambora.credit]] + payment_method_type = "JCB" +[[bambora.credit]] + payment_method_type = "DinersClub" +[[bambora.credit]] + payment_method_type = "Discover" +[[bambora.credit]] + payment_method_type = "CartesBancaires" +[[bambora.credit]] + payment_method_type = "UnionPay" +[[bambora.debit]] + payment_method_type = "Mastercard" +[[bambora.debit]] + payment_method_type = "Visa" +[[bambora.debit]] + payment_method_type = "Interac" +[[bambora.debit]] + payment_method_type = "AmericanExpress" +[[bambora.debit]] + payment_method_type = "JCB" +[[bambora.debit]] + payment_method_type = "DinersClub" +[[bambora.debit]] + payment_method_type = "Discover" +[[bambora.debit]] + payment_method_type = "CartesBancaires" +[[bambora.debit]] + payment_method_type = "UnionPay" +[[bambora.wallet]] + payment_method_type = "apple_pay" +[[bambora.wallet]] + payment_method_type = "paypal" +[bambora.connector_auth.BodyKey] +api_key="Passcode" +key1="Merchant Id" +[bambora.connector_webhook_details] +merchant_secret="Source verification key" + +[bambora.metadata.apple_pay.session_token_data] +certificate="Merchant Certificate (Base64 Encoded)" +certificate_keys="Merchant PrivateKey (Base64 Encoded)" +merchant_identifier="Apple Merchant Identifier" +display_name="Display Name" +initiative="Domain" +initiative_context="Domain Name" +[bambora.metadata.apple_pay.payment_request_data] +supported_networks=["visa","masterCard","amex","discover"] +merchant_capabilities=["supports3DS"] +label="apple" + +[bankofamerica] +[[bankofamerica.credit]] + payment_method_type = "Mastercard" +[[bankofamerica.credit]] + payment_method_type = "Visa" +[[bankofamerica.credit]] + payment_method_type = "Interac" +[[bankofamerica.credit]] + payment_method_type = "AmericanExpress" +[[bankofamerica.credit]] + payment_method_type = "JCB" +[[bankofamerica.credit]] + payment_method_type = "DinersClub" +[[bankofamerica.credit]] + payment_method_type = "Discover" +[[bankofamerica.credit]] + payment_method_type = "CartesBancaires" +[[bankofamerica.credit]] + payment_method_type = "UnionPay" +[[bankofamerica.debit]] + payment_method_type = "Mastercard" +[[bankofamerica.debit]] + payment_method_type = "Visa" +[[bankofamerica.debit]] + payment_method_type = "Interac" +[[bankofamerica.debit]] + payment_method_type = "AmericanExpress" +[[bankofamerica.debit]] + payment_method_type = "JCB" +[[bankofamerica.debit]] + payment_method_type = "DinersClub" +[[bankofamerica.debit]] + payment_method_type = "Discover" +[[bankofamerica.debit]] + payment_method_type = "CartesBancaires" +[[bankofamerica.debit]] + payment_method_type = "UnionPay" +[[bankofamerica.wallet]] + payment_method_type = "apple_pay" +[[bankofamerica.wallet]] + payment_method_type = "google_pay" + +[bankofamerica.connector_auth.SignatureKey] +api_key="Key" +key1="Merchant ID" +api_secret="Shared Secret" +[bankofamerica.connector_webhook_details] +merchant_secret="Source verification key" + +[bankofamerica.metadata.apple_pay.session_token_data] +certificate="Merchant Certificate (Base64 Encoded)" +certificate_keys="Merchant PrivateKey (Base64 Encoded)" +merchant_identifier="Apple Merchant Identifier" +display_name="Display Name" +initiative="Domain" +initiative_context="Domain Name" +[bankofamerica.metadata.apple_pay.payment_request_data] +supported_networks=["visa","masterCard","amex","discover"] +merchant_capabilities=["supports3DS"] +label="apple" + +[bankofamerica.metadata.google_pay] +merchant_name="Google Pay Merchant Name" +gateway_merchant_id="Google Pay Merchant Key" +merchant_id="Google Pay Merchant ID" + +[cashtocode] +[[cashtocode.reward]] + payment_method_type = "classic" +[[cashtocode.reward]] + payment_method_type = "evoucher" +[cashtocode.connector_auth.CurrencyAuthKey.auth_key_map.EUR.classic] +password_classic="Password Classic" +username_classic="Username Classic" +merchant_id_classic="MerchantId Classic" +[cashtocode.connector_auth.CurrencyAuthKey.auth_key_map.EUR.evoucher] +password_evoucher="Password Evoucher" +username_evoucher="Username Evoucher" +merchant_id_evoucher="MerchantId Evoucher" +[cashtocode.connector_auth.CurrencyAuthKey.auth_key_map.GBP.classic] +password_classic="Password Classic" +username_classic="Username Classic" +merchant_id_classic="MerchantId Classic" +[cashtocode.connector_auth.CurrencyAuthKey.auth_key_map.GBP.evoucher] +password_evoucher="Password Evoucher" +username_evoucher="Username Evoucher" +merchant_id_evoucher="MerchantId Evoucher" +[cashtocode.connector_auth.CurrencyAuthKey.auth_key_map.USD.classic] +password_classic="Password Classic" +username_classic="Username Classic" +merchant_id_classic="MerchantId Classic" +[cashtocode.connector_auth.CurrencyAuthKey.auth_key_map.USD.evoucher] +password_evoucher="Password Evoucher" +username_evoucher="Username Evoucher" +merchant_id_evoucher="MerchantId Evoucher" + + +[cryptopay] +[[cryptopay.crypto]] + payment_method_type = "crypto_currency" +[cryptopay.connector_auth.BodyKey] +api_key="API Key" +key1="Secret Key" +[cryptopay.connector_webhook_details] +merchant_secret="Source verification key" + [checkout] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -wallet = ["apple_pay","google_pay"] +[[checkout.credit]] + payment_method_type = "Mastercard" +[[checkout.credit]] + payment_method_type = "Visa" +[[checkout.credit]] + payment_method_type = "Interac" +[[checkout.credit]] + payment_method_type = "AmericanExpress" +[[checkout.credit]] + payment_method_type = "JCB" +[[checkout.credit]] + payment_method_type = "DinersClub" +[[checkout.credit]] + payment_method_type = "Discover" +[[checkout.credit]] + payment_method_type = "CartesBancaires" +[[checkout.credit]] + payment_method_type = "UnionPay" +[[checkout.debit]] + payment_method_type = "Mastercard" +[[checkout.debit]] + payment_method_type = "Visa" +[[checkout.debit]] + payment_method_type = "Interac" +[[checkout.debit]] + payment_method_type = "AmericanExpress" +[[checkout.debit]] + payment_method_type = "JCB" +[[checkout.debit]] + payment_method_type = "DinersClub" +[[checkout.debit]] + payment_method_type = "Discover" +[[checkout.debit]] + payment_method_type = "CartesBancaires" +[[checkout.debit]] + payment_method_type = "UnionPay" +[[checkout.wallet]] + payment_method_type = "apple_pay" +[[checkout.wallet]] + payment_method_type = "google_pay" [checkout.connector_auth.SignatureKey] api_key="Checkout API Public Key" key1="Processing Channel ID" @@ -145,16 +593,54 @@ label="apple" [coinbase] -crypto = ["crypto_currency"] +[[coinbase.crypto]] + payment_method_type = "crypto_currency" [coinbase.connector_auth.HeaderKey] api_key="API Key" [coinbase.connector_webhook_details] merchant_secret="Source verification key" [cybersource] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -wallet = ["apple_pay","google_pay"] +[[cybersource.credit]] + payment_method_type = "Mastercard" +[[cybersource.credit]] + payment_method_type = "Visa" +[[cybersource.credit]] + payment_method_type = "Interac" +[[cybersource.credit]] + payment_method_type = "AmericanExpress" +[[cybersource.credit]] + payment_method_type = "JCB" +[[cybersource.credit]] + payment_method_type = "DinersClub" +[[cybersource.credit]] + payment_method_type = "Discover" +[[cybersource.credit]] + payment_method_type = "CartesBancaires" +[[cybersource.credit]] + payment_method_type = "UnionPay" +[[cybersource.debit]] + payment_method_type = "Mastercard" +[[cybersource.debit]] + payment_method_type = "Visa" +[[cybersource.debit]] + payment_method_type = "Interac" +[[cybersource.debit]] + payment_method_type = "AmericanExpress" +[[cybersource.debit]] + payment_method_type = "JCB" +[[cybersource.debit]] + payment_method_type = "DinersClub" +[[cybersource.debit]] + payment_method_type = "Discover" +[[cybersource.debit]] + payment_method_type = "CartesBancaires" +[[cybersource.debit]] + payment_method_type = "UnionPay" +[[cybersource.wallet]] + payment_method_type = "apple_pay" +[[cybersource.wallet]] + payment_method_type = "google_pay" [cybersource.connector_auth.SignatureKey] api_key="Key" key1="Merchant ID" @@ -179,47 +665,43 @@ merchant_name="Google Pay Merchant Name" gateway_merchant_id="Google Pay Merchant Key" merchant_id="Google Pay Merchant ID" -[iatapay] -upi=["upi_collect"] -[iatapay.connector_auth.SignatureKey] -api_key="Client ID" -key1="Airline ID" -api_secret="Client Secret" -[iatapay.connector_webhook_details] -merchant_secret="Source verification key" - -[opennode] -crypto = ["crypto_currency"] -[opennode.connector_auth.HeaderKey] -api_key="API Key" -[opennode.connector_webhook_details] -merchant_secret="Source verification key" - -[bambora] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -wallet = ["apple_pay","paypal"] -[bambora.connector_auth.BodyKey] -api_key="Passcode" -key1="Merchant Id" -[bambora.connector_webhook_details] -merchant_secret="Source verification key" - -[bambora.metadata.apple_pay.session_token_data] -certificate="Merchant Certificate (Base64 Encoded)" -certificate_keys="Merchant PrivateKey (Base64 Encoded)" -merchant_identifier="Apple Merchant Identifier" -display_name="Display Name" -initiative="Domain" -initiative_context="Domain Name" -[bambora.metadata.apple_pay.payment_request_data] -supported_networks=["visa","masterCard","amex","discover"] -merchant_capabilities=["supports3DS"] -label="apple" - [dlocal] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] +[[dlocal.credit]] + payment_method_type = "Mastercard" +[[dlocal.credit]] + payment_method_type = "Visa" +[[dlocal.credit]] + payment_method_type = "Interac" +[[dlocal.credit]] + payment_method_type = "AmericanExpress" +[[dlocal.credit]] + payment_method_type = "JCB" +[[dlocal.credit]] + payment_method_type = "DinersClub" +[[dlocal.credit]] + payment_method_type = "Discover" +[[dlocal.credit]] + payment_method_type = "CartesBancaires" +[[dlocal.credit]] + payment_method_type = "UnionPay" +[[dlocal.debit]] + payment_method_type = "Mastercard" +[[dlocal.debit]] + payment_method_type = "Visa" +[[dlocal.debit]] + payment_method_type = "Interac" +[[dlocal.debit]] + payment_method_type = "AmericanExpress" +[[dlocal.debit]] + payment_method_type = "JCB" +[[dlocal.debit]] + payment_method_type = "DinersClub" +[[dlocal.debit]] + payment_method_type = "Discover" +[[dlocal.debit]] + payment_method_type = "CartesBancaires" +[[dlocal.debit]] + payment_method_type = "UnionPay" [dlocal.connector_auth.SignatureKey] api_key="X Login" key1="X Trans Key" @@ -229,8 +711,42 @@ merchant_secret="Source verification key" [fiserv] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] +[[fiserv.credit]] + payment_method_type = "Mastercard" +[[fiserv.credit]] + payment_method_type = "Visa" +[[fiserv.credit]] + payment_method_type = "Interac" +[[fiserv.credit]] + payment_method_type = "AmericanExpress" +[[fiserv.credit]] + payment_method_type = "JCB" +[[fiserv.credit]] + payment_method_type = "DinersClub" +[[fiserv.credit]] + payment_method_type = "Discover" +[[fiserv.credit]] + payment_method_type = "CartesBancaires" +[[fiserv.credit]] + payment_method_type = "UnionPay" +[[fiserv.debit]] + payment_method_type = "Mastercard" +[[fiserv.debit]] + payment_method_type = "Visa" +[[fiserv.debit]] + payment_method_type = "Interac" +[[fiserv.debit]] + payment_method_type = "AmericanExpress" +[[fiserv.debit]] + payment_method_type = "JCB" +[[fiserv.debit]] + payment_method_type = "DinersClub" +[[fiserv.debit]] + payment_method_type = "Discover" +[[fiserv.debit]] + payment_method_type = "CartesBancaires" +[[fiserv.debit]] + payment_method_type = "UnionPay" [fiserv.connector_auth.SignatureKey] api_key="API Key" key1="Merchant ID" @@ -241,8 +757,42 @@ merchant_secret="Source verification key" terminal_id="Terminal ID" [forte] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] +[[forte.credit]] + payment_method_type = "Mastercard" +[[forte.credit]] + payment_method_type = "Visa" +[[forte.credit]] + payment_method_type = "Interac" +[[forte.credit]] + payment_method_type = "AmericanExpress" +[[forte.credit]] + payment_method_type = "JCB" +[[forte.credit]] + payment_method_type = "DinersClub" +[[forte.credit]] + payment_method_type = "Discover" +[[forte.credit]] + payment_method_type = "CartesBancaires" +[[forte.credit]] + payment_method_type = "UnionPay" +[[forte.debit]] + payment_method_type = "Mastercard" +[[forte.debit]] + payment_method_type = "Visa" +[[forte.debit]] + payment_method_type = "Interac" +[[forte.debit]] + payment_method_type = "AmericanExpress" +[[forte.debit]] + payment_method_type = "JCB" +[[forte.debit]] + payment_method_type = "DinersClub" +[[forte.debit]] + payment_method_type = "Discover" +[[forte.debit]] + payment_method_type = "CartesBancaires" +[[forte.debit]] + payment_method_type = "UnionPay" [forte.connector_auth.MultiAuthKey] api_key="API Access ID" key1="Organization ID" @@ -253,36 +803,144 @@ merchant_secret="Source verification key" [globalpay] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -bank_redirect=["ideal","giropay","sofort","eps"] -wallet = ["google_pay","paypal"] +[[globalpay.credit]] + payment_method_type = "Mastercard" +[[globalpay.credit]] + payment_method_type = "Visa" +[[globalpay.credit]] + payment_method_type = "Interac" +[[globalpay.credit]] + payment_method_type = "AmericanExpress" +[[globalpay.credit]] + payment_method_type = "JCB" +[[globalpay.credit]] + payment_method_type = "DinersClub" +[[globalpay.credit]] + payment_method_type = "Discover" +[[globalpay.credit]] + payment_method_type = "CartesBancaires" +[[globalpay.credit]] + payment_method_type = "UnionPay" +[[globalpay.debit]] + payment_method_type = "Mastercard" +[[globalpay.debit]] + payment_method_type = "Visa" +[[globalpay.debit]] + payment_method_type = "Interac" +[[globalpay.debit]] + payment_method_type = "AmericanExpress" +[[globalpay.debit]] + payment_method_type = "JCB" +[[globalpay.debit]] + payment_method_type = "DinersClub" +[[globalpay.debit]] + payment_method_type = "Discover" +[[globalpay.debit]] + payment_method_type = "CartesBancaires" +[[globalpay.debit]] + payment_method_type = "UnionPay" +[[globalpay.bank_redirect]] + payment_method_type = "ideal" +[[globalpay.bank_redirect]] + payment_method_type = "giropay" +[[globalpay.bank_redirect]] + payment_method_type = "sofort" +[[globalpay.bank_redirect]] + payment_method_type = "eps" +[[globalpay.wallet]] + payment_method_type = "google_pay" +[[globalpay.wallet]] + payment_method_type = "paypal" [globalpay.connector_auth.BodyKey] api_key="Global App Key" key1="Global App ID" [globalpay.connector_webhook_details] merchant_secret="Source verification key" - [globalpay.metadata] account_name="Account Name" - [globalpay.metadata.google_pay] merchant_name="Google Pay Merchant Name" gateway_merchant_id="Google Pay Merchant Key" merchant_id="Google Pay Merchant ID" + +[globepay] +[[globepay.wallet]] + payment_method_type = "we_chat_pay" +[[globepay.wallet]] + payment_method_type = "ali_pay" +[globepay.connector_auth.BodyKey] +api_key="Partner Code" +key1="Credential Code" +[globepay.connector_webhook_details] +merchant_secret="Source verification key" + +[iatapay] +[[iatapay.upi]] + payment_method_type = "upi_collect" +[iatapay.connector_auth.SignatureKey] +api_key="Client ID" +key1="Airline ID" +api_secret="Client Secret" +[iatapay.connector_webhook_details] +merchant_secret="Source verification key" + [klarna] -pay_later=["klarna"] +[[klarna.pay_later]] + payment_method_type = "klarna" [klarna.connector_auth.HeaderKey] api_key="Klarna API Key" [klarna.connector_webhook_details] merchant_secret="Source verification key" + [mollie] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -bank_redirect=["ideal","giropay","sofort","eps"] -wallet = ["paypal"] +[[mollie.credit]] + payment_method_type = "Mastercard" +[[mollie.credit]] + payment_method_type = "Visa" +[[mollie.credit]] + payment_method_type = "Interac" +[[mollie.credit]] + payment_method_type = "AmericanExpress" +[[mollie.credit]] + payment_method_type = "JCB" +[[mollie.credit]] + payment_method_type = "DinersClub" +[[mollie.credit]] + payment_method_type = "Discover" +[[mollie.credit]] + payment_method_type = "CartesBancaires" +[[mollie.credit]] + payment_method_type = "UnionPay" +[[mollie.debit]] + payment_method_type = "Mastercard" +[[mollie.debit]] + payment_method_type = "Visa" +[[mollie.debit]] + payment_method_type = "Interac" +[[mollie.debit]] + payment_method_type = "AmericanExpress" +[[mollie.debit]] + payment_method_type = "JCB" +[[mollie.debit]] + payment_method_type = "DinersClub" +[[mollie.debit]] + payment_method_type = "Discover" +[[mollie.debit]] + payment_method_type = "CartesBancaires" +[[mollie.debit]] + payment_method_type = "UnionPay" +[[mollie.bank_redirect]] + payment_method_type = "ideal" +[[mollie.bank_redirect]] + payment_method_type = "giropay" +[[mollie.bank_redirect]] + payment_method_type = "sofort" +[[mollie.bank_redirect]] + payment_method_type = "eps" +[[mollie.wallet]] + payment_method_type = "paypal" [mollie.connector_auth.BodyKey] api_key="API Key" key1="Profile Token" @@ -290,8 +948,42 @@ key1="Profile Token" merchant_secret="Source verification key" [multisafepay] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] +[[multisafepay.credit]] + payment_method_type = "Mastercard" +[[multisafepay.credit]] + payment_method_type = "Visa" +[[multisafepay.credit]] + payment_method_type = "Interac" +[[multisafepay.credit]] + payment_method_type = "AmericanExpress" +[[multisafepay.credit]] + payment_method_type = "JCB" +[[multisafepay.credit]] + payment_method_type = "DinersClub" +[[multisafepay.credit]] + payment_method_type = "Discover" +[[multisafepay.credit]] + payment_method_type = "CartesBancaires" +[[multisafepay.credit]] + payment_method_type = "UnionPay" +[[multisafepay.debit]] + payment_method_type = "Mastercard" +[[multisafepay.debit]] + payment_method_type = "Visa" +[[multisafepay.debit]] + payment_method_type = "Interac" +[[multisafepay.debit]] + payment_method_type = "AmericanExpress" +[[multisafepay.debit]] + payment_method_type = "JCB" +[[multisafepay.debit]] + payment_method_type = "DinersClub" +[[multisafepay.debit]] + payment_method_type = "Discover" +[[multisafepay.debit]] + payment_method_type = "CartesBancaires" +[[multisafepay.debit]] + payment_method_type = "UnionPay" [multisafepay.connector_auth.HeaderKey] api_key="Enter API Key" [multisafepay.connector_webhook_details] @@ -299,16 +991,59 @@ merchant_secret="Source verification key" [nexinets] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -bank_redirect=["ideal","giropay","sofort","eps"] -wallet = ["apple_pay","paypal"] +[[nexinets.credit]] + payment_method_type = "Mastercard" +[[nexinets.credit]] + payment_method_type = "Visa" +[[nexinets.credit]] + payment_method_type = "Interac" +[[nexinets.credit]] + payment_method_type = "AmericanExpress" +[[nexinets.credit]] + payment_method_type = "JCB" +[[nexinets.credit]] + payment_method_type = "DinersClub" +[[nexinets.credit]] + payment_method_type = "Discover" +[[nexinets.credit]] + payment_method_type = "CartesBancaires" +[[nexinets.credit]] + payment_method_type = "UnionPay" +[[nexinets.debit]] + payment_method_type = "Mastercard" +[[nexinets.debit]] + payment_method_type = "Visa" +[[nexinets.debit]] + payment_method_type = "Interac" +[[nexinets.debit]] + payment_method_type = "AmericanExpress" +[[nexinets.debit]] + payment_method_type = "JCB" +[[nexinets.debit]] + payment_method_type = "DinersClub" +[[nexinets.debit]] + payment_method_type = "Discover" +[[nexinets.debit]] + payment_method_type = "CartesBancaires" +[[nexinets.debit]] + payment_method_type = "UnionPay" +[[nexinets.bank_redirect]] + payment_method_type = "ideal" +[[nexinets.bank_redirect]] + payment_method_type = "giropay" +[[nexinets.bank_redirect]] + payment_method_type = "sofort" +[[nexinets.bank_redirect]] + payment_method_type = "eps" +[[nexinets.wallet]] + payment_method_type = "apple_pay" +[[nexinets.wallet]] + payment_method_type = "paypal" [nexinets.connector_auth.BodyKey] api_key="API Key" key1="Merchant ID" [nexinets.connector_webhook_details] merchant_secret="Source verification key" - [nexinets.metadata.apple_pay.session_token_data] certificate="Merchant Certificate (Base64 Encoded)" certificate_keys="Merchant PrivateKey (Base64 Encoded)" @@ -322,7 +1057,8 @@ merchant_capabilities=["supports3DS"] label="apple" [nmi] -bank_redirect=["ideal"] +[[nmi.bank_redirect]] + payment_method_type = "ideal" [nmi.connector_auth.SignatureKey] api_key="Client ID" key1="Airline ID" @@ -331,8 +1067,42 @@ api_secret="Client Secret" merchant_secret="Source verification key" [nuvei] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] +[[nuvei.credit]] + payment_method_type = "Mastercard" +[[nuvei.credit]] + payment_method_type = "Visa" +[[nuvei.credit]] + payment_method_type = "Interac" +[[nuvei.credit]] + payment_method_type = "AmericanExpress" +[[nuvei.credit]] + payment_method_type = "JCB" +[[nuvei.credit]] + payment_method_type = "DinersClub" +[[nuvei.credit]] + payment_method_type = "Discover" +[[nuvei.credit]] + payment_method_type = "CartesBancaires" +[[nuvei.credit]] + payment_method_type = "UnionPay" +[[nuvei.debit]] + payment_method_type = "Mastercard" +[[nuvei.debit]] + payment_method_type = "Visa" +[[nuvei.debit]] + payment_method_type = "Interac" +[[nuvei.debit]] + payment_method_type = "AmericanExpress" +[[nuvei.debit]] + payment_method_type = "JCB" +[[nuvei.debit]] + payment_method_type = "DinersClub" +[[nuvei.debit]] + payment_method_type = "Discover" +[[nuvei.debit]] + payment_method_type = "CartesBancaires" +[[nuvei.debit]] + payment_method_type = "UnionPay" [nuvei.connector_auth.SignatureKey] api_key="Merchant ID" key1="Merchant Site ID" @@ -340,10 +1110,56 @@ api_secret="Merchant Secret" [nuvei.connector_webhook_details] merchant_secret="Source verification key" + + + +[opennode] +[[opennode.crypto]] + payment_method_type = "crypto_currency" +[opennode.connector_auth.HeaderKey] +api_key="API Key" +[opennode.connector_webhook_details] +merchant_secret="Source verification key" + [paypal] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -wallet = ["paypal"] +[[paypal.credit]] + payment_method_type = "Mastercard" +[[paypal.credit]] + payment_method_type = "Visa" +[[paypal.credit]] + payment_method_type = "Interac" +[[paypal.credit]] + payment_method_type = "AmericanExpress" +[[paypal.credit]] + payment_method_type = "JCB" +[[paypal.credit]] + payment_method_type = "DinersClub" +[[paypal.credit]] + payment_method_type = "Discover" +[[paypal.credit]] + payment_method_type = "CartesBancaires" +[[paypal.credit]] + payment_method_type = "UnionPay" +[[paypal.debit]] + payment_method_type = "Mastercard" +[[paypal.debit]] + payment_method_type = "Visa" +[[paypal.debit]] + payment_method_type = "Interac" +[[paypal.debit]] + payment_method_type = "AmericanExpress" +[[paypal.debit]] + payment_method_type = "JCB" +[[paypal.debit]] + payment_method_type = "DinersClub" +[[paypal.debit]] + payment_method_type = "Discover" +[[paypal.debit]] + payment_method_type = "CartesBancaires" +[[paypal.debit]] + payment_method_type = "UnionPay" +[[paypal.wallet]] + payment_method_type = "paypal" is_verifiable = true [paypal.connector_auth.BodyKey] api_key="Client Secret" @@ -352,9 +1168,44 @@ key1="Client ID" merchant_secret="Source verification key" [payu] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -wallet = ["google_pay"] +[[payu.credit]] + payment_method_type = "Mastercard" +[[payu.credit]] + payment_method_type = "Visa" +[[payu.credit]] + payment_method_type = "Interac" +[[payu.credit]] + payment_method_type = "AmericanExpress" +[[payu.credit]] + payment_method_type = "JCB" +[[payu.credit]] + payment_method_type = "DinersClub" +[[payu.credit]] + payment_method_type = "Discover" +[[payu.credit]] + payment_method_type = "CartesBancaires" +[[payu.credit]] + payment_method_type = "UnionPay" +[[payu.debit]] + payment_method_type = "Mastercard" +[[payu.debit]] + payment_method_type = "Visa" +[[payu.debit]] + payment_method_type = "Interac" +[[payu.debit]] + payment_method_type = "AmericanExpress" +[[payu.debit]] + payment_method_type = "JCB" +[[payu.debit]] + payment_method_type = "DinersClub" +[[payu.debit]] + payment_method_type = "Discover" +[[payu.debit]] + payment_method_type = "CartesBancaires" +[[payu.debit]] + payment_method_type = "UnionPay" +[[payu.wallet]] + payment_method_type = "google_pay" [payu.connector_auth.BodyKey] api_key="API Key" key1="Merchant POS ID" @@ -367,9 +1218,44 @@ gateway_merchant_id="Google Pay Merchant Key" merchant_id="Google Pay Merchant ID" [rapyd] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -wallet = ["apple_pay"] +[[rapyd.credit]] + payment_method_type = "Mastercard" +[[rapyd.credit]] + payment_method_type = "Visa" +[[rapyd.credit]] + payment_method_type = "Interac" +[[rapyd.credit]] + payment_method_type = "AmericanExpress" +[[rapyd.credit]] + payment_method_type = "JCB" +[[rapyd.credit]] + payment_method_type = "DinersClub" +[[rapyd.credit]] + payment_method_type = "Discover" +[[rapyd.credit]] + payment_method_type = "CartesBancaires" +[[rapyd.credit]] + payment_method_type = "UnionPay" +[[rapyd.debit]] + payment_method_type = "Mastercard" +[[rapyd.debit]] + payment_method_type = "Visa" +[[rapyd.debit]] + payment_method_type = "Interac" +[[rapyd.debit]] + payment_method_type = "AmericanExpress" +[[rapyd.debit]] + payment_method_type = "JCB" +[[rapyd.debit]] + payment_method_type = "DinersClub" +[[rapyd.debit]] + payment_method_type = "Discover" +[[rapyd.debit]] + payment_method_type = "CartesBancaires" +[[rapyd.debit]] + payment_method_type = "UnionPay" +[[rapyd.wallet]] + payment_method_type = "apple_pay" [rapyd.connector_auth.BodyKey] api_key="Access Key" key1="API Secret" @@ -389,33 +1275,131 @@ merchant_capabilities=["supports3DS"] label="apple" [shift4] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -bank_redirect=["ideal","giropay","sofort","eps"] +[[shift4.credit]] + payment_method_type = "Mastercard" +[[shift4.credit]] + payment_method_type = "Visa" +[[shift4.credit]] + payment_method_type = "Interac" +[[shift4.credit]] + payment_method_type = "AmericanExpress" +[[shift4.credit]] + payment_method_type = "JCB" +[[shift4.credit]] + payment_method_type = "DinersClub" +[[shift4.credit]] + payment_method_type = "Discover" +[[shift4.credit]] + payment_method_type = "CartesBancaires" +[[shift4.credit]] + payment_method_type = "UnionPay" +[[shift4.debit]] + payment_method_type = "Mastercard" +[[shift4.debit]] + payment_method_type = "Visa" +[[shift4.debit]] + payment_method_type = "Interac" +[[shift4.debit]] + payment_method_type = "AmericanExpress" +[[shift4.debit]] + payment_method_type = "JCB" +[[shift4.debit]] + payment_method_type = "DinersClub" +[[shift4.debit]] + payment_method_type = "Discover" +[[shift4.debit]] + payment_method_type = "CartesBancaires" +[[shift4.debit]] + payment_method_type = "UnionPay" +[[shift4.bank_redirect]] + payment_method_type = "ideal" +[[shift4.bank_redirect]] + payment_method_type = "giropay" +[[shift4.bank_redirect]] + payment_method_type = "sofort" +[[shift4.bank_redirect]] + payment_method_type = "eps" [shift4.connector_auth.HeaderKey] api_key="API Key" [shift4.connector_webhook_details] merchant_secret="Source verification key" [stripe] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -pay_later=["klarna","affirm","afterpay_clearpay"] -bank_redirect=["ideal","giropay","sofort","eps"] -bank_debit=["ach","becs","sepa"] -bank_transfer=["ach","bacs","sepa"] -wallet = ["apple_pay","google_pay"] +[[stripe.credit]] + payment_method_type = "Mastercard" +[[stripe.credit]] + payment_method_type = "Visa" +[[stripe.credit]] + payment_method_type = "Interac" +[[stripe.credit]] + payment_method_type = "AmericanExpress" +[[stripe.credit]] + payment_method_type = "JCB" +[[stripe.credit]] + payment_method_type = "DinersClub" +[[stripe.credit]] + payment_method_type = "Discover" +[[stripe.credit]] + payment_method_type = "CartesBancaires" +[[stripe.credit]] + payment_method_type = "UnionPay" +[[stripe.debit]] + payment_method_type = "Mastercard" +[[stripe.debit]] + payment_method_type = "Visa" +[[stripe.debit]] + payment_method_type = "Interac" +[[stripe.debit]] + payment_method_type = "AmericanExpress" +[[stripe.debit]] + payment_method_type = "JCB" +[[stripe.debit]] + payment_method_type = "DinersClub" +[[stripe.debit]] + payment_method_type = "Discover" +[[stripe.debit]] + payment_method_type = "CartesBancaires" +[[stripe.debit]] + payment_method_type = "UnionPay" +[[stripe.pay_later]] + payment_method_type = "klarna" +[[stripe.pay_later]] + payment_method_type = "affirm" +[[stripe.pay_later]] + payment_method_type = "afterpay_clearpay" +[[stripe.bank_redirect]] + payment_method_type = "ideal" +[[stripe.bank_redirect]] + payment_method_type = "giropay" +[[stripe.bank_redirect]] + payment_method_type = "sofort" +[[stripe.bank_redirect]] + payment_method_type = "eps" +[[stripe.bank_debit]] + payment_method_type = "ach" +[[stripe.bank_debit]] + payment_method_type = "becs" +[[stripe.bank_debit]] + payment_method_type = "sepa" +[[stripe.bank_transfer]] + payment_method_type = "ach" +[[stripe.bank_transfer]] + payment_method_type = "bacs" +[[stripe.bank_transfer]] + payment_method_type = "sepa" +[[stripe.wallet]] + payment_method_type = "apple_pay" +[[stripe.wallet]] + payment_method_type = "google_pay" is_verifiable = true [stripe.connector_auth.HeaderKey] api_key="Secret Key" [stripe.connector_webhook_details] merchant_secret="Source verification key" - [stripe.metadata.google_pay] merchant_name="Google Pay Merchant Name" stripe_publishable_key="Stripe Publishable Key" merchant_id="Google Pay Merchant ID" - [stripe.metadata.apple_pay.session_token_data] certificate="Merchant Certificate (Base64 Encoded)" certificate_keys="Merchant PrivateKey (Base64 Encoded)" @@ -428,37 +1412,66 @@ supported_networks=["visa","masterCard","amex","discover"] merchant_capabilities=["supports3DS"] label="apple" -[zen] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -wallet = ["apple_pay","google_pay"] -voucher = ["boleto", "efecty", "pago_efectivo", "red_compra", "red_pagos"] -bank_transfer = ["pix", "pse"] -[zen.connector_auth.HeaderKey] -api_key="API Key" -[zen.connector_webhook_details] -merchant_secret="Source verification key" -[zen.metadata.apple_pay] -terminal_uuid="Terminal UUID" -pay_wall_secret="Pay Wall Secret" -[zen.metadata.google_pay] -terminal_uuid="Terminal UUID" -pay_wall_secret="Pay Wall Secret" [trustpay] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -bank_redirect=["ideal","giropay","sofort","eps", "blik"] -wallet = ["apple_pay","google_pay"] +[[trustpay.credit]] + payment_method_type = "Mastercard" +[[trustpay.credit]] + payment_method_type = "Visa" +[[trustpay.credit]] + payment_method_type = "Interac" +[[trustpay.credit]] + payment_method_type = "AmericanExpress" +[[trustpay.credit]] + payment_method_type = "JCB" +[[trustpay.credit]] + payment_method_type = "DinersClub" +[[trustpay.credit]] + payment_method_type = "Discover" +[[trustpay.credit]] + payment_method_type = "CartesBancaires" +[[trustpay.credit]] + payment_method_type = "UnionPay" +[[trustpay.debit]] + payment_method_type = "Mastercard" +[[trustpay.debit]] + payment_method_type = "Visa" +[[trustpay.debit]] + payment_method_type = "Interac" +[[trustpay.debit]] + payment_method_type = "AmericanExpress" +[[trustpay.debit]] + payment_method_type = "JCB" +[[trustpay.debit]] + payment_method_type = "DinersClub" +[[trustpay.debit]] + payment_method_type = "Discover" +[[trustpay.debit]] + payment_method_type = "CartesBancaires" +[[trustpay.debit]] + payment_method_type = "UnionPay" +[[trustpay.bank_redirect]] + payment_method_type = "ideal" +[[trustpay.bank_redirect]] + payment_method_type = "giropay" +[[trustpay.bank_redirect]] + payment_method_type = "sofort" +[[trustpay.bank_redirect]] + payment_method_type = "eps" +[[trustpay.bank_redirect]] + payment_method_type = "blik" +[[trustpay.wallet]] + payment_method_type = "apple_pay" +[[trustpay.wallet]] + payment_method_type = "google_pay" [trustpay.connector_auth.SignatureKey] api_key="API Key" key1="Project ID" api_secret="Secret Key" [trustpay.connector_webhook_details] merchant_secret="Source verification key" - [trustpay.metadata.apple_pay.session_token_data] certificate="Merchant Certificate (Base64 Encoded)" certificate_keys="Merchant PrivateKey (Base64 Encoded)" @@ -472,9 +1485,46 @@ merchant_capabilities=["supports3DS"] label="apple" [worldline] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -bank_redirect=["ideal","giropay"] +[[worldline.credit]] + payment_method_type = "Mastercard" +[[worldline.credit]] + payment_method_type = "Visa" +[[worldline.credit]] + payment_method_type = "Interac" +[[worldline.credit]] + payment_method_type = "AmericanExpress" +[[worldline.credit]] + payment_method_type = "JCB" +[[worldline.credit]] + payment_method_type = "DinersClub" +[[worldline.credit]] + payment_method_type = "Discover" +[[worldline.credit]] + payment_method_type = "CartesBancaires" +[[worldline.credit]] + payment_method_type = "UnionPay" +[[worldline.debit]] + payment_method_type = "Mastercard" +[[worldline.debit]] + payment_method_type = "Visa" +[[worldline.debit]] + payment_method_type = "Interac" +[[worldline.debit]] + payment_method_type = "AmericanExpress" +[[worldline.debit]] + payment_method_type = "JCB" +[[worldline.debit]] + payment_method_type = "DinersClub" +[[worldline.debit]] + payment_method_type = "Discover" +[[worldline.debit]] + payment_method_type = "CartesBancaires" +[[worldline.debit]] + payment_method_type = "UnionPay" +[[worldline.bank_redirect]] + payment_method_type = "ideal" +[[worldline.bank_redirect]] + payment_method_type = "giropay" [worldline.connector_auth.SignatureKey] api_key="API Key ID" key1="Merchant ID" @@ -483,18 +1533,53 @@ api_secret="Secret API Key" merchant_secret="Source verification key" [worldpay] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -wallet = ["google_pay","apple_pay"] +[[worldpay.credit]] + payment_method_type = "Mastercard" +[[worldpay.credit]] + payment_method_type = "Visa" +[[worldpay.credit]] + payment_method_type = "Interac" +[[worldpay.credit]] + payment_method_type = "AmericanExpress" +[[worldpay.credit]] + payment_method_type = "JCB" +[[worldpay.credit]] + payment_method_type = "DinersClub" +[[worldpay.credit]] + payment_method_type = "Discover" +[[worldpay.credit]] + payment_method_type = "CartesBancaires" +[[worldpay.credit]] + payment_method_type = "UnionPay" +[[worldpay.debit]] + payment_method_type = "Mastercard" +[[worldpay.debit]] + payment_method_type = "Visa" +[[worldpay.debit]] + payment_method_type = "Interac" +[[worldpay.debit]] + payment_method_type = "AmericanExpress" +[[worldpay.debit]] + payment_method_type = "JCB" +[[worldpay.debit]] + payment_method_type = "DinersClub" +[[worldpay.debit]] + payment_method_type = "Discover" +[[worldpay.debit]] + payment_method_type = "CartesBancaires" +[[worldpay.debit]] + payment_method_type = "UnionPay" +[[worldpay.wallet]] + payment_method_type = "google_pay" +[[worldpay.wallet]] + payment_method_type = "apple_pay" [worldpay.connector_auth.BodyKey] api_key="Username" key1="Password" - [worldpay.metadata.google_pay] merchant_name="Google Pay Merchant Name" gateway_merchant_id="Google Pay Merchant Key" merchant_id="Google Pay Merchant ID" - [worldpay.metadata.apple_pay.session_token_data] certificate="Merchant Certificate (Base64 Encoded)" certificate_keys="Merchant PrivateKey (Base64 Encoded)" @@ -509,13 +1594,45 @@ label="apple" [worldpay.connector_webhook_details] merchant_secret="Source verification key" -[dummy_connector] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] + [payme] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] +[[payme.credit]] + payment_method_type = "Mastercard" +[[payme.credit]] + payment_method_type = "Visa" +[[payme.credit]] + payment_method_type = "Interac" +[[payme.credit]] + payment_method_type = "AmericanExpress" +[[payme.credit]] + payment_method_type = "JCB" +[[payme.credit]] + payment_method_type = "DinersClub" +[[payme.credit]] + payment_method_type = "Discover" +[[payme.credit]] + payment_method_type = "CartesBancaires" +[[payme.credit]] + payment_method_type = "UnionPay" +[[payme.debit]] + payment_method_type = "Mastercard" +[[payme.debit]] + payment_method_type = "Visa" +[[payme.debit]] + payment_method_type = "Interac" +[[payme.debit]] + payment_method_type = "AmericanExpress" +[[payme.debit]] + payment_method_type = "JCB" +[[payme.debit]] + payment_method_type = "DinersClub" +[[payme.debit]] + payment_method_type = "Discover" +[[payme.debit]] + payment_method_type = "CartesBancaires" +[[payme.debit]] + payment_method_type = "UnionPay" [payme.connector_auth.BodyKey] api_key="Seller Payme Id" key1="Payme Public Key" @@ -524,25 +1641,87 @@ merchant_secret="Payme Client Secret" additional_secret="Payme Client Key" [powertranz] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] +[[powertranz.credit]] + payment_method_type = "Mastercard" +[[powertranz.credit]] + payment_method_type = "Visa" +[[powertranz.credit]] + payment_method_type = "Interac" +[[powertranz.credit]] + payment_method_type = "AmericanExpress" +[[powertranz.credit]] + payment_method_type = "JCB" +[[powertranz.credit]] + payment_method_type = "DinersClub" +[[powertranz.credit]] + payment_method_type = "Discover" +[[powertranz.credit]] + payment_method_type = "CartesBancaires" +[[powertranz.credit]] + payment_method_type = "UnionPay" +[[powertranz.debit]] + payment_method_type = "Mastercard" +[[powertranz.debit]] + payment_method_type = "Visa" +[[powertranz.debit]] + payment_method_type = "Interac" +[[powertranz.debit]] + payment_method_type = "AmericanExpress" +[[powertranz.debit]] + payment_method_type = "JCB" +[[powertranz.debit]] + payment_method_type = "DinersClub" +[[powertranz.debit]] + payment_method_type = "Discover" +[[powertranz.debit]] + payment_method_type = "CartesBancaires" +[[powertranz.debit]] + payment_method_type = "UnionPay" [powertranz.connector_auth.BodyKey] key1 = "PowerTranz Id" api_key="PowerTranz Password" [powertranz.connector_webhook_details] merchant_secret="Source verification key" -[globepay] -wallet = ["we_chat_pay","ali_pay"] -[globepay.connector_auth.BodyKey] -api_key="Partner Code" -key1="Credential Code" -[globepay.connector_webhook_details] -merchant_secret="Source verification key" + [tsys] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] +[[tsys.credit]] + payment_method_type = "Mastercard" +[[tsys.credit]] + payment_method_type = "Visa" +[[tsys.credit]] + payment_method_type = "Interac" +[[tsys.credit]] + payment_method_type = "AmericanExpress" +[[tsys.credit]] + payment_method_type = "JCB" +[[tsys.credit]] + payment_method_type = "DinersClub" +[[tsys.credit]] + payment_method_type = "Discover" +[[tsys.credit]] + payment_method_type = "CartesBancaires" +[[tsys.credit]] + payment_method_type = "UnionPay" +[[tsys.debit]] + payment_method_type = "Mastercard" +[[tsys.debit]] + payment_method_type = "Visa" +[[tsys.debit]] + payment_method_type = "Interac" +[[tsys.debit]] + payment_method_type = "AmericanExpress" +[[tsys.debit]] + payment_method_type = "JCB" +[[tsys.debit]] + payment_method_type = "DinersClub" +[[tsys.debit]] + payment_method_type = "Discover" +[[tsys.debit]] + payment_method_type = "CartesBancaires" +[[tsys.debit]] + payment_method_type = "UnionPay" [tsys.connector_auth.SignatureKey] api_key="Device Id" key1="Transaction Key" @@ -550,65 +1729,68 @@ api_secret="Developer Id" [tsys.connector_webhook_details] merchant_secret="Source verification key" -[cashtocode] -reward = ["classic", "evoucher"] -[cashtocode.connector_auth.CurrencyAuthKey.auth_key_map.EUR] -password_classic="Password Classic" -username_classic="Username Classic" -merchant_id_classic="MerchantId Classic" -password_evoucher="Password Evoucher" -username_evoucher="Username Evoucher" -merchant_id_evoucher="MerchantId Evoucher" -[cashtocode.connector_auth.CurrencyAuthKey.auth_key_map.GBP] -password_classic="Password Classic" -username_classic="Username Classic" -merchant_id_classic="MerchantId Classic" -password_evoucher="Password Evoucher" -username_evoucher="Username Evoucher" -merchant_id_evoucher="MerchantId Evoucher" -[cashtocode.connector_auth.CurrencyAuthKey.auth_key_map.USD] -password_classic="Password Classic" -username_classic="Username Classic" -merchant_id_classic="MerchantId Classic" -password_evoucher="Password Evoucher" -username_evoucher="Username Evoucher" -merchant_id_evoucher="MerchantId Evoucher" -[cashtocode.connector_webhook_details] -merchant_secret="Source verification key" - -[cryptopay] -crypto = ["crypto_currency"] -[cryptopay.connector_auth.BodyKey] +[zen] +[[zen.credit]] + payment_method_type = "Mastercard" +[[zen.credit]] + payment_method_type = "Visa" +[[zen.credit]] + payment_method_type = "Interac" +[[zen.credit]] + payment_method_type = "AmericanExpress" +[[zen.credit]] + payment_method_type = "JCB" +[[zen.credit]] + payment_method_type = "DinersClub" +[[zen.credit]] + payment_method_type = "Discover" +[[zen.credit]] + payment_method_type = "CartesBancaires" +[[zen.credit]] + payment_method_type = "UnionPay" +[[zen.debit]] + payment_method_type = "Mastercard" +[[zen.debit]] + payment_method_type = "Visa" +[[zen.debit]] + payment_method_type = "Interac" +[[zen.debit]] + payment_method_type = "AmericanExpress" +[[zen.debit]] + payment_method_type = "JCB" +[[zen.debit]] + payment_method_type = "DinersClub" +[[zen.debit]] + payment_method_type = "Discover" +[[zen.debit]] + payment_method_type = "CartesBancaires" +[[zen.debit]] + payment_method_type = "UnionPay" +[[zen.wallet]] + payment_method_type = "apple_pay" +[[zen.wallet]] + payment_method_type = "google_pay" +[[zen.voucher]] + payment_method_type = "boleto" +[[zen.voucher]] + payment_method_type = "efecty" +[[zen.voucher]] + payment_method_type = "pago_efectivo" +[[zen.voucher]] + payment_method_type = "red_compra" +[[zen.voucher]] + payment_method_type = "red_pagos" +[[zen.bank_transfer]] + payment_method_type = "pix" +[[zen.bank_transfer]] + payment_method_type = "pse" +[zen.connector_auth.HeaderKey] api_key="API Key" -key1="Secret Key" -[cryptopay.connector_webhook_details] -merchant_secret="Source verification key" - -[bankofamerica] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -wallet = ["apple_pay","google_pay"] - -[bankofamerica.connector_auth.SignatureKey] -api_key="Key" -key1="Merchant ID" -api_secret="Shared Secret" -[bankofamerica.connector_webhook_details] +[zen.connector_webhook_details] merchant_secret="Source verification key" - -[bankofamerica.metadata.apple_pay.session_token_data] -certificate="Merchant Certificate (Base64 Encoded)" -certificate_keys="Merchant PrivateKey (Base64 Encoded)" -merchant_identifier="Apple Merchant Identifier" -display_name="Display Name" -initiative="Domain" -initiative_context="Domain Name" -[bankofamerica.metadata.apple_pay.payment_request_data] -supported_networks=["visa","masterCard","amex","discover"] -merchant_capabilities=["supports3DS"] -label="apple" - -[bankofamerica.metadata.google_pay] -merchant_name="Google Pay Merchant Name" -gateway_merchant_id="Google Pay Merchant Key" -merchant_id="Google Pay Merchant ID" \ No newline at end of file +[zen.metadata.apple_pay] +terminal_uuid="Terminal UUID" +pay_wall_secret="Pay Wall Secret" +[zen.metadata.google_pay] +terminal_uuid="Terminal UUID" +pay_wall_secret="Pay Wall Secret" \ No newline at end of file diff --git a/crates/connector_configs/toml/sandbox.toml b/crates/connector_configs/toml/sandbox.toml index 44a8806f0fee..c41ad7793e8e 100644 --- a/crates/connector_configs/toml/sandbox.toml +++ b/crates/connector_configs/toml/sandbox.toml @@ -1,33 +1,235 @@ - [aci] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -wallet = ["ali_pay","mb_way"] -bank_redirect=["ideal","giropay","sofort","eps","przelewy24","trustly","interac"] +[[aci.credit]] + payment_method_type = "Mastercard" +[[aci.credit]] + payment_method_type = "Visa" +[[aci.credit]] + payment_method_type = "Interac" +[[aci.credit]] + payment_method_type = "AmericanExpress" +[[aci.credit]] + payment_method_type = "JCB" +[[aci.credit]] + payment_method_type = "DinersClub" +[[aci.credit]] + payment_method_type = "Discover" +[[aci.credit]] + payment_method_type = "CartesBancaires" +[[aci.credit]] + payment_method_type = "UnionPay" +[[aci.debit]] + payment_method_type = "Mastercard" +[[aci.debit]] + payment_method_type = "Visa" +[[aci.debit]] + payment_method_type = "Interac" +[[aci.debit]] + payment_method_type = "AmericanExpress" +[[aci.debit]] + payment_method_type = "JCB" +[[aci.debit]] + payment_method_type = "DinersClub" +[[aci.debit]] + payment_method_type = "Discover" +[[aci.debit]] + payment_method_type = "CartesBancaires" +[[aci.debit]] + payment_method_type = "UnionPay" +[[aci.wallet]] + payment_method_type = "ali_pay" +[[aci.wallet]] + payment_method_type = "mb_way" +[[aci.bank_redirect]] + payment_method_type = "ideal" +[[aci.bank_redirect]] + payment_method_type = "giropay" +[[aci.bank_redirect]] + payment_method_type = "sofort" +[[aci.bank_redirect]] + payment_method_type = "eps" +[[aci.bank_redirect]] + payment_method_type = "przelewy24" +[[aci.bank_redirect]] + payment_method_type = "trustly" +[[aci.bank_redirect]] + payment_method_type = "interac" [aci.connector_auth.BodyKey] api_key="API Key" key1="Entity ID" [aci.connector_webhook_details] merchant_secret="Source verification key" -[adyen] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -pay_later=["klarna","affirm","afterpay_clearpay","pay_bright","walley", "alma", "atome"] -bank_debit=["ach","bacs","sepa"] -bank_redirect=["ideal","giropay","sofort","eps","blik","przelewy24","trustly","online_banking_czech_republic","online_banking_finland","online_banking_poland","online_banking_slovakia","bancontact_card", "online_banking_fpx", "online_banking_thailand", "bizum", "open_banking_uk"] -wallet = ["apple_pay","google_pay","paypal","we_chat_pay","ali_pay","mb_way", "ali_pay_hk", "go_pay", "kakao_pay", "twint", "gcash", "vipps", "momo", "dana", "swish", "touch_n_go"] -bank_transfer = ["permata_bank_transfer", "bca_bank_transfer", "bni_va", "bri_va", "cimb_va", "danamon_va", "mandiri_va"] -voucher = ["boleto", "alfamart", "indomaret", "oxxo", "seven_eleven", "lawson", "mini_stop", "family_mart", "seicomart", "pay_easy"] -gift_card = ["pay_safe_card", "givex"] -card_redirect = ["benefit", "knet", "momo_atm"] +[adyen] +[[adyen.credit]] + payment_method_type = "Mastercard" +[[adyen.credit]] + payment_method_type = "Visa" +[[adyen.credit]] + payment_method_type = "Interac" +[[adyen.credit]] + payment_method_type = "AmericanExpress" +[[adyen.credit]] + payment_method_type = "JCB" +[[adyen.credit]] + payment_method_type = "DinersClub" +[[adyen.credit]] + payment_method_type = "Discover" +[[adyen.credit]] + payment_method_type = "CartesBancaires" +[[adyen.credit]] + payment_method_type = "UnionPay" +[[adyen.debit]] + payment_method_type = "Mastercard" +[[adyen.debit]] + payment_method_type = "Visa" +[[adyen.debit]] + payment_method_type = "Interac" +[[adyen.debit]] + payment_method_type = "AmericanExpress" +[[adyen.debit]] + payment_method_type = "JCB" +[[adyen.debit]] + payment_method_type = "DinersClub" +[[adyen.debit]] + payment_method_type = "Discover" +[[adyen.debit]] + payment_method_type = "CartesBancaires" +[[adyen.debit]] + payment_method_type = "UnionPay" +[[adyen.pay_later]] + payment_method_type = "klarna" +[[adyen.pay_later]] + payment_method_type = "affirm" +[[adyen.pay_later]] + payment_method_type = "afterpay_clearpay" +[[adyen.pay_later]] + payment_method_type = "pay_bright" +[[adyen.pay_later]] + payment_method_type = "walley" +[[adyen.pay_later]] + payment_method_type = "alma" +[[adyen.pay_later]] + payment_method_type = "atome" +[[adyen.bank_debit]] + payment_method_type = "ach" +[[adyen.bank_debit]] + payment_method_type = "bacs" +[[adyen.bank_debit]] + payment_method_type = "sepa" +[[adyen.bank_redirect]] + payment_method_type = "ideal" +[[adyen.bank_redirect]] + payment_method_type = "giropay" +[[adyen.bank_redirect]] + payment_method_type = "sofort" +[[adyen.bank_redirect]] + payment_method_type = "eps" +[[adyen.bank_redirect]] + payment_method_type = "blik" +[[adyen.bank_redirect]] + payment_method_type = "przelewy24" +[[adyen.bank_redirect]] + payment_method_type = "trustly" +[[adyen.bank_redirect]] + payment_method_type = "online_banking_czech_republic" +[[adyen.bank_redirect]] + payment_method_type = "online_banking_finland" +[[adyen.bank_redirect]] + payment_method_type = "online_banking_poland" +[[adyen.bank_redirect]] + payment_method_type = "online_banking_slovakia" +[[adyen.bank_redirect]] + payment_method_type = "bancontact_card" +[[adyen.bank_redirect]] + payment_method_type = "online_banking_fpx" +[[adyen.bank_redirect]] + payment_method_type = "online_banking_thailand" +[[adyen.bank_redirect]] + payment_method_type = "bizum" +[[adyen.bank_redirect]] + payment_method_type = "open_banking_uk" +[[adyen.bank_transfer]] + payment_method_type = "permata_bank_transfer" +[[adyen.bank_transfer]] + payment_method_type = "bca_bank_transfer" +[[adyen.bank_transfer]] + payment_method_type = "bni_va" +[[adyen.bank_transfer]] + payment_method_type = "bri_va" +[[adyen.bank_transfer]] + payment_method_type = "cimb_va" +[[adyen.bank_transfer]] + payment_method_type = "danamon_va" +[[adyen.bank_transfer]] + payment_method_type = "mandiri_va" +[[adyen.wallet]] + payment_method_type = "apple_pay" +[[adyen.wallet]] + payment_method_type = "google_pay" +[[adyen.wallet]] + payment_method_type = "paypal" +[[adyen.wallet]] + payment_method_type = "we_chat_pay" +[[adyen.wallet]] + payment_method_type = "ali_pay" +[[adyen.wallet]] + payment_method_type = "mb_way" +[[adyen.wallet]] + payment_method_type = "ali_pay_hk" +[[adyen.wallet]] + payment_method_type = "go_pay" +[[adyen.wallet]] + payment_method_type = "kakao_pay" +[[adyen.wallet]] + payment_method_type = "twint" +[[adyen.wallet]] + payment_method_type = "gcash" +[[adyen.wallet]] + payment_method_type = "vipps" +[[adyen.wallet]] + payment_method_type = "dana" +[[adyen.wallet]] + payment_method_type = "momo" +[[adyen.wallet]] + payment_method_type = "swish" +[[adyen.wallet]] + payment_method_type = "touch_n_go" +[[adyen.voucher]] + payment_method_type = "boleto" +[[adyen.voucher]] + payment_method_type = "alfamart" +[[adyen.voucher]] + payment_method_type = "indomaret" +[[adyen.voucher]] + payment_method_type = "oxxo" +[[adyen.voucher]] + payment_method_type = "seven_eleven" +[[adyen.voucher]] + payment_method_type = "lawson" +[[adyen.voucher]] + payment_method_type = "mini_stop" +[[adyen.voucher]] + payment_method_type = "family_mart" +[[adyen.voucher]] + payment_method_type = "seicomart" +[[adyen.voucher]] + payment_method_type = "pay_easy" +[[adyen.gift_card]] + payment_method_type = "pay_safe_card" +[[adyen.gift_card]] + payment_method_type = "givex" +[[adyen.card_redirect]] + payment_method_type = "benefit" +[[adyen.card_redirect]] + payment_method_type = "knet" +[[adyen.card_redirect]] + payment_method_type = "momo_atm" [adyen.connector_auth.BodyKey] api_key="Adyen API Key" key1="Adyen Account Id" [adyen.connector_webhook_details] merchant_secret="Source verification key" - [adyen.metadata.google_pay] merchant_name="Google Pay Merchant Name" gateway_merchant_id="Google Pay Merchant Key" @@ -45,24 +247,93 @@ supported_networks=["visa","masterCard","amex","discover"] merchant_capabilities=["supports3DS"] label="apple" - - [airwallex] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -wallet = ["google_pay"] -body_type="BodyKey" +[[airwallex.credit]] + payment_method_type = "Mastercard" +[[airwallex.credit]] + payment_method_type = "Visa" +[[airwallex.credit]] + payment_method_type = "Interac" +[[airwallex.credit]] + payment_method_type = "AmericanExpress" +[[airwallex.credit]] + payment_method_type = "JCB" +[[airwallex.credit]] + payment_method_type = "DinersClub" +[[airwallex.credit]] + payment_method_type = "Discover" +[[airwallex.credit]] + payment_method_type = "CartesBancaires" +[[airwallex.credit]] + payment_method_type = "UnionPay" +[[airwallex.debit]] + payment_method_type = "Mastercard" +[[airwallex.debit]] + payment_method_type = "Visa" +[[airwallex.debit]] + payment_method_type = "Interac" +[[airwallex.debit]] + payment_method_type = "AmericanExpress" +[[airwallex.debit]] + payment_method_type = "JCB" +[[airwallex.debit]] + payment_method_type = "DinersClub" +[[airwallex.debit]] + payment_method_type = "Discover" +[[airwallex.debit]] + payment_method_type = "CartesBancaires" +[[airwallex.debit]] + payment_method_type = "UnionPay" +[[airwallex.wallet]] + payment_method_type = "google_pay" [airwallex.connector_auth.BodyKey] api_key="API Key" key1="Client ID" [airwallex.connector_webhook_details] merchant_secret="Source verification key" + [authorizedotnet] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -wallet = ["google_pay","paypal"] -body_type="BodyKey" +[[authorizedotnet.credit]] + payment_method_type = "Mastercard" +[[authorizedotnet.credit]] + payment_method_type = "Visa" +[[authorizedotnet.credit]] + payment_method_type = "Interac" +[[authorizedotnet.credit]] + payment_method_type = "AmericanExpress" +[[authorizedotnet.credit]] + payment_method_type = "JCB" +[[authorizedotnet.credit]] + payment_method_type = "DinersClub" +[[authorizedotnet.credit]] + payment_method_type = "Discover" +[[authorizedotnet.credit]] + payment_method_type = "CartesBancaires" +[[authorizedotnet.credit]] + payment_method_type = "UnionPay" +[[authorizedotnet.debit]] + payment_method_type = "Mastercard" +[[authorizedotnet.debit]] + payment_method_type = "Visa" +[[authorizedotnet.debit]] + payment_method_type = "Interac" +[[authorizedotnet.debit]] + payment_method_type = "AmericanExpress" +[[authorizedotnet.debit]] + payment_method_type = "JCB" +[[authorizedotnet.debit]] + payment_method_type = "DinersClub" +[[authorizedotnet.debit]] + payment_method_type = "Discover" +[[authorizedotnet.debit]] + payment_method_type = "CartesBancaires" +[[authorizedotnet.debit]] + payment_method_type = "UnionPay" +[[authorizedotnet.wallet]] + payment_method_type = "google_pay" +[[authorizedotnet.wallet]] + payment_method_type = "paypal" [authorizedotnet.connector_auth.BodyKey] api_key="API Login ID" key1="Transaction Key" @@ -73,17 +344,178 @@ merchant_id="Google Pay Merchant ID" [authorizedotnet.connector_webhook_details] merchant_secret="Source verification key" +[bambora] +[[bambora.credit]] + payment_method_type = "Mastercard" +[[bambora.credit]] + payment_method_type = "Visa" +[[bambora.credit]] + payment_method_type = "Interac" +[[bambora.credit]] + payment_method_type = "AmericanExpress" +[[bambora.credit]] + payment_method_type = "JCB" +[[bambora.credit]] + payment_method_type = "DinersClub" +[[bambora.credit]] + payment_method_type = "Discover" +[[bambora.credit]] + payment_method_type = "CartesBancaires" +[[bambora.credit]] + payment_method_type = "UnionPay" +[[bambora.debit]] + payment_method_type = "Mastercard" +[[bambora.debit]] + payment_method_type = "Visa" +[[bambora.debit]] + payment_method_type = "Interac" +[[bambora.debit]] + payment_method_type = "AmericanExpress" +[[bambora.debit]] + payment_method_type = "JCB" +[[bambora.debit]] + payment_method_type = "DinersClub" +[[bambora.debit]] + payment_method_type = "Discover" +[[bambora.debit]] + payment_method_type = "CartesBancaires" +[[bambora.debit]] + payment_method_type = "UnionPay" +[[bambora.wallet]] + payment_method_type = "apple_pay" +[[bambora.wallet]] + payment_method_type = "paypal" +[bambora.connector_auth.BodyKey] +api_key="Passcode" +key1="Merchant Id" +[bambora.connector_webhook_details] +merchant_secret="Source verification key" +[bambora.metadata.apple_pay.session_token_data] +certificate="Merchant Certificate (Base64 Encoded)" +certificate_keys="Merchant PrivateKey (Base64 Encoded)" +merchant_identifier="Apple Merchant Identifier" +display_name="Display Name" +initiative="Domain" +initiative_context="Domain Name" +[bambora.metadata.apple_pay.payment_request_data] +supported_networks=["visa","masterCard","amex","discover"] +merchant_capabilities=["supports3DS"] +label="apple" + +[bankofamerica] +[[bankofamerica.credit]] + payment_method_type = "Mastercard" +[[bankofamerica.credit]] + payment_method_type = "Visa" +[[bankofamerica.credit]] + payment_method_type = "Interac" +[[bankofamerica.credit]] + payment_method_type = "AmericanExpress" +[[bankofamerica.credit]] + payment_method_type = "JCB" +[[bankofamerica.credit]] + payment_method_type = "DinersClub" +[[bankofamerica.credit]] + payment_method_type = "Discover" +[[bankofamerica.credit]] + payment_method_type = "CartesBancaires" +[[bankofamerica.credit]] + payment_method_type = "UnionPay" +[[bankofamerica.debit]] + payment_method_type = "Mastercard" +[[bankofamerica.debit]] + payment_method_type = "Visa" +[[bankofamerica.debit]] + payment_method_type = "Interac" +[[bankofamerica.debit]] + payment_method_type = "AmericanExpress" +[[bankofamerica.debit]] + payment_method_type = "JCB" +[[bankofamerica.debit]] + payment_method_type = "DinersClub" +[[bankofamerica.debit]] + payment_method_type = "Discover" +[[bankofamerica.debit]] + payment_method_type = "CartesBancaires" +[[bankofamerica.debit]] + payment_method_type = "UnionPay" +[[bankofamerica.wallet]] + payment_method_type = "apple_pay" +[[bankofamerica.wallet]] + payment_method_type = "google_pay" +[bankofamerica.connector_auth.SignatureKey] +api_key="Key" +key1="Merchant ID" +api_secret="Shared Secret" +[bankofamerica.connector_webhook_details] +merchant_secret="Source verification key" + +[bankofamerica.metadata.apple_pay.session_token_data] +certificate="Merchant Certificate (Base64 Encoded)" +certificate_keys="Merchant PrivateKey (Base64 Encoded)" +merchant_identifier="Apple Merchant Identifier" +display_name="Display Name" +initiative="Domain" +initiative_context="Domain Name" +[bankofamerica.metadata.apple_pay.payment_request_data] +supported_networks=["visa","masterCard","amex","discover"] +merchant_capabilities=["supports3DS"] +label="apple" + +[bankofamerica.metadata.google_pay] +merchant_name="Google Pay Merchant Name" +gateway_merchant_id="Google Pay Merchant Key" +merchant_id="Google Pay Merchant ID" + [bitpay] -crypto = ["crypto_currency"] +[[bitpay.crypto]] + payment_method_type = "crypto_currency" [bitpay.connector_auth.HeaderKey] api_key="API Key" [bitpay.connector_webhook_details] merchant_secret="Source verification key" [bluesnap] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -wallet = ["google_pay","apple_pay"] +[[bluesnap.credit]] + payment_method_type = "Mastercard" +[[bluesnap.credit]] + payment_method_type = "Visa" +[[bluesnap.credit]] + payment_method_type = "Interac" +[[bluesnap.credit]] + payment_method_type = "AmericanExpress" +[[bluesnap.credit]] + payment_method_type = "JCB" +[[bluesnap.credit]] + payment_method_type = "DinersClub" +[[bluesnap.credit]] + payment_method_type = "Discover" +[[bluesnap.credit]] + payment_method_type = "CartesBancaires" +[[bluesnap.credit]] + payment_method_type = "UnionPay" +[[bluesnap.debit]] + payment_method_type = "Mastercard" +[[bluesnap.debit]] + payment_method_type = "Visa" +[[bluesnap.debit]] + payment_method_type = "Interac" +[[bluesnap.debit]] + payment_method_type = "AmericanExpress" +[[bluesnap.debit]] + payment_method_type = "JCB" +[[bluesnap.debit]] + payment_method_type = "DinersClub" +[[bluesnap.debit]] + payment_method_type = "Discover" +[[bluesnap.debit]] + payment_method_type = "CartesBancaires" +[[bluesnap.debit]] + payment_method_type = "UnionPay" +[[bluesnap.wallet]] + payment_method_type = "google_pay" +[[bluesnap.wallet]] + payment_method_type = "apple_pay" [bluesnap.connector_auth.BodyKey] api_key="Password" key1="Username" @@ -109,25 +541,148 @@ label="apple" [bluesnap.metadata] merchant_id="Merchant Id" +[boku] +[[boku.wallet]] + payment_method_type = "dana" +[[boku.wallet]] + payment_method_type = "gcash" +[[boku.wallet]] + payment_method_type = "go_pay" +[[boku.wallet]] + payment_method_type = "kakao_pay" +[[boku.wallet]] + payment_method_type = "momo" +[boku.connector_auth.BodyKey] +api_key="API KEY" +key1= "MERCHANT ID" +[boku.connector_webhook_details] +merchant_secret="Source verification key" + [braintree] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] +[[braintree.credit]] + payment_method_type = "Mastercard" +[[braintree.credit]] + payment_method_type = "Visa" +[[braintree.credit]] + payment_method_type = "Interac" +[[braintree.credit]] + payment_method_type = "AmericanExpress" +[[braintree.credit]] + payment_method_type = "JCB" +[[braintree.credit]] + payment_method_type = "DinersClub" +[[braintree.credit]] + payment_method_type = "Discover" +[[braintree.credit]] + payment_method_type = "CartesBancaires" +[[braintree.credit]] + payment_method_type = "UnionPay" +[[braintree.debit]] + payment_method_type = "Mastercard" +[[braintree.debit]] + payment_method_type = "Visa" +[[braintree.debit]] + payment_method_type = "Interac" +[[braintree.debit]] + payment_method_type = "AmericanExpress" +[[braintree.debit]] + payment_method_type = "JCB" +[[braintree.debit]] + payment_method_type = "DinersClub" +[[braintree.debit]] + payment_method_type = "Discover" +[[braintree.debit]] + payment_method_type = "CartesBancaires" +[[braintree.debit]] + payment_method_type = "UnionPay" +[[braintree.debit]] + payment_method_type = "UnionPay" +[braintree.connector_webhook_details] +merchant_secret="Source verification key" + [braintree.connector_auth.SignatureKey] api_key="Public Key" key1="Merchant Id" api_secret="Private Key" -[braintree.connector_webhook_details] -merchant_secret="Source verification key" [braintree.metadata] merchant_account_id="Merchant Account Id" merchant_config_currency="Currency" +[cashtocode] +[[cashtocode.reward]] + payment_method_type = "classic" +[[cashtocode.reward]] + payment_method_type = "evoucher" +[cashtocode.connector_auth.CurrencyAuthKey.auth_key_map.EUR.classic] +password_classic="Password Classic" +username_classic="Username Classic" +merchant_id_classic="MerchantId Classic" +[cashtocode.connector_auth.CurrencyAuthKey.auth_key_map.EUR.evoucher] +password_evoucher="Password Evoucher" +username_evoucher="Username Evoucher" +merchant_id_evoucher="MerchantId Evoucher" +[cashtocode.connector_auth.CurrencyAuthKey.auth_key_map.GBP.classic] +password_classic="Password Classic" +username_classic="Username Classic" +merchant_id_classic="MerchantId Classic" +[cashtocode.connector_auth.CurrencyAuthKey.auth_key_map.GBP.evoucher] +password_evoucher="Password Evoucher" +username_evoucher="Username Evoucher" +merchant_id_evoucher="MerchantId Evoucher" +[cashtocode.connector_auth.CurrencyAuthKey.auth_key_map.USD.classic] +password_classic="Password Classic" +username_classic="Username Classic" +merchant_id_classic="MerchantId Classic" +[cashtocode.connector_auth.CurrencyAuthKey.auth_key_map.USD.evoucher] +password_evoucher="Password Evoucher" +username_evoucher="Username Evoucher" +merchant_id_evoucher="MerchantId Evoucher" + [checkout] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -wallet = ["apple_pay","google_pay","paypal"] +[[checkout.credit]] + payment_method_type = "Mastercard" +[[checkout.credit]] + payment_method_type = "Visa" +[[checkout.credit]] + payment_method_type = "Interac" +[[checkout.credit]] + payment_method_type = "AmericanExpress" +[[checkout.credit]] + payment_method_type = "JCB" +[[checkout.credit]] + payment_method_type = "DinersClub" +[[checkout.credit]] + payment_method_type = "Discover" +[[checkout.credit]] + payment_method_type = "CartesBancaires" +[[checkout.credit]] + payment_method_type = "UnionPay" +[[checkout.debit]] + payment_method_type = "Mastercard" +[[checkout.debit]] + payment_method_type = "Visa" +[[checkout.debit]] + payment_method_type = "Interac" +[[checkout.debit]] + payment_method_type = "AmericanExpress" +[[checkout.debit]] + payment_method_type = "JCB" +[[checkout.debit]] + payment_method_type = "DinersClub" +[[checkout.debit]] + payment_method_type = "Discover" +[[checkout.debit]] + payment_method_type = "CartesBancaires" +[[checkout.debit]] + payment_method_type = "UnionPay" +[[checkout.wallet]] + payment_method_type = "apple_pay" +[[checkout.wallet]] + payment_method_type = "google_pay" +[[checkout.wallet]] + payment_method_type = "paypal" [checkout.connector_auth.SignatureKey] api_key="Checkout API Public Key" key1="Processing Channel ID" @@ -152,19 +707,64 @@ supported_networks=["visa","masterCard","amex","discover"] merchant_capabilities=["supports3DS"] label="apple" - - [coinbase] -crypto = ["crypto_currency"] +[[coinbase.crypto]] + payment_method_type = "crypto_currency" [coinbase.connector_auth.HeaderKey] api_key="API Key" [coinbase.connector_webhook_details] merchant_secret="Source verification key" +[cryptopay] +[[cryptopay.crypto]] + payment_method_type = "crypto_currency" +[cryptopay.connector_auth.BodyKey] +api_key="API Key" +key1="Secret Key" +[cryptopay.connector_webhook_details] +merchant_secret="Source verification key" + [cybersource] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -wallet = ["apple_pay","google_pay"] +[[cybersource.credit]] + payment_method_type = "Mastercard" +[[cybersource.credit]] + payment_method_type = "Visa" +[[cybersource.credit]] + payment_method_type = "Interac" +[[cybersource.credit]] + payment_method_type = "AmericanExpress" +[[cybersource.credit]] + payment_method_type = "JCB" +[[cybersource.credit]] + payment_method_type = "DinersClub" +[[cybersource.credit]] + payment_method_type = "Discover" +[[cybersource.credit]] + payment_method_type = "CartesBancaires" +[[cybersource.credit]] + payment_method_type = "UnionPay" +[[cybersource.debit]] + payment_method_type = "Mastercard" +[[cybersource.debit]] + payment_method_type = "Visa" +[[cybersource.debit]] + payment_method_type = "Interac" +[[cybersource.debit]] + payment_method_type = "AmericanExpress" +[[cybersource.debit]] + payment_method_type = "JCB" +[[cybersource.debit]] + payment_method_type = "DinersClub" +[[cybersource.debit]] + payment_method_type = "Discover" +[[cybersource.debit]] + payment_method_type = "CartesBancaires" +[[cybersource.debit]] + payment_method_type = "UnionPay" +[[cybersource.wallet]] + payment_method_type = "apple_pay" +[[cybersource.wallet]] + payment_method_type = "google_pay" [cybersource.connector_auth.SignatureKey] api_key="Key" key1="Merchant ID" @@ -189,63 +789,43 @@ merchant_name="Google Pay Merchant Name" gateway_merchant_id="Google Pay Merchant Key" merchant_id="Google Pay Merchant ID" -[helcim] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -[helcim.connector_auth.HeaderKey] -api_key="Api Key" -[helcim.connector_webhook_details] -merchant_secret="Source verification key" - -[iatapay] -upi=["upi_collect"] -[iatapay.connector_auth.SignatureKey] -api_key="Client ID" -key1="Airline ID" -api_secret="Client Secret" -[iatapay.connector_webhook_details] -merchant_secret="Source verification key" - -[opennode] -crypto = ["crypto_currency"] -[opennode.connector_auth.HeaderKey] -api_key="API Key" -[opennode.connector_webhook_details] -merchant_secret="Source verification key" - -[bambora] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -wallet = ["apple_pay","paypal"] -[bambora.connector_auth.BodyKey] -api_key="Passcode" -key1="Merchant Id" -[bambora.connector_webhook_details] -merchant_secret="Source verification key" - -[bambora.metadata.apple_pay.session_token_data] -certificate="Merchant Certificate (Base64 Encoded)" -certificate_keys="Merchant PrivateKey (Base64 Encoded)" -merchant_identifier="Apple Merchant Identifier" -display_name="Display Name" -initiative="Domain" -initiative_context="Domain Name" -[bambora.metadata.apple_pay.payment_request_data] -supported_networks=["visa","masterCard","amex","discover"] -merchant_capabilities=["supports3DS"] -label="apple" - -[boku] -wallet = ["dana","gcash","go_pay","kakao_pay","momo"] -[boku.connector_auth.BodyKey] -api_key="API KEY" -key1= "MERCHANT ID" -[boku.connector_webhook_details] -merchant_secret="Source verification key" - [dlocal] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] +[[dlocal.credit]] + payment_method_type = "Mastercard" +[[dlocal.credit]] + payment_method_type = "Visa" +[[dlocal.credit]] + payment_method_type = "Interac" +[[dlocal.credit]] + payment_method_type = "AmericanExpress" +[[dlocal.credit]] + payment_method_type = "JCB" +[[dlocal.credit]] + payment_method_type = "DinersClub" +[[dlocal.credit]] + payment_method_type = "Discover" +[[dlocal.credit]] + payment_method_type = "CartesBancaires" +[[dlocal.credit]] + payment_method_type = "UnionPay" +[[dlocal.debit]] + payment_method_type = "Mastercard" +[[dlocal.debit]] + payment_method_type = "Visa" +[[dlocal.debit]] + payment_method_type = "Interac" +[[dlocal.debit]] + payment_method_type = "AmericanExpress" +[[dlocal.debit]] + payment_method_type = "JCB" +[[dlocal.debit]] + payment_method_type = "DinersClub" +[[dlocal.debit]] + payment_method_type = "Discover" +[[dlocal.debit]] + payment_method_type = "CartesBancaires" +[[dlocal.debit]] + payment_method_type = "UnionPay" [dlocal.connector_auth.SignatureKey] api_key="X Login" key1="X Trans Key" @@ -254,20 +834,88 @@ api_secret="Secret Key" merchant_secret="Source verification key" [fiserv] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] +[[fiserv.credit]] + payment_method_type = "Mastercard" +[[fiserv.credit]] + payment_method_type = "Visa" +[[fiserv.credit]] + payment_method_type = "Interac" +[[fiserv.credit]] + payment_method_type = "AmericanExpress" +[[fiserv.credit]] + payment_method_type = "JCB" +[[fiserv.credit]] + payment_method_type = "DinersClub" +[[fiserv.credit]] + payment_method_type = "Discover" +[[fiserv.credit]] + payment_method_type = "CartesBancaires" +[[fiserv.credit]] + payment_method_type = "UnionPay" +[[fiserv.debit]] + payment_method_type = "Mastercard" +[[fiserv.debit]] + payment_method_type = "Visa" +[[fiserv.debit]] + payment_method_type = "Interac" +[[fiserv.debit]] + payment_method_type = "AmericanExpress" +[[fiserv.debit]] + payment_method_type = "JCB" +[[fiserv.debit]] + payment_method_type = "DinersClub" +[[fiserv.debit]] + payment_method_type = "Discover" +[[fiserv.debit]] + payment_method_type = "CartesBancaires" +[[fiserv.debit]] + payment_method_type = "UnionPay" [fiserv.connector_auth.SignatureKey] api_key="API Key" key1="Merchant ID" api_secret="API Secret" -[fiserv.connector_webhook_details] -merchant_secret="Source verification key" [fiserv.metadata] terminal_id="Terminal ID" +[fiserv.connector_webhook_details] +merchant_secret="Source verification key" [forte] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] +[[forte.credit]] + payment_method_type = "Mastercard" +[[forte.credit]] + payment_method_type = "Visa" +[[forte.credit]] + payment_method_type = "Interac" +[[forte.credit]] + payment_method_type = "AmericanExpress" +[[forte.credit]] + payment_method_type = "JCB" +[[forte.credit]] + payment_method_type = "DinersClub" +[[forte.credit]] + payment_method_type = "Discover" +[[forte.credit]] + payment_method_type = "CartesBancaires" +[[forte.credit]] + payment_method_type = "UnionPay" +[[forte.debit]] + payment_method_type = "Mastercard" +[[forte.debit]] + payment_method_type = "Visa" +[[forte.debit]] + payment_method_type = "Interac" +[[forte.debit]] + payment_method_type = "AmericanExpress" +[[forte.debit]] + payment_method_type = "JCB" +[[forte.debit]] + payment_method_type = "DinersClub" +[[forte.debit]] + payment_method_type = "Discover" +[[forte.debit]] + payment_method_type = "CartesBancaires" +[[forte.debit]] + payment_method_type = "UnionPay" [forte.connector_auth.MultiAuthKey] api_key="API Access ID" key1="Organization ID" @@ -277,10 +925,54 @@ key2="Location ID" merchant_secret="Source verification key" [globalpay] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -bank_redirect=["ideal","giropay","sofort","eps"] -wallet = ["google_pay","paypal"] +[[globalpay.credit]] + payment_method_type = "Mastercard" +[[globalpay.credit]] + payment_method_type = "Visa" +[[globalpay.credit]] + payment_method_type = "Interac" +[[globalpay.credit]] + payment_method_type = "AmericanExpress" +[[globalpay.credit]] + payment_method_type = "JCB" +[[globalpay.credit]] + payment_method_type = "DinersClub" +[[globalpay.credit]] + payment_method_type = "Discover" +[[globalpay.credit]] + payment_method_type = "CartesBancaires" +[[globalpay.credit]] + payment_method_type = "UnionPay" +[[globalpay.debit]] + payment_method_type = "Mastercard" +[[globalpay.debit]] + payment_method_type = "Visa" +[[globalpay.debit]] + payment_method_type = "Interac" +[[globalpay.debit]] + payment_method_type = "AmericanExpress" +[[globalpay.debit]] + payment_method_type = "JCB" +[[globalpay.debit]] + payment_method_type = "DinersClub" +[[globalpay.debit]] + payment_method_type = "Discover" +[[globalpay.debit]] + payment_method_type = "CartesBancaires" +[[globalpay.debit]] + payment_method_type = "UnionPay" +[[globalpay.bank_redirect]] + payment_method_type = "ideal" +[[globalpay.bank_redirect]] + payment_method_type = "giropay" +[[globalpay.bank_redirect]] + payment_method_type = "sofort" +[[globalpay.bank_redirect]] + payment_method_type = "eps" +[[globalpay.wallet]] + payment_method_type = "google_pay" +[[globalpay.wallet]] + payment_method_type = "paypal" [globalpay.connector_auth.BodyKey] api_key="Global App Key" key1="Global App ID" @@ -288,24 +980,103 @@ key1="Global App ID" account_name="Account Name" [globalpay.connector_webhook_details] merchant_secret="Source verification key" - [globalpay.metadata.google_pay] merchant_name="Google Pay Merchant Name" gateway_merchant_id="Google Pay Merchant Key" merchant_id="Google Pay Merchant ID" +[globepay] +[[globepay.wallet]] + payment_method_type = "we_chat_pay" +[[globepay.wallet]] + payment_method_type = "ali_pay" +[globepay.connector_auth.BodyKey] +api_key="Partner Code" +key1="Credential Code" +[globepay.connector_webhook_details] +merchant_secret="Source verification key" + +[gocardless] +[[gocardless.bank_debit]] + payment_method_type = "ach" +[[gocardless.bank_debit]] + payment_method_type = "becs" +[[gocardless.bank_debit]] + payment_method_type = "sepa" +[gocardless.connector_auth.HeaderKey] +api_key="Access Token" +[gocardless.connector_webhook_details] +merchant_secret="Source verification key" + +[iatapay] +[[iatapay.upi]] + payment_method_type = "upi_collect" +[iatapay.connector_auth.SignatureKey] +api_key="Client ID" +key1="Airline ID" +api_secret="Client Secret" +[iatapay.connector_webhook_details] +merchant_secret="Source verification key" + [klarna] -pay_later=["klarna"] +[[klarna.pay_later]] + payment_method_type = "klarna" [klarna.connector_auth.HeaderKey] api_key="Klarna API Key" [klarna.connector_webhook_details] merchant_secret="Source verification key" [mollie] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -bank_redirect=["ideal","giropay","sofort","eps","przelewy24","bancontact_card"] -wallet = ["paypal"] +[[mollie.credit]] + payment_method_type = "Mastercard" +[[mollie.credit]] + payment_method_type = "Visa" +[[mollie.credit]] + payment_method_type = "Interac" +[[mollie.credit]] + payment_method_type = "AmericanExpress" +[[mollie.credit]] + payment_method_type = "JCB" +[[mollie.credit]] + payment_method_type = "DinersClub" +[[mollie.credit]] + payment_method_type = "Discover" +[[mollie.credit]] + payment_method_type = "CartesBancaires" +[[mollie.credit]] + payment_method_type = "UnionPay" +[[mollie.debit]] + payment_method_type = "Mastercard" +[[mollie.debit]] + payment_method_type = "Visa" +[[mollie.debit]] + payment_method_type = "Interac" +[[mollie.debit]] + payment_method_type = "AmericanExpress" +[[mollie.debit]] + payment_method_type = "JCB" +[[mollie.debit]] + payment_method_type = "DinersClub" +[[mollie.debit]] + payment_method_type = "Discover" +[[mollie.debit]] + payment_method_type = "CartesBancaires" +[[mollie.debit]] + payment_method_type = "UnionPay" +[[mollie.bank_redirect]] + payment_method_type = "ideal" +[[mollie.bank_redirect]] + payment_method_type = "giropay" +[[mollie.bank_redirect]] + payment_method_type = "sofort" +[[mollie.bank_redirect]] + payment_method_type = "eps" +[[mollie.bank_redirect]] + payment_method_type = "przelewy24" +[[mollie.bank_redirect]] + payment_method_type = "bancontact_card" +[[mollie.wallet]] + payment_method_type = "paypal" [mollie.connector_auth.BodyKey] api_key="API Key" key1="Profile Token" @@ -313,30 +1084,109 @@ key1="Profile Token" merchant_secret="Source verification key" [multisafepay] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -wallet = ["google_pay","paypal"] +[[multisafepay.credit]] + payment_method_type = "Mastercard" +[[multisafepay.credit]] + payment_method_type = "Visa" +[[multisafepay.credit]] + payment_method_type = "Interac" +[[multisafepay.credit]] + payment_method_type = "AmericanExpress" +[[multisafepay.credit]] + payment_method_type = "JCB" +[[multisafepay.credit]] + payment_method_type = "DinersClub" +[[multisafepay.credit]] + payment_method_type = "Discover" +[[multisafepay.credit]] + payment_method_type = "CartesBancaires" +[[multisafepay.credit]] + payment_method_type = "UnionPay" +[[multisafepay.debit]] + payment_method_type = "Mastercard" +[[multisafepay.debit]] + payment_method_type = "Visa" +[[multisafepay.debit]] + payment_method_type = "Interac" +[[multisafepay.debit]] + payment_method_type = "AmericanExpress" +[[multisafepay.debit]] + payment_method_type = "JCB" +[[multisafepay.debit]] + payment_method_type = "DinersClub" +[[multisafepay.debit]] + payment_method_type = "Discover" +[[multisafepay.debit]] + payment_method_type = "CartesBancaires" +[[multisafepay.debit]] + payment_method_type = "UnionPay" +[[multisafepay.wallet]] + payment_method_type = "google_pay" +[[multisafepay.wallet]] + payment_method_type = "paypal" [multisafepay.connector_auth.HeaderKey] api_key="Enter API Key" [multisafepay.connector_webhook_details] merchant_secret="Source verification key" - [multisafepay.metadata.google_pay] merchant_name="Google Pay Merchant Name" gateway_merchant_id="Google Pay Merchant Key" merchant_id="Google Pay Merchant ID" [nexinets] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -bank_redirect=["ideal","giropay","sofort","eps"] -wallet = ["apple_pay","paypal"] +[[nexinets.credit]] + payment_method_type = "Mastercard" +[[nexinets.credit]] + payment_method_type = "Visa" +[[nexinets.credit]] + payment_method_type = "Interac" +[[nexinets.credit]] + payment_method_type = "AmericanExpress" +[[nexinets.credit]] + payment_method_type = "JCB" +[[nexinets.credit]] + payment_method_type = "DinersClub" +[[nexinets.credit]] + payment_method_type = "Discover" +[[nexinets.credit]] + payment_method_type = "CartesBancaires" +[[nexinets.credit]] + payment_method_type = "UnionPay" +[[nexinets.debit]] + payment_method_type = "Mastercard" +[[nexinets.debit]] + payment_method_type = "Visa" +[[nexinets.debit]] + payment_method_type = "Interac" +[[nexinets.debit]] + payment_method_type = "AmericanExpress" +[[nexinets.debit]] + payment_method_type = "JCB" +[[nexinets.debit]] + payment_method_type = "DinersClub" +[[nexinets.debit]] + payment_method_type = "Discover" +[[nexinets.debit]] + payment_method_type = "CartesBancaires" +[[nexinets.debit]] + payment_method_type = "UnionPay" +[[nexinets.bank_redirect]] + payment_method_type = "ideal" +[[nexinets.bank_redirect]] + payment_method_type = "giropay" +[[nexinets.bank_redirect]] + payment_method_type = "sofort" +[[nexinets.bank_redirect]] + payment_method_type = "eps" +[[nexinets.wallet]] + payment_method_type = "apple_pay" +[[nexinets.wallet]] + payment_method_type = "paypal" [nexinets.connector_auth.BodyKey] api_key="API Key" key1="Merchant ID" [nexinets.connector_webhook_details] merchant_secret="Source verification key" - [nexinets.metadata.apple_pay.session_token_data] certificate="Merchant Certificate (Base64 Encoded)" certificate_keys="Merchant PrivateKey (Base64 Encoded)" @@ -350,9 +1200,48 @@ merchant_capabilities=["supports3DS"] label="apple" [nmi] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -wallet = ["apple_pay","google_pay"] +[[nmi.credit]] + payment_method_type = "Mastercard" +[[nmi.credit]] + payment_method_type = "Visa" +[[nmi.credit]] + payment_method_type = "Interac" +[[nmi.credit]] + payment_method_type = "AmericanExpress" +[[nmi.credit]] + payment_method_type = "JCB" +[[nmi.credit]] + payment_method_type = "DinersClub" +[[nmi.credit]] + payment_method_type = "Discover" +[[nmi.credit]] + payment_method_type = "CartesBancaires" +[[nmi.credit]] + payment_method_type = "UnionPay" +[[nmi.debit]] + payment_method_type = "Mastercard" +[[nmi.debit]] + payment_method_type = "Visa" +[[nmi.debit]] + payment_method_type = "Interac" +[[nmi.debit]] + payment_method_type = "AmericanExpress" +[[nmi.debit]] + payment_method_type = "JCB" +[[nmi.debit]] + payment_method_type = "DinersClub" +[[nmi.debit]] + payment_method_type = "Discover" +[[nmi.debit]] + payment_method_type = "CartesBancaires" +[[nmi.debit]] + payment_method_type = "UnionPay" +[[nmi.bank_redirect]] + payment_method_type = "ideal" +[[nmi.wallet]] + payment_method_type = "apple_pay" +[[nmi.wallet]] + payment_method_type = "google_pay" [nmi.connector_auth.HeaderKey] api_key="API Key" [nmi.connector_webhook_details] @@ -376,9 +1265,48 @@ merchant_capabilities=["supports3DS"] label="apple" [noon] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -wallet = ["apple_pay","google_pay","paypal"] +[[noon.credit]] + payment_method_type = "Mastercard" +[[noon.credit]] + payment_method_type = "Visa" +[[noon.credit]] + payment_method_type = "Interac" +[[noon.credit]] + payment_method_type = "AmericanExpress" +[[noon.credit]] + payment_method_type = "JCB" +[[noon.credit]] + payment_method_type = "DinersClub" +[[noon.credit]] + payment_method_type = "Discover" +[[noon.credit]] + payment_method_type = "CartesBancaires" +[[noon.credit]] + payment_method_type = "UnionPay" +[[noon.debit]] + payment_method_type = "Mastercard" +[[noon.debit]] + payment_method_type = "Visa" +[[noon.debit]] + payment_method_type = "Interac" +[[noon.debit]] + payment_method_type = "AmericanExpress" +[[noon.debit]] + payment_method_type = "JCB" +[[noon.debit]] + payment_method_type = "DinersClub" +[[noon.debit]] + payment_method_type = "Discover" +[[noon.debit]] + payment_method_type = "CartesBancaires" +[[noon.debit]] + payment_method_type = "UnionPay" +[[noon.wallet]] + payment_method_type = "apple_pay" +[[noon.wallet]] + payment_method_type = "google_pay" +[[noon.wallet]] + payment_method_type = "paypal" [noon.connector_auth.SignatureKey] api_key="API Key" key1="Business Identifier" @@ -404,15 +1332,67 @@ merchant_capabilities=["supports3DS"] label="apple" [nuvei] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -pay_later=["klarna","afterpay_clearpay"] -bank_redirect=["ideal","giropay","sofort","eps"] -wallet = ["apple_pay","google_pay","paypal"] +[[nuvei.credit]] + payment_method_type = "Mastercard" +[[nuvei.credit]] + payment_method_type = "Visa" +[[nuvei.credit]] + payment_method_type = "Interac" +[[nuvei.credit]] + payment_method_type = "AmericanExpress" +[[nuvei.credit]] + payment_method_type = "JCB" +[[nuvei.credit]] + payment_method_type = "DinersClub" +[[nuvei.credit]] + payment_method_type = "Discover" +[[nuvei.credit]] + payment_method_type = "CartesBancaires" +[[nuvei.credit]] + payment_method_type = "UnionPay" +[[nuvei.debit]] + payment_method_type = "Mastercard" +[[nuvei.debit]] + payment_method_type = "Visa" +[[nuvei.debit]] + payment_method_type = "Interac" +[[nuvei.debit]] + payment_method_type = "AmericanExpress" +[[nuvei.debit]] + payment_method_type = "JCB" +[[nuvei.debit]] + payment_method_type = "DinersClub" +[[nuvei.debit]] + payment_method_type = "Discover" +[[nuvei.debit]] + payment_method_type = "CartesBancaires" +[[nuvei.debit]] + payment_method_type = "UnionPay" +[[nuvei.pay_later]] + payment_method_type = "klarna" +[[nuvei.pay_later]] + payment_method_type = "afterpay_clearpay" +[[nuvei.bank_redirect]] + payment_method_type = "ideal" +[[nuvei.bank_redirect]] + payment_method_type = "giropay" +[[nuvei.bank_redirect]] + payment_method_type = "sofort" +[[nuvei.bank_redirect]] + payment_method_type = "eps" +[[nuvei.wallet]] + payment_method_type = "apple_pay" +[[nuvei.wallet]] + payment_method_type = "google_pay" +[[nuvei.wallet]] + payment_method_type = "paypal" [nuvei.connector_auth.SignatureKey] api_key="Merchant ID" key1="Merchant Site ID" api_secret="Merchant Secret" +[nuvei.connector_webhook_details] +merchant_secret="Source verification key" + [nuvei.metadata.google_pay] merchant_name="Google Pay Merchant Name" gateway_merchant_id="Google Pay Merchant Key" @@ -430,11 +1410,114 @@ supported_networks=["visa","masterCard","amex","discover"] merchant_capabilities=["supports3DS"] label="apple" + +[opennode] +[[opennode.crypto]] + payment_method_type = "crypto_currency" +[opennode.connector_auth.HeaderKey] +api_key="API Key" +[opennode.connector_webhook_details] +merchant_secret="Source verification key" + +[prophetpay] +[[prophetpay.card_redirect]] + payment_method_type = "card_redirect" +[prophetpay.connector_auth.SignatureKey] +api_key="Username" +key1="Token" +api_secret="Profile" + +[payme] +[[payme.credit]] + payment_method_type = "Mastercard" +[[payme.credit]] + payment_method_type = "Visa" +[[payme.credit]] + payment_method_type = "Interac" +[[payme.credit]] + payment_method_type = "AmericanExpress" +[[payme.credit]] + payment_method_type = "JCB" +[[payme.credit]] + payment_method_type = "DinersClub" +[[payme.credit]] + payment_method_type = "Discover" +[[payme.credit]] + payment_method_type = "CartesBancaires" +[[payme.credit]] + payment_method_type = "UnionPay" +[[payme.debit]] + payment_method_type = "Mastercard" +[[payme.debit]] + payment_method_type = "Visa" +[[payme.debit]] + payment_method_type = "Interac" +[[payme.debit]] + payment_method_type = "AmericanExpress" +[[payme.debit]] + payment_method_type = "JCB" +[[payme.debit]] + payment_method_type = "DinersClub" +[[payme.debit]] + payment_method_type = "Discover" +[[payme.debit]] + payment_method_type = "CartesBancaires" +[[payme.debit]] + payment_method_type = "UnionPay" +[payme.connector_auth.BodyKey] +api_key="Seller Payme Id" +key1="Payme Public Key" +[payme.connector_webhook_details] +merchant_secret="Payme Client Secret" +additional_secret="Payme Client Key" + [paypal] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -wallet = ["paypal"] -bank_redirect=["ideal","giropay","sofort","eps"] +[[paypal.credit]] + payment_method_type = "Mastercard" +[[paypal.credit]] + payment_method_type = "Visa" +[[paypal.credit]] + payment_method_type = "Interac" +[[paypal.credit]] + payment_method_type = "AmericanExpress" +[[paypal.credit]] + payment_method_type = "JCB" +[[paypal.credit]] + payment_method_type = "DinersClub" +[[paypal.credit]] + payment_method_type = "Discover" +[[paypal.credit]] + payment_method_type = "CartesBancaires" +[[paypal.credit]] + payment_method_type = "UnionPay" +[[paypal.debit]] + payment_method_type = "Mastercard" +[[paypal.debit]] + payment_method_type = "Visa" +[[paypal.debit]] + payment_method_type = "Interac" +[[paypal.debit]] + payment_method_type = "AmericanExpress" +[[paypal.debit]] + payment_method_type = "JCB" +[[paypal.debit]] + payment_method_type = "DinersClub" +[[paypal.debit]] + payment_method_type = "Discover" +[[paypal.debit]] + payment_method_type = "CartesBancaires" +[[paypal.debit]] + payment_method_type = "UnionPay" +[[paypal.wallet]] + payment_method_type = "paypal" +[[paypal.bank_redirect]] + payment_method_type = "ideal" +[[paypal.bank_redirect]] + payment_method_type = "giropay" +[[paypal.bank_redirect]] + payment_method_type = "sofort" +[[paypal.bank_redirect]] + payment_method_type = "eps" is_verifiable = true [paypal.connector_auth.BodyKey] api_key="Client Secret" @@ -442,10 +1525,46 @@ key1="Client ID" [paypal.connector_webhook_details] merchant_secret="Source verification key" + [payu] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -wallet = ["google_pay"] +[[payu.credit]] + payment_method_type = "Mastercard" +[[payu.credit]] + payment_method_type = "Visa" +[[payu.credit]] + payment_method_type = "Interac" +[[payu.credit]] + payment_method_type = "AmericanExpress" +[[payu.credit]] + payment_method_type = "JCB" +[[payu.credit]] + payment_method_type = "DinersClub" +[[payu.credit]] + payment_method_type = "Discover" +[[payu.credit]] + payment_method_type = "CartesBancaires" +[[payu.credit]] + payment_method_type = "UnionPay" +[[payu.debit]] + payment_method_type = "Mastercard" +[[payu.debit]] + payment_method_type = "Visa" +[[payu.debit]] + payment_method_type = "Interac" +[[payu.debit]] + payment_method_type = "AmericanExpress" +[[payu.debit]] + payment_method_type = "JCB" +[[payu.debit]] + payment_method_type = "DinersClub" +[[payu.debit]] + payment_method_type = "Discover" +[[payu.debit]] + payment_method_type = "CartesBancaires" +[[payu.debit]] + payment_method_type = "UnionPay" +[[payu.wallet]] + payment_method_type = "google_pay" [payu.connector_auth.BodyKey] api_key="API Key" key1="Merchant POS ID" @@ -457,18 +1576,129 @@ merchant_name="Google Pay Merchant Name" gateway_merchant_id="Google Pay Merchant Key" merchant_id="Google Pay Merchant ID" -[prophetpay] -card_redirect = ["card_redirect"] -[prophetpay.connector_auth.SignatureKey] -api_key="Username" -key1="Token" -api_secret="Profile" +[placetopay] +[[placetopay.credit]] + payment_method_type = "Mastercard" +[[placetopay.credit]] + payment_method_type = "Visa" +[[placetopay.credit]] + payment_method_type = "Interac" +[[placetopay.credit]] + payment_method_type = "AmericanExpress" +[[placetopay.credit]] + payment_method_type = "JCB" +[[placetopay.credit]] + payment_method_type = "DinersClub" +[[placetopay.credit]] + payment_method_type = "Discover" +[[placetopay.credit]] + payment_method_type = "CartesBancaires" +[[placetopay.credit]] + payment_method_type = "UnionPay" +[[placetopay.debit]] + payment_method_type = "Mastercard" +[[placetopay.debit]] + payment_method_type = "Visa" +[[placetopay.debit]] + payment_method_type = "Interac" +[[placetopay.debit]] + payment_method_type = "AmericanExpress" +[[placetopay.debit]] + payment_method_type = "JCB" +[[placetopay.debit]] + payment_method_type = "DinersClub" +[[placetopay.debit]] + payment_method_type = "Discover" +[[placetopay.debit]] + payment_method_type = "CartesBancaires" +[[placetopay.debit]] + payment_method_type = "UnionPay" +[placetopay.connector_auth.BodyKey] +api_key="Login" +key1="Trankey" +[powertranz] +[[powertranz.credit]] + payment_method_type = "Mastercard" +[[powertranz.credit]] + payment_method_type = "Visa" +[[powertranz.credit]] + payment_method_type = "Interac" +[[powertranz.credit]] + payment_method_type = "AmericanExpress" +[[powertranz.credit]] + payment_method_type = "JCB" +[[powertranz.credit]] + payment_method_type = "DinersClub" +[[powertranz.credit]] + payment_method_type = "Discover" +[[powertranz.credit]] + payment_method_type = "CartesBancaires" +[[powertranz.credit]] + payment_method_type = "UnionPay" +[[powertranz.debit]] + payment_method_type = "Mastercard" +[[powertranz.debit]] + payment_method_type = "Visa" +[[powertranz.debit]] + payment_method_type = "Interac" +[[powertranz.debit]] + payment_method_type = "AmericanExpress" +[[powertranz.debit]] + payment_method_type = "JCB" +[[powertranz.debit]] + payment_method_type = "DinersClub" +[[powertranz.debit]] + payment_method_type = "Discover" +[[powertranz.debit]] + payment_method_type = "CartesBancaires" +[[powertranz.debit]] + payment_method_type = "UnionPay" +[powertranz.connector_auth.BodyKey] +key1 = "PowerTranz Id" +api_key="PowerTranz Password" +[powertranz.connector_webhook_details] +merchant_secret="Source verification key" [rapyd] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -wallet = ["apple_pay"] +[[rapyd.credit]] + payment_method_type = "Mastercard" +[[rapyd.credit]] + payment_method_type = "Visa" +[[rapyd.credit]] + payment_method_type = "Interac" +[[rapyd.credit]] + payment_method_type = "AmericanExpress" +[[rapyd.credit]] + payment_method_type = "JCB" +[[rapyd.credit]] + payment_method_type = "DinersClub" +[[rapyd.credit]] + payment_method_type = "Discover" +[[rapyd.credit]] + payment_method_type = "CartesBancaires" +[[rapyd.credit]] + payment_method_type = "UnionPay" +[[rapyd.debit]] + payment_method_type = "Mastercard" +[[rapyd.debit]] + payment_method_type = "Visa" +[[rapyd.debit]] + payment_method_type = "Interac" +[[rapyd.debit]] + payment_method_type = "AmericanExpress" +[[rapyd.debit]] + payment_method_type = "JCB" +[[rapyd.debit]] + payment_method_type = "DinersClub" +[[rapyd.debit]] + payment_method_type = "Discover" +[[rapyd.debit]] + payment_method_type = "CartesBancaires" +[[rapyd.debit]] + payment_method_type = "UnionPay" +[[rapyd.wallet]] + payment_method_type = "apple_pay" [rapyd.connector_auth.BodyKey] api_key="Access Key" key1="API Secret" @@ -488,22 +1718,136 @@ merchant_capabilities=["supports3DS"] label="apple" [shift4] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -bank_redirect=["ideal","giropay","sofort","eps"] +[[shift4.credit]] + payment_method_type = "Mastercard" +[[shift4.credit]] + payment_method_type = "Visa" +[[shift4.credit]] + payment_method_type = "Interac" +[[shift4.credit]] + payment_method_type = "AmericanExpress" +[[shift4.credit]] + payment_method_type = "JCB" +[[shift4.credit]] + payment_method_type = "DinersClub" +[[shift4.credit]] + payment_method_type = "Discover" +[[shift4.credit]] + payment_method_type = "CartesBancaires" +[[shift4.credit]] + payment_method_type = "UnionPay" +[[shift4.debit]] + payment_method_type = "Mastercard" +[[shift4.debit]] + payment_method_type = "Visa" +[[shift4.debit]] + payment_method_type = "Interac" +[[shift4.debit]] + payment_method_type = "AmericanExpress" +[[shift4.debit]] + payment_method_type = "JCB" +[[shift4.debit]] + payment_method_type = "DinersClub" +[[shift4.debit]] + payment_method_type = "Discover" +[[shift4.debit]] + payment_method_type = "CartesBancaires" +[[shift4.debit]] + payment_method_type = "UnionPay" +[[shift4.bank_redirect]] + payment_method_type = "ideal" +[[shift4.bank_redirect]] + payment_method_type = "giropay" +[[shift4.bank_redirect]] + payment_method_type = "sofort" +[[shift4.bank_redirect]] + payment_method_type = "eps" [shift4.connector_auth.HeaderKey] api_key="API Key" [shift4.connector_webhook_details] merchant_secret="Source verification key" [stripe] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -pay_later=["klarna","affirm","afterpay_clearpay"] -bank_redirect=["ideal","giropay","sofort","eps","bancontact_card","przelewy24"] -bank_debit=["ach","bacs","becs","sepa"] -bank_transfer=["ach","bacs","sepa", "multibanco"] -wallet = ["apple_pay","google_pay","we_chat_pay","ali_pay", "cashapp"] +[[stripe.credit]] + payment_method_type = "Mastercard" +[[stripe.credit]] + payment_method_type = "Visa" +[[stripe.credit]] + payment_method_type = "Interac" +[[stripe.credit]] + payment_method_type = "AmericanExpress" +[[stripe.credit]] + payment_method_type = "JCB" +[[stripe.credit]] + payment_method_type = "DinersClub" +[[stripe.credit]] + payment_method_type = "Discover" +[[stripe.credit]] + payment_method_type = "CartesBancaires" +[[stripe.credit]] + payment_method_type = "UnionPay" +[[stripe.debit]] + payment_method_type = "Mastercard" +[[stripe.debit]] + payment_method_type = "Visa" +[[stripe.debit]] + payment_method_type = "Interac" +[[stripe.debit]] + payment_method_type = "AmericanExpress" +[[stripe.debit]] + payment_method_type = "JCB" +[[stripe.debit]] + payment_method_type = "DinersClub" +[[stripe.debit]] + payment_method_type = "Discover" +[[stripe.debit]] + payment_method_type = "CartesBancaires" +[[stripe.debit]] + payment_method_type = "UnionPay" +[[stripe.pay_later]] + payment_method_type = "klarna" +[[stripe.pay_later]] + payment_method_type = "affirm" +[[stripe.pay_later]] + payment_method_type = "afterpay_clearpay" +[[stripe.bank_redirect]] + payment_method_type = "ideal" +[[stripe.bank_redirect]] + payment_method_type = "giropay" +[[stripe.bank_redirect]] + payment_method_type = "sofort" +[[stripe.bank_redirect]] + payment_method_type = "eps" +[[stripe.bank_redirect]] + payment_method_type = "bancontact_card" +[[stripe.bank_redirect]] + payment_method_type = "przelewy24" +[[stripe.bank_debit]] + payment_method_type = "ach" +[[stripe.bank_debit]] + payment_method_type = "bacs" +[[stripe.bank_debit]] + payment_method_type = "becs" +[[stripe.bank_debit]] + payment_method_type = "sepa" +[[stripe.bank_transfer]] + payment_method_type = "ach" +[[stripe.bank_transfer]] + payment_method_type = "bacs" +[[stripe.bank_transfer]] + payment_method_type = "sepa" +[[stripe.bank_transfer]] + payment_method_type = "multibanco" +[[stripe.wallet]] + payment_method_type = "apple_pay" +[[stripe.wallet]] + payment_method_type = "google_pay" +[[stripe.wallet]] + payment_method_type = "we_chat_pay" +[[stripe.wallet]] + payment_method_type = "ali_pay" +[[stripe.wallet]] + payment_method_type = "cashapp" is_verifiable = true [stripe.connector_auth.HeaderKey] api_key="Secret Key" @@ -527,30 +1871,144 @@ supported_networks=["visa","masterCard","amex","discover"] merchant_capabilities=["supports3DS"] label="apple" -[zen] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -voucher = ["boleto", "efecty", "pago_efectivo", "red_compra", "red_pagos"] -bank_transfer = ["pix", "pse"] -wallet = ["apple_pay","google_pay"] -[zen.connector_auth.HeaderKey] -api_key="API Key" -[zen.connector_webhook_details] +[stax] +[[stax.credit]] + payment_method_type = "Mastercard" +[[stax.credit]] + payment_method_type = "Visa" +[[stax.credit]] + payment_method_type = "Interac" +[[stax.credit]] + payment_method_type = "AmericanExpress" +[[stax.credit]] + payment_method_type = "JCB" +[[stax.credit]] + payment_method_type = "DinersClub" +[[stax.credit]] + payment_method_type = "Discover" +[[stax.credit]] + payment_method_type = "CartesBancaires" +[[stax.credit]] + payment_method_type = "UnionPay" +[[stax.debit]] + payment_method_type = "Mastercard" +[[stax.debit]] + payment_method_type = "Visa" +[[stax.debit]] + payment_method_type = "Interac" +[[stax.debit]] + payment_method_type = "AmericanExpress" +[[stax.debit]] + payment_method_type = "JCB" +[[stax.debit]] + payment_method_type = "DinersClub" +[[stax.debit]] + payment_method_type = "Discover" +[[stax.debit]] + payment_method_type = "CartesBancaires" +[[stax.debit]] + payment_method_type = "UnionPay" +[[stax.bank_debit]] + payment_method_type = "ach" +[stax.connector_auth.HeaderKey] +api_key="Api Key" +[stax.connector_webhook_details] merchant_secret="Source verification key" -[zen.metadata.apple_pay] -terminal_uuid="Terminal UUID" -pay_wall_secret="Pay Wall Secret" -[zen.metadata.google_pay] -terminal_uuid="Terminal UUID" -pay_wall_secret="Pay Wall Secret" - +[square] +[[square.credit]] + payment_method_type = "Mastercard" +[[square.credit]] + payment_method_type = "Visa" +[[square.credit]] + payment_method_type = "Interac" +[[square.credit]] + payment_method_type = "AmericanExpress" +[[square.credit]] + payment_method_type = "JCB" +[[square.credit]] + payment_method_type = "DinersClub" +[[square.credit]] + payment_method_type = "Discover" +[[square.credit]] + payment_method_type = "CartesBancaires" +[[square.credit]] + payment_method_type = "UnionPay" +[[square.debit]] + payment_method_type = "Mastercard" +[[square.debit]] + payment_method_type = "Visa" +[[square.debit]] + payment_method_type = "Interac" +[[square.debit]] + payment_method_type = "AmericanExpress" +[[square.debit]] + payment_method_type = "JCB" +[[square.debit]] + payment_method_type = "DinersClub" +[[square.debit]] + payment_method_type = "Discover" +[[square.debit]] + payment_method_type = "CartesBancaires" +[[square.debit]] + payment_method_type = "UnionPay" +[square_payout.connector_auth.BodyKey] +api_key = "Square API Key" +key1 = "Square Client Id" +[square.connector_webhook_details] +merchant_secret="Source verification key" [trustpay] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -bank_redirect=["ideal","giropay","sofort","eps","blik"] -wallet = ["apple_pay","google_pay"] +[[trustpay.credit]] + payment_method_type = "Mastercard" +[[trustpay.credit]] + payment_method_type = "Visa" +[[trustpay.credit]] + payment_method_type = "Interac" +[[trustpay.credit]] + payment_method_type = "AmericanExpress" +[[trustpay.credit]] + payment_method_type = "JCB" +[[trustpay.credit]] + payment_method_type = "DinersClub" +[[trustpay.credit]] + payment_method_type = "Discover" +[[trustpay.credit]] + payment_method_type = "CartesBancaires" +[[trustpay.credit]] + payment_method_type = "UnionPay" +[[trustpay.debit]] + payment_method_type = "Mastercard" +[[trustpay.debit]] + payment_method_type = "Visa" +[[trustpay.debit]] + payment_method_type = "Interac" +[[trustpay.debit]] + payment_method_type = "AmericanExpress" +[[trustpay.debit]] + payment_method_type = "JCB" +[[trustpay.debit]] + payment_method_type = "DinersClub" +[[trustpay.debit]] + payment_method_type = "Discover" +[[trustpay.debit]] + payment_method_type = "CartesBancaires" +[[trustpay.debit]] + payment_method_type = "UnionPay" +[[trustpay.bank_redirect]] + payment_method_type = "ideal" +[[trustpay.bank_redirect]] + payment_method_type = "giropay" +[[trustpay.bank_redirect]] + payment_method_type = "sofort" +[[trustpay.bank_redirect]] + payment_method_type = "eps" +[[trustpay.bank_redirect]] + payment_method_type = "blik" +[[trustpay.wallet]] + payment_method_type = "apple_pay" +[[trustpay.wallet]] + payment_method_type = "google_pay" [trustpay.connector_auth.SignatureKey] api_key="API Key" key1="Project ID" @@ -570,10 +2028,100 @@ supported_networks=["visa","masterCard","amex","discover"] merchant_capabilities=["supports3DS"] label="apple" +[tsys] +[[tsys.credit]] + payment_method_type = "Mastercard" +[[tsys.credit]] + payment_method_type = "Visa" +[[tsys.credit]] + payment_method_type = "Interac" +[[tsys.credit]] + payment_method_type = "AmericanExpress" +[[tsys.credit]] + payment_method_type = "JCB" +[[tsys.credit]] + payment_method_type = "DinersClub" +[[tsys.credit]] + payment_method_type = "Discover" +[[tsys.credit]] + payment_method_type = "CartesBancaires" +[[tsys.credit]] + payment_method_type = "UnionPay" +[[tsys.debit]] + payment_method_type = "Mastercard" +[[tsys.debit]] + payment_method_type = "Visa" +[[tsys.debit]] + payment_method_type = "Interac" +[[tsys.debit]] + payment_method_type = "AmericanExpress" +[[tsys.debit]] + payment_method_type = "JCB" +[[tsys.debit]] + payment_method_type = "DinersClub" +[[tsys.debit]] + payment_method_type = "Discover" +[[tsys.debit]] + payment_method_type = "CartesBancaires" +[[tsys.debit]] + payment_method_type = "UnionPay" +[tsys.connector_auth.SignatureKey] +api_key="Device Id" +key1="Transaction Key" +api_secret="Developer Id" +[tsys.connector_webhook_details] +merchant_secret="Source verification key" + +[volt] +[[volt.bank_redirect]] + payment_method_type = "open_banking_uk" +[volt.connector_auth.MultiAuthKey] +api_key = "Username" +api_secret = "Password" +key1 = "Client ID" +key2 = "Client Secret" + [worldline] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -bank_redirect=["ideal","giropay"] +[[worldline.credit]] + payment_method_type = "Mastercard" +[[worldline.credit]] + payment_method_type = "Visa" +[[worldline.credit]] + payment_method_type = "Interac" +[[worldline.credit]] + payment_method_type = "AmericanExpress" +[[worldline.credit]] + payment_method_type = "JCB" +[[worldline.credit]] + payment_method_type = "DinersClub" +[[worldline.credit]] + payment_method_type = "Discover" +[[worldline.credit]] + payment_method_type = "CartesBancaires" +[[worldline.credit]] + payment_method_type = "UnionPay" +[[worldline.debit]] + payment_method_type = "Mastercard" +[[worldline.debit]] + payment_method_type = "Visa" +[[worldline.debit]] + payment_method_type = "Interac" +[[worldline.debit]] + payment_method_type = "AmericanExpress" +[[worldline.debit]] + payment_method_type = "JCB" +[[worldline.debit]] + payment_method_type = "DinersClub" +[[worldline.debit]] + payment_method_type = "Discover" +[[worldline.debit]] + payment_method_type = "CartesBancaires" +[[worldline.debit]] + payment_method_type = "UnionPay" +[[worldline.bank_redirect]] + payment_method_type = "ideal" +[[worldline.bank_redirect]] + payment_method_type = "giropay" [worldline.connector_auth.SignatureKey] api_key="API Key ID" key1="Merchant ID" @@ -582,9 +2130,46 @@ api_secret="Secret API Key" merchant_secret="Source verification key" [worldpay] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -wallet = ["google_pay","apple_pay"] +[[worldpay.credit]] + payment_method_type = "Mastercard" +[[worldpay.credit]] + payment_method_type = "Visa" +[[worldpay.credit]] + payment_method_type = "Interac" +[[worldpay.credit]] + payment_method_type = "AmericanExpress" +[[worldpay.credit]] + payment_method_type = "JCB" +[[worldpay.credit]] + payment_method_type = "DinersClub" +[[worldpay.credit]] + payment_method_type = "Discover" +[[worldpay.credit]] + payment_method_type = "CartesBancaires" +[[worldpay.credit]] + payment_method_type = "UnionPay" +[[worldpay.debit]] + payment_method_type = "Mastercard" +[[worldpay.debit]] + payment_method_type = "Visa" +[[worldpay.debit]] + payment_method_type = "Interac" +[[worldpay.debit]] + payment_method_type = "AmericanExpress" +[[worldpay.debit]] + payment_method_type = "JCB" +[[worldpay.debit]] + payment_method_type = "DinersClub" +[[worldpay.debit]] + payment_method_type = "Discover" +[[worldpay.debit]] + payment_method_type = "CartesBancaires" +[[worldpay.debit]] + payment_method_type = "UnionPay" +[[worldpay.wallet]] + payment_method_type = "google_pay" +[[worldpay.wallet]] + payment_method_type = "apple_pay" [worldpay.connector_auth.BodyKey] api_key="Username" key1="Password" @@ -608,179 +2193,308 @@ supported_networks=["visa","masterCard","amex","discover"] merchant_capabilities=["supports3DS"] label="apple" -[cashtocode] -reward = ["classic", "evoucher"] -[cashtocode.connector_auth.CurrencyAuthKey.auth_key_map.EUR] -password_classic="Password Classic" -username_classic="Username Classic" -merchant_id_classic="MerchantId Classic" -password_evoucher="Password Evoucher" -username_evoucher="Username Evoucher" -merchant_id_evoucher="MerchantId Evoucher" -[cashtocode.connector_auth.CurrencyAuthKey.auth_key_map.GBP] -password_classic="Password Classic" -username_classic="Username Classic" -merchant_id_classic="MerchantId Classic" -password_evoucher="Password Evoucher" -username_evoucher="Username Evoucher" -merchant_id_evoucher="MerchantId Evoucher" -[cashtocode.connector_auth.CurrencyAuthKey.auth_key_map.USD] -password_classic="Password Classic" -username_classic="Username Classic" -merchant_id_classic="MerchantId Classic" -password_evoucher="Password Evoucher" -username_evoucher="Username Evoucher" -merchant_id_evoucher="MerchantId Evoucher" -[cashtocode.connector_webhook_details] -merchant_secret="Source verification key" - -[cryptopay] -crypto = ["crypto_currency"] -[cryptopay.connector_auth.BodyKey] +[zen] +[[zen.credit]] + payment_method_type = "Mastercard" +[[zen.credit]] + payment_method_type = "Visa" +[[zen.credit]] + payment_method_type = "Interac" +[[zen.credit]] + payment_method_type = "AmericanExpress" +[[zen.credit]] + payment_method_type = "JCB" +[[zen.credit]] + payment_method_type = "DinersClub" +[[zen.credit]] + payment_method_type = "Discover" +[[zen.credit]] + payment_method_type = "CartesBancaires" +[[zen.credit]] + payment_method_type = "UnionPay" +[[zen.debit]] + payment_method_type = "Mastercard" +[[zen.debit]] + payment_method_type = "Visa" +[[zen.debit]] + payment_method_type = "Interac" +[[zen.debit]] + payment_method_type = "AmericanExpress" +[[zen.debit]] + payment_method_type = "JCB" +[[zen.debit]] + payment_method_type = "DinersClub" +[[zen.debit]] + payment_method_type = "Discover" +[[zen.debit]] + payment_method_type = "CartesBancaires" +[[zen.debit]] + payment_method_type = "UnionPay" +[[zen.voucher]] + payment_method_type = "boleto" +[[zen.voucher]] + payment_method_type = "efecty" +[[zen.voucher]] + payment_method_type = "pago_efectivo" +[[zen.voucher]] + payment_method_type = "red_compra" +[[zen.voucher]] + payment_method_type = "red_pagos" +[[zen.bank_transfer]] + payment_method_type = "pix" +[[zen.bank_transfer]] + payment_method_type = "pse" +[[zen.wallet]] + payment_method_type = "apple_pay" +[[zen.wallet]] + payment_method_type = "google_pay" +[zen.connector_auth.HeaderKey] api_key="API Key" -key1="Secret Key" -[cryptopay.connector_webhook_details] +[zen.connector_webhook_details] merchant_secret="Source verification key" +[zen.metadata.apple_pay] +terminal_uuid="Terminal UUID" +pay_wall_secret="Pay Wall Secret" +[zen.metadata.google_pay] +terminal_uuid="Terminal UUID" +pay_wall_secret="Pay Wall Secret" + + [dummy_connector] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] +[[dummy_connector.credit]] + payment_method_type = "Mastercard" +[[dummy_connector.credit]] + payment_method_type = "Visa" +[[dummy_connector.credit]] + payment_method_type = "Interac" +[[dummy_connector.credit]] + payment_method_type = "AmericanExpress" +[[dummy_connector.credit]] + payment_method_type = "JCB" +[[dummy_connector.credit]] + payment_method_type = "DinersClub" +[[dummy_connector.credit]] + payment_method_type = "Discover" +[[dummy_connector.credit]] + payment_method_type = "CartesBancaires" +[[dummy_connector.credit]] + payment_method_type = "UnionPay" +[[dummy_connector.debit]] + payment_method_type = "Mastercard" +[[dummy_connector.debit]] + payment_method_type = "Visa" +[[dummy_connector.debit]] + payment_method_type = "Interac" +[[dummy_connector.debit]] + payment_method_type = "AmericanExpress" +[[dummy_connector.debit]] + payment_method_type = "JCB" +[[dummy_connector.debit]] + payment_method_type = "DinersClub" +[[dummy_connector.debit]] + payment_method_type = "Discover" +[[dummy_connector.debit]] + payment_method_type = "CartesBancaires" +[[dummy_connector.debit]] + payment_method_type = "UnionPay" [dummy_connector.connector_auth.HeaderKey] api_key="Api Key" -[stripe_test] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -wallet = ["google_pay","ali_pay"] -pay_later=["klarna","affirm","afterpay_clearpay"] -[stripe_test.connector_auth.HeaderKey] -api_key="Api Key" - [paypal_test] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -wallet = ["paypal"] +[[paypal_test.credit]] + payment_method_type = "Mastercard" +[[paypal_test.credit]] + payment_method_type = "Visa" +[[paypal_test.credit]] + payment_method_type = "Interac" +[[paypal_test.credit]] + payment_method_type = "AmericanExpress" +[[paypal_test.credit]] + payment_method_type = "JCB" +[[paypal_test.credit]] + payment_method_type = "DinersClub" +[[paypal_test.credit]] + payment_method_type = "Discover" +[[paypal_test.credit]] + payment_method_type = "CartesBancaires" +[[paypal_test.credit]] + payment_method_type = "UnionPay" +[[paypal_test.debit]] + payment_method_type = "Mastercard" +[[paypal_test.debit]] + payment_method_type = "Visa" +[[paypal_test.debit]] + payment_method_type = "Interac" +[[paypal_test.debit]] + payment_method_type = "AmericanExpress" +[[paypal_test.debit]] + payment_method_type = "JCB" +[[paypal_test.debit]] + payment_method_type = "DinersClub" +[[paypal_test.debit]] + payment_method_type = "Discover" +[[paypal_test.debit]] + payment_method_type = "CartesBancaires" +[[paypal_test.debit]] + payment_method_type = "UnionPay" +[[paypal_test.wallet]] + payment_method_type = "paypal" [paypal_test.connector_auth.HeaderKey] api_key="Api Key" -[payme] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -[payme.connector_auth.BodyKey] -api_key="Seller Payme Id" -key1="Payme Public Key" -[payme.connector_webhook_details] -merchant_secret="Payme Client Secret" -additional_secret="Payme Client Key" - -[powertranz] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -[powertranz.connector_auth.BodyKey] -key1 = "PowerTranz Id" -api_key="PowerTranz Password" -[powertranz.connector_webhook_details] -merchant_secret="Source verification key" - -[globepay] -wallet = ["we_chat_pay","ali_pay"] -[globepay.connector_auth.BodyKey] -api_key="Partner Code" -key1="Credential Code" -[globepay.connector_webhook_details] -merchant_secret="Source verification key" - -[tsys] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -[tsys.connector_auth.SignatureKey] -api_key="Device Id" -key1="Transaction Key" -api_secret="Developer Id" -[tsys.connector_webhook_details] -merchant_secret="Source verification key" - -[square] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -[square_payout.connector_auth.BodyKey] -api_key = "Square API Key" -key1 = "Square Client Id" -[square.connector_webhook_details] -merchant_secret="Source verification key" +[stripe_test] +[[stripe_test.credit]] + payment_method_type = "Mastercard" +[[stripe_test.credit]] + payment_method_type = "Visa" +[[stripe_test.credit]] + payment_method_type = "Interac" +[[stripe_test.credit]] + payment_method_type = "AmericanExpress" +[[stripe_test.credit]] + payment_method_type = "JCB" +[[stripe_test.credit]] + payment_method_type = "DinersClub" +[[stripe_test.credit]] + payment_method_type = "Discover" +[[stripe_test.credit]] + payment_method_type = "CartesBancaires" +[[stripe_test.credit]] + payment_method_type = "UnionPay" +[[stripe_test.debit]] + payment_method_type = "Mastercard" +[[stripe_test.debit]] + payment_method_type = "Visa" +[[stripe_test.debit]] + payment_method_type = "Interac" +[[stripe_test.debit]] + payment_method_type = "AmericanExpress" +[[stripe_test.debit]] + payment_method_type = "JCB" +[[stripe_test.debit]] + payment_method_type = "DinersClub" +[[stripe_test.debit]] + payment_method_type = "Discover" +[[stripe_test.debit]] + payment_method_type = "CartesBancaires" +[[stripe_test.debit]] + payment_method_type = "UnionPay" +[[stripe_test.wallet]] + payment_method_type = "google_pay" +[[stripe_test.wallet]] + payment_method_type = "ali_pay" +[[stripe_test.wallet]] + payment_method_type = "we_chat_pay" +[[stripe_test.pay_later]] + payment_method_type = "klarna" +[[stripe_test.pay_later]] + payment_method_type = "affirm" +[[stripe_test.pay_later]] + payment_method_type = "afterpay_clearpay" +[[paypal_test.wallet]] + payment_method_type = "paypal" +[stripe_test.connector_auth.HeaderKey] +api_key="Api Key" -[stax] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -bank_debit=["ach"] -[stax.connector_auth.HeaderKey] +[helcim] +[[helcim.credit]] + payment_method_type = "Mastercard" +[[helcim.credit]] + payment_method_type = "Visa" +[[helcim.credit]] + payment_method_type = "Interac" +[[helcim.credit]] + payment_method_type = "AmericanExpress" +[[helcim.credit]] + payment_method_type = "JCB" +[[helcim.credit]] + payment_method_type = "DinersClub" +[[helcim.credit]] + payment_method_type = "Discover" +[[helcim.credit]] + payment_method_type = "CartesBancaires" +[[helcim.credit]] + payment_method_type = "UnionPay" +[[helcim.debit]] + payment_method_type = "Mastercard" +[[helcim.debit]] + payment_method_type = "Visa" +[[helcim.debit]] + payment_method_type = "Interac" +[[helcim.debit]] + payment_method_type = "AmericanExpress" +[[helcim.debit]] + payment_method_type = "JCB" +[[helcim.debit]] + payment_method_type = "DinersClub" +[[helcim.debit]] + payment_method_type = "Discover" +[[helcim.debit]] + payment_method_type = "CartesBancaires" +[[helcim.debit]] + payment_method_type = "UnionPay" +[helcim.connector_auth.HeaderKey] api_key="Api Key" -[stax.connector_webhook_details] -merchant_secret="Source verification key" -[volt] -bank_redirect = ["open_banking_uk"] -[volt.connector_auth.MultiAuthKey] -api_key = "Username" -api_secret = "Password" -key1 = "Client ID" -key2 = "Client Secret" -[wise_payout] -bank_transfer = ["ach","bacs","sepa"] -[wise_payout.connector_auth.BodyKey] -api_key = "Wise API Key" -key1 = "Wise Account Id" + [adyen_payout] -bank_transfer = ["ach","bacs","sepa"] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] +[[adyen_payout.credit]] + payment_method_type = "Mastercard" +[[adyen_payout.credit]] + payment_method_type = "Visa" +[[adyen_payout.credit]] + payment_method_type = "Interac" +[[adyen_payout.credit]] + payment_method_type = "AmericanExpress" +[[adyen_payout.credit]] + payment_method_type = "JCB" +[[adyen_payout.credit]] + payment_method_type = "DinersClub" +[[adyen_payout.credit]] + payment_method_type = "Discover" +[[adyen_payout.credit]] + payment_method_type = "CartesBancaires" +[[adyen_payout.credit]] + payment_method_type = "UnionPay" +[[adyen_payout.debit]] + payment_method_type = "Mastercard" +[[adyen_payout.debit]] + payment_method_type = "Visa" +[[adyen_payout.debit]] + payment_method_type = "Interac" +[[adyen_payout.debit]] + payment_method_type = "AmericanExpress" +[[adyen_payout.debit]] + payment_method_type = "JCB" +[[adyen_payout.debit]] + payment_method_type = "DinersClub" +[[adyen_payout.debit]] + payment_method_type = "Discover" +[[adyen_payout.debit]] + payment_method_type = "CartesBancaires" +[[adyen_payout.debit]] + payment_method_type = "UnionPay" +[[adyen_payout.bank_transfer]] + payment_method_type = "ach" +[[adyen_payout.bank_transfer]] + payment_method_type = "bacs" +[[adyen_payout.bank_transfer]] + payment_method_type = "sepa" [adyen_payout.connector_auth.SignatureKey] api_key = "Adyen API Key (Payout creation)" api_secret = "Adyen Key (Payout submission)" key1 = "Adyen Account Id" -[gocardless] -bank_debit=["ach","becs","sepa"] -[gocardless.connector_auth.HeaderKey] -api_key="Access Token" -[gocardless.connector_webhook_details] -merchant_secret="Source verification key" - -[bankofamerica] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -wallet = ["apple_pay","google_pay"] - -[bankofamerica.connector_auth.SignatureKey] -api_key="Key" -key1="Merchant ID" -api_secret="Shared Secret" -[bankofamerica.connector_webhook_details] -merchant_secret="Source verification key" - -[bankofamerica.metadata.apple_pay.session_token_data] -certificate="Merchant Certificate (Base64 Encoded)" -certificate_keys="Merchant PrivateKey (Base64 Encoded)" -merchant_identifier="Apple Merchant Identifier" -display_name="Display Name" -initiative="Domain" -initiative_context="Domain Name" -[bankofamerica.metadata.apple_pay.payment_request_data] -supported_networks=["visa","masterCard","amex","discover"] -merchant_capabilities=["supports3DS"] -label="apple" - -[bankofamerica.metadata.google_pay] -merchant_name="Google Pay Merchant Name" -gateway_merchant_id="Google Pay Merchant Key" -merchant_id="Google Pay Merchant ID" - -[placetopay] -credit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] -debit = ["Mastercard","Visa","Interac","AmericanExpress","JCB","DinersClub","Discover","CartesBancaires","UnionPay"] - -[placetopay.connector_auth.BodyKey] -api_key="Login" -key1="Trankey" \ No newline at end of file +[wise_payout] +[[wise_payout.bank_transfer]] + payment_method_type = "ach" +[[wise_payout.bank_transfer]] + payment_method_type = "bacs" +[[wise_payout.bank_transfer]] + payment_method_type = "sepa" +[wise_payout.connector_auth.BodyKey] +api_key = "Wise API Key" +key1 = "Wise Account Id" \ No newline at end of file From 01b4ac30e40a55b05fe3585d0544b21125762bc7 Mon Sep 17 00:00:00 2001 From: Sakil Mostak <73734619+Sakilmostak@users.noreply.github.com> Date: Mon, 8 Jan 2024 12:16:54 +0530 Subject: [PATCH 19/19] fix(connector): [Stripe] Deserialization Error while parsing Dispute Webhook Body (#3256) Co-authored-by: Arjun Karthik --- crates/router/src/connector/stripe.rs | 41 ++++++++++++++----- .../src/connector/stripe/transformers.rs | 14 +++---- 2 files changed, 38 insertions(+), 17 deletions(-) diff --git a/crates/router/src/connector/stripe.rs b/crates/router/src/connector/stripe.rs index 65fd652629fb..8c43e2c16a25 100644 --- a/crates/router/src/connector/stripe.rs +++ b/crates/router/src/connector/stripe.rs @@ -1858,10 +1858,15 @@ impl api::IncomingWebhook for Stripe { Ok(match details.event_data.event_object.object { stripe::WebhookEventObjectType::PaymentIntent => { - match details.event_data.event_object.metadata { + match details + .event_data + .event_object + .metadata + .and_then(|meta_data| meta_data.order_id) + { // if order_id is present - Some(meta_data) => api_models::webhooks::ObjectReferenceId::PaymentId( - api_models::payments::PaymentIdType::PaymentAttemptId(meta_data.order_id), + Some(order_id) => api_models::webhooks::ObjectReferenceId::PaymentId( + api_models::payments::PaymentIdType::PaymentAttemptId(order_id), ), // else used connector_transaction_id None => api_models::webhooks::ObjectReferenceId::PaymentId( @@ -1872,10 +1877,15 @@ impl api::IncomingWebhook for Stripe { } } stripe::WebhookEventObjectType::Charge => { - match details.event_data.event_object.metadata { + match details + .event_data + .event_object + .metadata + .and_then(|meta_data| meta_data.order_id) + { // if order_id is present - Some(meta_data) => api_models::webhooks::ObjectReferenceId::PaymentId( - api_models::payments::PaymentIdType::PaymentAttemptId(meta_data.order_id), + Some(order_id) => api_models::webhooks::ObjectReferenceId::PaymentId( + api_models::payments::PaymentIdType::PaymentAttemptId(order_id), ), // else used connector_transaction_id None => api_models::webhooks::ObjectReferenceId::PaymentId( @@ -1908,14 +1918,25 @@ impl api::IncomingWebhook for Stripe { ) } stripe::WebhookEventObjectType::Refund => { - match details.event_data.event_object.metadata { + match details + .event_data + .event_object + .metadata + .clone() + .and_then(|meta_data| meta_data.order_id) + { // if meta_data is present - Some(meta_data) => { + Some(order_id) => { // Issue: 2076 - match meta_data.is_refund_id_as_reference { + match details + .event_data + .event_object + .metadata + .and_then(|meta_data| meta_data.is_refund_id_as_reference) + { // if the order_id is refund_id Some(_) => api_models::webhooks::ObjectReferenceId::RefundId( - api_models::webhooks::RefundIdType::RefundId(meta_data.order_id), + api_models::webhooks::RefundIdType::RefundId(order_id), ), // if the order_id is payment_id // since payment_id was being passed before the deployment of this pr diff --git a/crates/router/src/connector/stripe/transformers.rs b/crates/router/src/connector/stripe/transformers.rs index ba5dfc7fef91..4338e8f9ff28 100644 --- a/crates/router/src/connector/stripe/transformers.rs +++ b/crates/router/src/connector/stripe/transformers.rs @@ -135,7 +135,7 @@ pub struct PaymentIntentRequest { pub struct StripeMetadata { // merchant_reference_id #[serde(rename(serialize = "metadata[order_id]"))] - pub order_id: String, + pub order_id: Option, // to check whether the order_id is refund_id or payemnt_id // before deployment, order id is set to payemnt_id in refunds but now it is set as refund_id // it is set as string instead of bool because stripe pass it as string even if we set it as bool @@ -1861,7 +1861,7 @@ impl TryFrom<&types::PaymentsAuthorizeRouterData> for PaymentIntentRequest { statement_descriptor_suffix: item.request.statement_descriptor_suffix.clone(), statement_descriptor: item.request.statement_descriptor.clone(), meta_data: StripeMetadata { - order_id, + order_id: Some(order_id), is_refund_id_as_reference: None, }, return_url: item @@ -2696,7 +2696,7 @@ impl TryFrom<&types::RefundsRouterData> for RefundRequest { amount: Some(amount), payment_intent, meta_data: StripeMetadata { - order_id: item.request.refund_id.clone(), + order_id: Some(item.request.refund_id.clone()), is_refund_id_as_reference: Some("true".to_string()), }, }) @@ -3203,7 +3203,7 @@ pub struct WebhookPaymentMethodDetails { pub payment_method: WebhookPaymentMethodType, } -#[derive(Debug, Deserialize)] +#[derive(Debug, Clone, Deserialize)] pub struct WebhookEventObjectData { pub id: String, pub object: WebhookEventObjectType, @@ -3218,7 +3218,7 @@ pub struct WebhookEventObjectData { pub metadata: Option, } -#[derive(Debug, Deserialize, strum::Display)] +#[derive(Debug, Clone, Deserialize, strum::Display)] #[serde(rename_all = "snake_case")] pub enum WebhookEventObjectType { PaymentIntent, @@ -3280,7 +3280,7 @@ pub enum WebhookEventType { Unknown, } -#[derive(Debug, Serialize, strum::Display, Deserialize, PartialEq)] +#[derive(Debug, Clone, Serialize, strum::Display, Deserialize, PartialEq)] #[serde(rename_all = "snake_case")] pub enum WebhookEventStatus { WarningNeedsResponse, @@ -3304,7 +3304,7 @@ pub enum WebhookEventStatus { Unknown, } -#[derive(Debug, Deserialize, PartialEq)] +#[derive(Debug, Clone, Deserialize, PartialEq)] pub struct EvidenceDetails { #[serde(with = "common_utils::custom_serde::timestamp")] pub due_by: PrimitiveDateTime,