mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 09:07:09 +08:00
feat(connector): Archipel connector (#7851)
Co-authored-by: Michal Czernecki <michal.czerencki@flowbird.group> Co-authored-by: Guillaume Bague <guillaume.bague@flowbird.group>
This commit is contained in:
@ -183,6 +183,7 @@ adyenplatform.base_url = "https://balanceplatform-api-test.adyen.com/"
|
||||
airwallex.base_url = "https://api-demo.airwallex.com/"
|
||||
amazonpay.base_url = "https://pay-api.amazon.com/v2"
|
||||
applepay.base_url = "https://apple-pay-gateway.apple.com/"
|
||||
archipel.base_url = "https://{{merchant_endpoint_prefix}}/ArchiPEL/Transaction/v1"
|
||||
authorizedotnet.base_url = "https://apitest.authorize.net/xml/v1/request.api"
|
||||
bambora.base_url = "https://api.na.bambora.com"
|
||||
bamboraapac.base_url = "https://demo.ippayments.com.au/interface/api"
|
||||
@ -324,6 +325,7 @@ rewards = ["cashtocode", "zen"]
|
||||
cards = [
|
||||
"adyen",
|
||||
"adyenplatform",
|
||||
"archipel",
|
||||
"authorizedotnet",
|
||||
"coinbase",
|
||||
"coingate",
|
||||
@ -475,8 +477,8 @@ slack_invite_url = "https://www.example.com/" # Slack invite url for hyperswit
|
||||
discord_invite_url = "https://www.example.com/" # Discord invite url for hyperswitch
|
||||
|
||||
[zero_mandates.supported_payment_methods]
|
||||
card.credit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,globalpay,worldpay,multisafepay,nmi,nexinets,noon,bankofamerica,braintree,nuvei,payme,wellsfargo,bamboraapac,elavon,fiuu,nexixpay,novalnet,paybox,paypal"
|
||||
card.debit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,globalpay,worldpay,multisafepay,nmi,nexinets,noon,bankofamerica,braintree,nuvei,payme,wellsfargo,bamboraapac,elavon,fiuu,nexixpay,novalnet,paybox,paypal"
|
||||
card.credit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,globalpay,worldpay,multisafepay,nmi,nexinets,noon,bankofamerica,braintree,nuvei,payme,wellsfargo,bamboraapac,elavon,fiuu,nexixpay,novalnet,paybox,paypal,archipel"
|
||||
card.debit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,globalpay,worldpay,multisafepay,nmi,nexinets,noon,bankofamerica,braintree,nuvei,payme,wellsfargo,bamboraapac,elavon,fiuu,nexixpay,novalnet,paybox,paypal,archipel"
|
||||
wallet.paypal = { connector_list = "adyen" } # Mandate supported payment method type and connector for wallets
|
||||
pay_later.klarna = { connector_list = "adyen" } # Mandate supported payment method type and connector for pay_later
|
||||
bank_debit.ach = { connector_list = "gocardless,adyen" } # Mandate supported payment method type and connector for bank_debit
|
||||
@ -491,8 +493,8 @@ wallet.google_pay = { connector_list = "bankofamerica,authorizedotnet" }
|
||||
bank_redirect.giropay = { connector_list = "globalpay" }
|
||||
|
||||
[mandates.supported_payment_methods]
|
||||
card.credit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,globalpay,worldpay,multisafepay,nmi,nexinets,noon,bankofamerica,braintree,nuvei,payme,wellsfargo,bamboraapac,elavon,fiuu,nexixpay,novalnet,paybox,paypal,xendit,moneris"
|
||||
card.debit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,globalpay,worldpay,multisafepay,nmi,nexinets,noon,bankofamerica,braintree,nuvei,payme,wellsfargo,bamboraapac,elavon,fiuu,nexixpay,novalnet,paybox,paypal,xendit,moneris"
|
||||
card.credit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,globalpay,worldpay,multisafepay,nmi,nexinets,noon,bankofamerica,braintree,nuvei,payme,wellsfargo,bamboraapac,elavon,fiuu,nexixpay,novalnet,paybox,paypal,xendit,moneris,archipel"
|
||||
card.debit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,globalpay,worldpay,multisafepay,nmi,nexinets,noon,bankofamerica,braintree,nuvei,payme,wellsfargo,bamboraapac,elavon,fiuu,nexixpay,novalnet,paybox,paypal,xendit,moneris,archipel"
|
||||
wallet.paypal = { connector_list = "adyen,novalnet" } # Mandate supported payment method type and connector for wallets
|
||||
pay_later.klarna = { connector_list = "adyen" } # Mandate supported payment method type and connector for pay_later
|
||||
bank_debit.ach = { connector_list = "gocardless,adyen" } # Mandate supported payment method type and connector for bank_debit
|
||||
@ -1030,7 +1032,7 @@ check_token_status_url= "" # base url to check token status from token servic
|
||||
connector_list = "cybersource" # Supported connectors for network tokenization
|
||||
|
||||
[network_transaction_id_supported_connectors]
|
||||
connector_list = "adyen,cybersource,novalnet,stripe,worldpay" # Supported connectors for network transaction id
|
||||
connector_list = "adyen,archipel,cybersource,novalnet,stripe,worldpay" # Supported connectors for network transaction id
|
||||
|
||||
[grpc_client.dynamic_routing_client] # Dynamic Routing Client Configuration
|
||||
host = "localhost" # Client Host
|
||||
|
||||
@ -27,6 +27,7 @@ adyenplatform.base_url = "https://balanceplatform-api-test.adyen.com/"
|
||||
airwallex.base_url = "https://api-demo.airwallex.com/"
|
||||
amazonpay.base_url = "https://pay-api.amazon.com/v2"
|
||||
applepay.base_url = "https://apple-pay-gateway.apple.com/"
|
||||
archipel.base_url = "https://{{merchant_endpoint_prefix}}/ArchiPEL/Transaction/v1"
|
||||
authorizedotnet.base_url = "https://apitest.authorize.net/xml/v1/request.api"
|
||||
bambora.base_url = "https://api.na.bambora.com"
|
||||
bamboraapac.base_url = "https://demo.ippayments.com.au/interface/api"
|
||||
@ -178,8 +179,8 @@ bank_debit.ach = { connector_list = "gocardless,adyen" }
|
||||
bank_debit.becs = { connector_list = "gocardless,adyen" }
|
||||
bank_debit.bacs = { connector_list = "gocardless" }
|
||||
bank_debit.sepa = { connector_list = "gocardless,adyen" }
|
||||
card.credit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,worldpay,nmi,bankofamerica,wellsfargo,bamboraapac,nexixpay,novalnet,paypal"
|
||||
card.debit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,worldpay,nmi,bankofamerica,wellsfargo,bamboraapac,nexixpay,novalnet,paypal"
|
||||
card.credit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,worldpay,nmi,bankofamerica,wellsfargo,bamboraapac,nexixpay,novalnet,paypal,archipel"
|
||||
card.debit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,worldpay,nmi,bankofamerica,wellsfargo,bamboraapac,nexixpay,novalnet,paypal,archipel"
|
||||
pay_later.klarna.connector_list = "adyen"
|
||||
wallet.apple_pay.connector_list = "adyen,cybersource,bankofamerica,novalnet,authorizedotnet"
|
||||
wallet.samsung_pay.connector_list = "cybersource"
|
||||
@ -202,8 +203,8 @@ bank_debit.ach = { connector_list = "gocardless,adyen,stripe" }
|
||||
bank_debit.becs = { connector_list = "gocardless,stripe,adyen" }
|
||||
bank_debit.bacs = { connector_list = "stripe,gocardless" }
|
||||
bank_debit.sepa = { connector_list = "gocardless,adyen,stripe,deutschebank" }
|
||||
card.credit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,globalpay,worldpay,multisafepay,nmi,nexinets,noon,bankofamerica,braintree,nuvei,payme,wellsfargo,bamboraapac,elavon,fiuu,nexixpay,novalnet,paybox,paypal,xendit,moneris"
|
||||
card.debit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,globalpay,worldpay,multisafepay,nmi,nexinets,noon,bankofamerica,braintree,nuvei,payme,wellsfargo,bamboraapac,elavon,fiuu,nexixpay,novalnet,paybox,paypal,xendit,moneris"
|
||||
card.credit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,globalpay,worldpay,multisafepay,nmi,nexinets,noon,bankofamerica,braintree,nuvei,payme,wellsfargo,bamboraapac,elavon,fiuu,nexixpay,novalnet,paybox,paypal,xendit,moneris,archipel"
|
||||
card.debit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,globalpay,worldpay,multisafepay,nmi,nexinets,noon,bankofamerica,braintree,nuvei,payme,wellsfargo,bamboraapac,elavon,fiuu,nexixpay,novalnet,paybox,paypal,xendit,moneris,archipel"
|
||||
pay_later.klarna.connector_list = "adyen,aci"
|
||||
wallet.apple_pay.connector_list = "stripe,adyen,cybersource,noon,bankofamerica,nexinets,novalnet,authorizedotnet,wellsfargo"
|
||||
wallet.samsung_pay.connector_list = "cybersource"
|
||||
@ -230,7 +231,7 @@ card.credit = { connector_list = "cybersource" } # Update Mandate sup
|
||||
card.debit = { connector_list = "cybersource" } # Update Mandate supported payment method type and connector for card
|
||||
|
||||
[network_transaction_id_supported_connectors]
|
||||
connector_list = "adyen,cybersource,novalnet,stripe,worldpay"
|
||||
connector_list = "adyen,archipel,cybersource,novalnet,stripe,worldpay"
|
||||
|
||||
|
||||
[payouts]
|
||||
|
||||
@ -31,6 +31,7 @@ adyenplatform.base_url = "https://balanceplatform-api-live.adyen.com/"
|
||||
airwallex.base_url = "https://api.airwallex.com/"
|
||||
amazonpay.base_url = "https://pay-api.amazon.com/v2"
|
||||
applepay.base_url = "https://apple-pay-gateway.apple.com/"
|
||||
archipel.base_url = "https://{{merchant_endpoint_prefix}}/ArchiPEL/Transaction/v1"
|
||||
authorizedotnet.base_url = "https://api.authorize.net/xml/v1/request.api"
|
||||
bambora.base_url = "https://api.na.bambora.com"
|
||||
bamboraapac.base_url = "https://www.bambora.co.nz/interface/api/dts.asmx"
|
||||
@ -178,8 +179,8 @@ bank_debit.ach = { connector_list = "gocardless,adyen" }
|
||||
bank_debit.becs = { connector_list = "gocardless,adyen" }
|
||||
bank_debit.bacs = { connector_list = "gocardless" }
|
||||
bank_debit.sepa = { connector_list = "gocardless,adyen" }
|
||||
card.credit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,worldpay,nmi,bankofamerica,wellsfargo,bamboraapac,nexixpay,novalnet,paypal"
|
||||
card.debit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,worldpay,nmi,bankofamerica,wellsfargo,bamboraapac,nexixpay,novalnet,paypal"
|
||||
card.credit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,worldpay,nmi,bankofamerica,wellsfargo,bamboraapac,nexixpay,novalnet,paypal,archipel"
|
||||
card.debit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,worldpay,nmi,bankofamerica,wellsfargo,bamboraapac,nexixpay,novalnet,paypal,archipel"
|
||||
pay_later.klarna.connector_list = "adyen"
|
||||
wallet.apple_pay.connector_list = "adyen,cybersource,bankofamerica,novalnet,authorizedotnet"
|
||||
wallet.samsung_pay.connector_list = "cybersource"
|
||||
@ -202,8 +203,8 @@ bank_debit.ach = { connector_list = "gocardless,adyen,stripe" }
|
||||
bank_debit.becs = { connector_list = "gocardless,stripe,adyen" }
|
||||
bank_debit.bacs = { connector_list = "stripe,gocardless" }
|
||||
bank_debit.sepa = { connector_list = "gocardless,adyen,stripe,deutschebank" }
|
||||
card.credit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,globalpay,worldpay,multisafepay,nmi,nexinets,noon,bankofamerica,braintree,nuvei,payme,wellsfargo,bamboraapac,elavon,fiuu,nexixpay,novalnet,paybox,paypal,xendit,moneris"
|
||||
card.debit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,globalpay,worldpay,multisafepay,nmi,nexinets,noon,bankofamerica,braintree,nuvei,payme,wellsfargo,bamboraapac,elavon,fiuu,nexixpay,novalnet,paybox,paypal,xendit,moneris"
|
||||
card.credit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,globalpay,worldpay,multisafepay,nmi,nexinets,noon,bankofamerica,braintree,nuvei,payme,wellsfargo,bamboraapac,elavon,fiuu,nexixpay,novalnet,paybox,paypal,xendit,moneris,archipel"
|
||||
card.debit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,globalpay,worldpay,multisafepay,nmi,nexinets,noon,bankofamerica,braintree,nuvei,payme,wellsfargo,bamboraapac,elavon,fiuu,nexixpay,novalnet,paybox,paypal,xendit,moneris,archipel"
|
||||
pay_later.klarna.connector_list = "adyen,aci"
|
||||
wallet.apple_pay.connector_list = "stripe,adyen,cybersource,noon,bankofamerica,nexinets,novalnet,authorizedotnet,wellsfargo"
|
||||
wallet.samsung_pay.connector_list = "cybersource"
|
||||
@ -230,7 +231,7 @@ card.credit = { connector_list = "cybersource" } # Update Mandate sup
|
||||
card.debit = { connector_list = "cybersource" } # Update Mandate supported payment method type and connector for card
|
||||
|
||||
[network_transaction_id_supported_connectors]
|
||||
connector_list = "adyen,stripe"
|
||||
connector_list = "adyen,archipel,stripe"
|
||||
|
||||
[payouts]
|
||||
payout_eligibility = true # Defaults the eligibility of a payout method to true in case connector does not provide checks for payout eligibility
|
||||
|
||||
@ -31,6 +31,7 @@ adyenplatform.base_url = "https://balanceplatform-api-test.adyen.com/"
|
||||
airwallex.base_url = "https://api-demo.airwallex.com/"
|
||||
amazonpay.base_url = "https://pay-api.amazon.com/v2"
|
||||
applepay.base_url = "https://apple-pay-gateway.apple.com/"
|
||||
archipel.base_url = "https://{{merchant_endpoint_prefix}}/ArchiPEL/Transaction/v1"
|
||||
authorizedotnet.base_url = "https://apitest.authorize.net/xml/v1/request.api"
|
||||
bambora.base_url = "https://api.na.bambora.com"
|
||||
bamboraapac.base_url = "https://demo.ippayments.com.au/interface/api"
|
||||
@ -178,8 +179,8 @@ bank_debit.ach = { connector_list = "gocardless,adyen" }
|
||||
bank_debit.becs = { connector_list = "gocardless,adyen" }
|
||||
bank_debit.bacs = { connector_list = "gocardless" }
|
||||
bank_debit.sepa = { connector_list = "gocardless,adyen" }
|
||||
card.credit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,worldpay,nmi,bankofamerica,wellsfargo,bamboraapac,nexixpay,novalnet,paypal"
|
||||
card.debit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,worldpay,nmi,bankofamerica,wellsfargo,bamboraapac,nexixpay,novalnet,paypal"
|
||||
card.credit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,worldpay,nmi,bankofamerica,wellsfargo,bamboraapac,nexixpay,novalnet,paypal,archipel"
|
||||
card.debit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,worldpay,nmi,bankofamerica,wellsfargo,bamboraapac,nexixpay,novalnet,paypal,archipel"
|
||||
pay_later.klarna.connector_list = "adyen"
|
||||
wallet.apple_pay.connector_list = "adyen,cybersource,bankofamerica,novalnet,authorizedotnet"
|
||||
wallet.samsung_pay.connector_list = "cybersource"
|
||||
@ -202,8 +203,8 @@ bank_debit.ach = { connector_list = "gocardless,adyen,stripe" }
|
||||
bank_debit.becs = { connector_list = "gocardless,stripe,adyen" }
|
||||
bank_debit.bacs = { connector_list = "stripe,gocardless" }
|
||||
bank_debit.sepa = { connector_list = "gocardless,adyen,stripe,deutschebank" }
|
||||
card.credit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,globalpay,worldpay,multisafepay,nmi,nexinets,noon,bankofamerica,braintree,nuvei,payme,wellsfargo,bamboraapac,elavon,fiuu,nexixpay,novalnet,paybox,paypal,xendit,moneris"
|
||||
card.debit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,globalpay,worldpay,multisafepay,nmi,nexinets,noon,bankofamerica,braintree,nuvei,payme,wellsfargo,bamboraapac,elavon,fiuu,nexixpay,novalnet,paybox,paypal,xendit,moneris"
|
||||
card.credit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,globalpay,worldpay,multisafepay,nmi,nexinets,noon,bankofamerica,braintree,nuvei,payme,wellsfargo,bamboraapac,elavon,fiuu,nexixpay,novalnet,paybox,paypal,xendit,moneris,archipel"
|
||||
card.debit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,globalpay,worldpay,multisafepay,nmi,nexinets,noon,bankofamerica,braintree,nuvei,payme,wellsfargo,bamboraapac,elavon,fiuu,nexixpay,novalnet,paybox,paypal,xendit,moneris,archipel"
|
||||
pay_later.klarna.connector_list = "adyen,aci"
|
||||
wallet.apple_pay.connector_list = "stripe,adyen,cybersource,noon,bankofamerica,nexinets,novalnet,authorizedotnet,wellsfargo"
|
||||
wallet.samsung_pay.connector_list = "cybersource"
|
||||
@ -230,7 +231,7 @@ card.credit = { connector_list = "cybersource" } # Update Mandate sup
|
||||
card.debit = { connector_list = "cybersource" } # Update Mandate supported payment method type and connector for card
|
||||
|
||||
[network_transaction_id_supported_connectors]
|
||||
connector_list = "adyen,cybersource,novalnet,stripe,worldpay"
|
||||
connector_list = "adyen,archipel,cybersource,novalnet,stripe,worldpay"
|
||||
|
||||
|
||||
[payouts]
|
||||
|
||||
@ -118,6 +118,7 @@ cards = [
|
||||
"adyenplatform",
|
||||
"airwallex",
|
||||
"amazonpay",
|
||||
"archipel",
|
||||
"authorizedotnet",
|
||||
"bambora",
|
||||
"bamboraapac",
|
||||
@ -231,6 +232,7 @@ adyen.dispute_base_url = "https://ca-test.adyen.com/"
|
||||
airwallex.base_url = "https://api-demo.airwallex.com/"
|
||||
amazonpay.base_url = "https://pay-api.amazon.com/v2"
|
||||
applepay.base_url = "https://apple-pay-gateway.apple.com/"
|
||||
archipel.base_url = "https://{{merchant_endpoint_prefix}}/ArchiPEL/Transaction/v1"
|
||||
authorizedotnet.base_url = "https://apitest.authorize.net/xml/v1/request.api"
|
||||
bambora.base_url = "https://api.na.bambora.com"
|
||||
bamboraapac.base_url = "https://demo.ippayments.com.au/interface/api"
|
||||
@ -903,8 +905,8 @@ bank_debit.ach = { connector_list = "gocardless,adyen" }
|
||||
bank_debit.becs = { connector_list = "gocardless,adyen" }
|
||||
bank_debit.bacs = { connector_list = "gocardless" }
|
||||
bank_debit.sepa = { connector_list = "gocardless,adyen" }
|
||||
card.credit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,worldpay,nmi,bankofamerica,wellsfargo,bamboraapac,nexixpay,novalnet,paypal"
|
||||
card.debit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,worldpay,nmi,bankofamerica,wellsfargo,bamboraapac,nexixpay,novalnet,paypal"
|
||||
card.credit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,worldpay,nmi,bankofamerica,wellsfargo,bamboraapac,nexixpay,novalnet,paypal,archipel"
|
||||
card.debit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,worldpay,nmi,bankofamerica,wellsfargo,bamboraapac,nexixpay,novalnet,paypal,archipel"
|
||||
pay_later.klarna.connector_list = "adyen"
|
||||
wallet.apple_pay.connector_list = "adyen,cybersource,bankofamerica,novalnet,authorizedotnet"
|
||||
wallet.samsung_pay.connector_list = "cybersource"
|
||||
@ -928,8 +930,8 @@ bank_debit.ach = { connector_list = "gocardless,adyen,stripe" }
|
||||
bank_debit.becs = { connector_list = "gocardless,stripe,adyen" }
|
||||
bank_debit.bacs = { connector_list = "stripe,gocardless" }
|
||||
bank_debit.sepa = { connector_list = "gocardless,adyen,stripe,deutschebank" }
|
||||
card.credit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,globalpay,worldpay,multisafepay,nmi,nexinets,noon,bankofamerica,braintree,nuvei,payme,wellsfargo,bamboraapac,elavon,fiuu,nexixpay,novalnet,paybox,paypal,xendit,moneris"
|
||||
card.debit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,globalpay,worldpay,multisafepay,nmi,nexinets,noon,bankofamerica,braintree,nuvei,payme,wellsfargo,bamboraapac,elavon,fiuu,nexixpay,novalnet,paybox,paypal,xendit,moneris"
|
||||
card.credit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,globalpay,worldpay,multisafepay,nmi,nexinets,noon,bankofamerica,braintree,nuvei,payme,wellsfargo,bamboraapac,elavon,fiuu,nexixpay,novalnet,paybox,paypal,xendit,moneris,archipel"
|
||||
card.debit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,globalpay,worldpay,multisafepay,nmi,nexinets,noon,bankofamerica,braintree,nuvei,payme,wellsfargo,bamboraapac,elavon,fiuu,nexixpay,novalnet,paybox,paypal,xendit,moneris,archipel"
|
||||
pay_later.klarna.connector_list = "adyen,aci"
|
||||
wallet.apple_pay.connector_list = "stripe,adyen,cybersource,noon,bankofamerica,nexinets,novalnet,authorizedotnet,wellsfargo"
|
||||
wallet.samsung_pay.connector_list = "cybersource"
|
||||
@ -956,7 +958,7 @@ card.credit = { connector_list = "cybersource" }
|
||||
card.debit = { connector_list = "cybersource" }
|
||||
|
||||
[network_transaction_id_supported_connectors]
|
||||
connector_list = "adyen,cybersource,novalnet,stripe,worldpay"
|
||||
connector_list = "adyen,archipel,cybersource,novalnet,stripe,worldpay"
|
||||
|
||||
[connector_request_reference_id_config]
|
||||
merchant_ids_send_payment_id_as_connector_request_id = []
|
||||
|
||||
@ -114,6 +114,7 @@ adyen.dispute_base_url = "https://ca-test.adyen.com/"
|
||||
airwallex.base_url = "https://api-demo.airwallex.com/"
|
||||
amazonpay.base_url = "https://pay-api.amazon.com/v2"
|
||||
applepay.base_url = "https://apple-pay-gateway.apple.com/"
|
||||
archipel.base_url = "https://{{merchant_endpoint_prefix}}/ArchiPEL/Transaction/v1"
|
||||
authorizedotnet.base_url = "https://apitest.authorize.net/xml/v1/request.api"
|
||||
bambora.base_url = "https://api.na.bambora.com"
|
||||
bamboraapac.base_url = "https://demo.ippayments.com.au/interface/api"
|
||||
@ -237,6 +238,7 @@ cards = [
|
||||
"adyenplatform",
|
||||
"airwallex",
|
||||
"amazonpay",
|
||||
"archipel",
|
||||
"authorizedotnet",
|
||||
"bambora",
|
||||
"bamboraapac",
|
||||
@ -809,8 +811,8 @@ bank_debit.ach = { connector_list = "gocardless,adyen" }
|
||||
bank_debit.becs = { connector_list = "gocardless,adyen" }
|
||||
bank_debit.bacs = { connector_list = "gocardless" }
|
||||
bank_debit.sepa = { connector_list = "gocardless,adyen" }
|
||||
card.credit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,worldpay,nmi,bankofamerica,wellsfargo,bamboraapac,nexixpay,novalnet,paypal"
|
||||
card.debit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,worldpay,nmi,bankofamerica,wellsfargo,bamboraapac,nexixpay,novalnet,paypal"
|
||||
card.credit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,worldpay,nmi,bankofamerica,wellsfargo,bamboraapac,nexixpay,novalnet,paypal,archipel"
|
||||
card.debit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,worldpay,nmi,bankofamerica,wellsfargo,bamboraapac,nexixpay,novalnet,paypal,archipel"
|
||||
pay_later.klarna.connector_list = "adyen"
|
||||
wallet.apple_pay.connector_list = "adyen,cybersource,bankofamerica,novalnet,authorizedotnet"
|
||||
wallet.samsung_pay.connector_list = "cybersource"
|
||||
@ -834,9 +836,8 @@ wallet.google_pay = { connector_list = "stripe,adyen,bankofamerica,authorizedotn
|
||||
wallet.apple_pay = { connector_list = "stripe,adyen,cybersource,noon,bankofamerica,authorizedotnet,novalnet,multisafepay,wellsfargo" }
|
||||
wallet.samsung_pay = { connector_list = "cybersource" }
|
||||
wallet.paypal = { connector_list = "adyen,novalnet,authorizedotnet" }
|
||||
card.credit = { connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,globalpay,worldpay,multisafepay,nmi,nexinets,noon,bankofamerica,elavon,xendit,novalnet,bamboraapac,wellsfargo" }
|
||||
card.debit = { connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,globalpay,worldpay,multisafepay,nmi,nexinets,noon,bankofamerica,elavon,xendit,novalnet,bamboraapac,wellsfargo" }
|
||||
|
||||
card.credit = { connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,globalpay,worldpay,multisafepay,nmi,nexinets,noon,bankofamerica,elavon,xendit,novalnet,bamboraapac,archipel,wellsfargo" }
|
||||
card.debit = { connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,globalpay,worldpay,multisafepay,nmi,nexinets,noon,bankofamerica,elavon,xendit,novalnet,bamboraapac,archipel,wellsfargo" }
|
||||
bank_debit.ach = { connector_list = "gocardless,adyen" }
|
||||
bank_debit.becs = { connector_list = "gocardless" }
|
||||
bank_debit.bacs = { connector_list = "adyen" }
|
||||
@ -850,7 +851,7 @@ card.credit = { connector_list = "cybersource" }
|
||||
card.debit = { connector_list = "cybersource" }
|
||||
|
||||
[network_transaction_id_supported_connectors]
|
||||
connector_list = "adyen,cybersource,novalnet,stripe,worldpay"
|
||||
connector_list = "adyen,archipel,cybersource,novalnet,stripe,worldpay"
|
||||
|
||||
[connector_customer]
|
||||
connector_list = "gocardless,stax,stripe,facilitapay"
|
||||
|
||||
@ -62,6 +62,7 @@ pub enum RoutableConnectors {
|
||||
Adyen,
|
||||
Airwallex,
|
||||
// Amazonpay,
|
||||
Archipel,
|
||||
Authorizedotnet,
|
||||
Bankofamerica,
|
||||
Billwerk,
|
||||
@ -211,6 +212,7 @@ pub enum Connector {
|
||||
Adyen,
|
||||
Airwallex,
|
||||
// Amazonpay,
|
||||
Archipel,
|
||||
Authorizedotnet,
|
||||
Bambora,
|
||||
Bamboraapac,
|
||||
@ -473,7 +475,7 @@ impl Connector {
|
||||
| Self::Noon
|
||||
| Self::Stripe
|
||||
| Self::Datatrans => false,
|
||||
Self::Checkout | Self::Nmi |Self::Cybersource => true,
|
||||
Self::Checkout | Self::Nmi |Self::Cybersource | Self::Archipel => true,
|
||||
}
|
||||
}
|
||||
|
||||
@ -535,6 +537,7 @@ impl From<RoutableConnectors> for Connector {
|
||||
RoutableConnectors::Aci => Self::Aci,
|
||||
RoutableConnectors::Adyen => Self::Adyen,
|
||||
RoutableConnectors::Airwallex => Self::Airwallex,
|
||||
RoutableConnectors::Archipel => Self::Archipel,
|
||||
RoutableConnectors::Authorizedotnet => Self::Authorizedotnet,
|
||||
RoutableConnectors::Bankofamerica => Self::Bankofamerica,
|
||||
RoutableConnectors::Billwerk => Self::Billwerk,
|
||||
@ -646,6 +649,7 @@ impl TryFrom<Connector> for RoutableConnectors {
|
||||
Connector::Aci => Ok(Self::Aci),
|
||||
Connector::Adyen => Ok(Self::Adyen),
|
||||
Connector::Airwallex => Ok(Self::Airwallex),
|
||||
Connector::Archipel => Ok(Self::Archipel),
|
||||
Connector::Authorizedotnet => Ok(Self::Authorizedotnet),
|
||||
Connector::Bankofamerica => Ok(Self::Bankofamerica),
|
||||
Connector::Billwerk => Ok(Self::Billwerk),
|
||||
|
||||
@ -108,6 +108,8 @@ pub struct ApiModelMetaData {
|
||||
pub card_brands: Option<Vec<String>>,
|
||||
pub merchant_category_code: Option<String>,
|
||||
pub merchant_configuration_id: Option<String>,
|
||||
pub tenant_id: Option<String>,
|
||||
pub platform_url: Option<String>,
|
||||
}
|
||||
|
||||
#[serde_with::skip_serializing_none]
|
||||
|
||||
@ -122,6 +122,8 @@ pub struct ConfigMetadata {
|
||||
pub currency_id: Option<InputData>,
|
||||
pub platform_id: Option<InputData>,
|
||||
pub ledger_account_id: Option<InputData>,
|
||||
pub tenant_id: Option<InputData>,
|
||||
pub platform_url: Option<InputData>,
|
||||
}
|
||||
|
||||
#[serde_with::skip_serializing_none]
|
||||
@ -168,6 +170,7 @@ pub struct ConnectorConfig {
|
||||
#[cfg(feature = "payouts")]
|
||||
pub adyenplatform_payout: Option<ConnectorTomlConfig>,
|
||||
pub airwallex: Option<ConnectorTomlConfig>,
|
||||
pub archipel: Option<ConnectorTomlConfig>,
|
||||
pub authorizedotnet: Option<ConnectorTomlConfig>,
|
||||
pub bamboraapac: Option<ConnectorTomlConfig>,
|
||||
pub bankofamerica: Option<ConnectorTomlConfig>,
|
||||
@ -349,6 +352,7 @@ impl ConnectorConfig {
|
||||
Connector::Adyen => Ok(connector_data.adyen),
|
||||
Connector::Adyenplatform => Err("Use get_payout_connector_config".to_string()),
|
||||
Connector::Airwallex => Ok(connector_data.airwallex),
|
||||
Connector::Archipel => Ok(connector_data.archipel),
|
||||
Connector::Authorizedotnet => Ok(connector_data.authorizedotnet),
|
||||
Connector::Bamboraapac => Ok(connector_data.bamboraapac),
|
||||
Connector::Bankofamerica => Ok(connector_data.bankofamerica),
|
||||
|
||||
@ -5826,3 +5826,107 @@ api_secret="Secret Key"
|
||||
[facilitapay.connector_auth.BodyKey]
|
||||
api_key="Password"
|
||||
key1="Username"
|
||||
|
||||
[archipel]
|
||||
[[archipel.credit]]
|
||||
payment_method_type = "Mastercard"
|
||||
[[archipel.credit]]
|
||||
payment_method_type = "Visa"
|
||||
[[archipel.credit]]
|
||||
payment_method_type = "AmericanExpress"
|
||||
[[archipel.credit]]
|
||||
payment_method_type = "DinersClub"
|
||||
[[archipel.credit]]
|
||||
payment_method_type = "Discover"
|
||||
[[archipel.credit]]
|
||||
payment_method_type = "CartesBancaires"
|
||||
[[archipel.debit]]
|
||||
payment_method_type = "Mastercard"
|
||||
[[archipel.debit]]
|
||||
payment_method_type = "Visa"
|
||||
[[archipel.debit]]
|
||||
payment_method_type = "AmericanExpress"
|
||||
[[archipel.debit]]
|
||||
payment_method_type = "DinersClub"
|
||||
[[archipel.debit]]
|
||||
payment_method_type = "Discover"
|
||||
[[archipel.debit]]
|
||||
payment_method_type = "CartesBancaires"
|
||||
[[archipel.wallet]]
|
||||
payment_method_type = "apple_pay"
|
||||
[archipel.metadata.tenant_id]
|
||||
name = "tenant_id"
|
||||
label = "Tenant ID"
|
||||
placeholder = "Enter Archipel tenantID"
|
||||
required = true
|
||||
type = "Text"
|
||||
[archipel.metadata.platform_url]
|
||||
name = "platform_url"
|
||||
label = "Platform Endpoint Prefix"
|
||||
placeholder = "E.g. 192.0.0.1:8080"
|
||||
required = true
|
||||
type = "Text"
|
||||
[[archipel.metadata.apple_pay]]
|
||||
name = "certificate"
|
||||
label = "Merchant Certificate (Base64 Encoded)"
|
||||
placeholder = "Enter Merchant Certificate (Base64 Encoded)"
|
||||
required = true
|
||||
type = "Text"
|
||||
[[archipel.metadata.apple_pay]]
|
||||
name = "certificate_keys"
|
||||
label = "Merchant PrivateKey (Base64 Encoded)"
|
||||
placeholder = "Enter Merchant PrivateKey (Base64 Encoded)"
|
||||
required = true
|
||||
type = "Text"
|
||||
[[archipel.metadata.apple_pay]]
|
||||
name = "merchant_identifier"
|
||||
label = "Apple Merchant Identifier"
|
||||
placeholder = "Enter Apple Merchant Identifier"
|
||||
required = true
|
||||
type = "Text"
|
||||
[[archipel.metadata.apple_pay]]
|
||||
name = "display_name"
|
||||
label = "Display Name"
|
||||
placeholder = "Enter Display Name"
|
||||
required = true
|
||||
type = "Text"
|
||||
[[archipel.metadata.apple_pay]]
|
||||
name = "initiative"
|
||||
label = "Domain"
|
||||
placeholder = "Enter Domain"
|
||||
required = true
|
||||
type = "Select"
|
||||
options = ["web", "ios"]
|
||||
[[archipel.metadata.apple_pay]]
|
||||
name = "initiative_context"
|
||||
label = "Domain Name"
|
||||
placeholder = "Enter Domain Name"
|
||||
required = true
|
||||
type = "Text"
|
||||
[[archipel.metadata.apple_pay]]
|
||||
name = "merchant_business_country"
|
||||
label = "Merchant Business Country"
|
||||
placeholder = "Enter Merchant Business Country"
|
||||
required = true
|
||||
type = "Select"
|
||||
options = []
|
||||
[[archipel.metadata.apple_pay]]
|
||||
name = "payment_processing_details_at"
|
||||
label = "Payment Processing Details At"
|
||||
placeholder = "Enter Payment Processing Details At"
|
||||
required = true
|
||||
type = "Radio"
|
||||
options = ["Hyperswitch"]
|
||||
|
||||
[archipel.metadata.acquirer_bin]
|
||||
name = "acquirer_bin"
|
||||
label = "Acquirer Bin"
|
||||
placeholder = "Enter Acquirer Bin"
|
||||
required = false
|
||||
type = "Text"
|
||||
[archipel.metadata.acquirer_merchant_id]
|
||||
name = "acquirer_merchant_id"
|
||||
label = "Acquirer Merchant ID"
|
||||
placeholder = "Enter Acquirer Merchant ID"
|
||||
required = false
|
||||
type = "Text"
|
||||
|
||||
@ -4412,3 +4412,107 @@ type="Text"
|
||||
[facilitapay.connector_auth.BodyKey]
|
||||
api_key="Password"
|
||||
key1="Username"
|
||||
|
||||
[archipel]
|
||||
[[archipel.credit]]
|
||||
payment_method_type = "Mastercard"
|
||||
[[archipel.credit]]
|
||||
payment_method_type = "Visa"
|
||||
[[archipel.credit]]
|
||||
payment_method_type = "AmericanExpress"
|
||||
[[archipel.credit]]
|
||||
payment_method_type = "DinersClub"
|
||||
[[archipel.credit]]
|
||||
payment_method_type = "Discover"
|
||||
[[archipel.credit]]
|
||||
payment_method_type = "CartesBancaires"
|
||||
[[archipel.debit]]
|
||||
payment_method_type = "Mastercard"
|
||||
[[archipel.debit]]
|
||||
payment_method_type = "Visa"
|
||||
[[archipel.debit]]
|
||||
payment_method_type = "AmericanExpress"
|
||||
[[archipel.debit]]
|
||||
payment_method_type = "DinersClub"
|
||||
[[archipel.debit]]
|
||||
payment_method_type = "Discover"
|
||||
[[archipel.debit]]
|
||||
payment_method_type = "CartesBancaires"
|
||||
[[archipel.wallet]]
|
||||
payment_method_type = "apple_pay"
|
||||
[archipel.metadata.tenant_id]
|
||||
name="tenant_id"
|
||||
label="Tenant ID"
|
||||
placeholder="Enter Archipel tenantID"
|
||||
required=true
|
||||
type="Text"
|
||||
[archipel.metadata.platform_url]
|
||||
name="platform_url"
|
||||
label="Platform Endpoint Prefix"
|
||||
placeholder="E.g. 192.0.0.1:8080"
|
||||
required=true
|
||||
type="Text"
|
||||
[[archipel.metadata.apple_pay]]
|
||||
name="certificate"
|
||||
label="Merchant Certificate (Base64 Encoded)"
|
||||
placeholder="Enter Merchant Certificate (Base64 Encoded)"
|
||||
required=true
|
||||
type="Text"
|
||||
[[archipel.metadata.apple_pay]]
|
||||
name="certificate_keys"
|
||||
label="Merchant PrivateKey (Base64 Encoded)"
|
||||
placeholder="Enter Merchant PrivateKey (Base64 Encoded)"
|
||||
required=true
|
||||
type="Text"
|
||||
[[archipel.metadata.apple_pay]]
|
||||
name="merchant_identifier"
|
||||
label="Apple Merchant Identifier"
|
||||
placeholder="Enter Apple Merchant Identifier"
|
||||
required=true
|
||||
type="Text"
|
||||
[[archipel.metadata.apple_pay]]
|
||||
name="display_name"
|
||||
label="Display Name"
|
||||
placeholder="Enter Display Name"
|
||||
required=true
|
||||
type="Text"
|
||||
[[archipel.metadata.apple_pay]]
|
||||
name="initiative"
|
||||
label="Domain"
|
||||
placeholder="Enter Domain"
|
||||
required=true
|
||||
type="Select"
|
||||
options=["web","ios"]
|
||||
[[archipel.metadata.apple_pay]]
|
||||
name="initiative_context"
|
||||
label="Domain Name"
|
||||
placeholder="Enter Domain Name"
|
||||
required=true
|
||||
type="Text"
|
||||
[[archipel.metadata.apple_pay]]
|
||||
name="merchant_business_country"
|
||||
label="Merchant Business Country"
|
||||
placeholder="Enter Merchant Business Country"
|
||||
required=true
|
||||
type="Select"
|
||||
options=[]
|
||||
[[archipel.metadata.apple_pay]]
|
||||
name="payment_processing_details_at"
|
||||
label="Payment Processing Details At"
|
||||
placeholder="Enter Payment Processing Details At"
|
||||
required=true
|
||||
type="Radio"
|
||||
options=["Hyperswitch"]
|
||||
|
||||
[archipel.metadata.acquirer_bin]
|
||||
name = "acquirer_bin"
|
||||
label = "Acquirer Bin"
|
||||
placeholder = "Enter Acquirer Bin"
|
||||
required = false
|
||||
type = "Text"
|
||||
[archipel.metadata.acquirer_merchant_id]
|
||||
name = "acquirer_merchant_id"
|
||||
label = "Acquirer Merchant ID"
|
||||
placeholder = "Enter Acquirer Merchant ID"
|
||||
required = false
|
||||
type = "Text"
|
||||
|
||||
@ -5801,3 +5801,107 @@ api_secret = "Secret Key"
|
||||
[facilitapay.connector_auth.BodyKey]
|
||||
api_key="Password"
|
||||
key1="Username"
|
||||
|
||||
[archipel]
|
||||
[[archipel.credit]]
|
||||
payment_method_type = "Mastercard"
|
||||
[[archipel.credit]]
|
||||
payment_method_type = "Visa"
|
||||
[[archipel.credit]]
|
||||
payment_method_type = "AmericanExpress"
|
||||
[[archipel.credit]]
|
||||
payment_method_type = "DinersClub"
|
||||
[[archipel.credit]]
|
||||
payment_method_type = "Discover"
|
||||
[[archipel.credit]]
|
||||
payment_method_type = "CartesBancaires"
|
||||
[[archipel.debit]]
|
||||
payment_method_type = "Mastercard"
|
||||
[[archipel.debit]]
|
||||
payment_method_type = "Visa"
|
||||
[[archipel.debit]]
|
||||
payment_method_type = "AmericanExpress"
|
||||
[[archipel.debit]]
|
||||
payment_method_type = "DinersClub"
|
||||
[[archipel.debit]]
|
||||
payment_method_type = "Discover"
|
||||
[[archipel.debit]]
|
||||
payment_method_type = "CartesBancaires"
|
||||
[[archipel.wallet]]
|
||||
payment_method_type = "apple_pay"
|
||||
[archipel.metadata.tenant_id]
|
||||
name="tenant_id"
|
||||
label="Tenant ID"
|
||||
placeholder="Enter Archipel tenantID"
|
||||
required=true
|
||||
type="Text"
|
||||
[archipel.metadata.platform_url]
|
||||
name="platform_url"
|
||||
label="Platform Endpoint Prefix"
|
||||
placeholder="E.g. 192.0.0.1:8080"
|
||||
required=true
|
||||
type="Text"
|
||||
[[archipel.metadata.apple_pay]]
|
||||
name="certificate"
|
||||
label="Merchant Certificate (Base64 Encoded)"
|
||||
placeholder="Enter Merchant Certificate (Base64 Encoded)"
|
||||
required=true
|
||||
type="Text"
|
||||
[[archipel.metadata.apple_pay]]
|
||||
name="certificate_keys"
|
||||
label="Merchant PrivateKey (Base64 Encoded)"
|
||||
placeholder="Enter Merchant PrivateKey (Base64 Encoded)"
|
||||
required=true
|
||||
type="Text"
|
||||
[[archipel.metadata.apple_pay]]
|
||||
name="merchant_identifier"
|
||||
label="Apple Merchant Identifier"
|
||||
placeholder="Enter Apple Merchant Identifier"
|
||||
required=true
|
||||
type="Text"
|
||||
[[archipel.metadata.apple_pay]]
|
||||
name="display_name"
|
||||
label="Display Name"
|
||||
placeholder="Enter Display Name"
|
||||
required=true
|
||||
type="Text"
|
||||
[[archipel.metadata.apple_pay]]
|
||||
name="initiative"
|
||||
label="Domain"
|
||||
placeholder="Enter Domain"
|
||||
required=true
|
||||
type="Select"
|
||||
options=["web","ios"]
|
||||
[[archipel.metadata.apple_pay]]
|
||||
name="initiative_context"
|
||||
label="Domain Name"
|
||||
placeholder="Enter Domain Name"
|
||||
required=true
|
||||
type="Text"
|
||||
[[archipel.metadata.apple_pay]]
|
||||
name="merchant_business_country"
|
||||
label="Merchant Business Country"
|
||||
placeholder="Enter Merchant Business Country"
|
||||
required=true
|
||||
type="Select"
|
||||
options=[]
|
||||
[[archipel.metadata.apple_pay]]
|
||||
name="payment_processing_details_at"
|
||||
label="Payment Processing Details At"
|
||||
placeholder="Enter Payment Processing Details At"
|
||||
required=true
|
||||
type="Radio"
|
||||
options=["Hyperswitch"]
|
||||
|
||||
[archipel.metadata.acquirer_bin]
|
||||
name = "acquirer_bin"
|
||||
label = "Acquirer Bin"
|
||||
placeholder = "Enter Acquirer Bin"
|
||||
required = false
|
||||
type = "Text"
|
||||
[archipel.metadata.acquirer_merchant_id]
|
||||
name = "acquirer_merchant_id"
|
||||
label = "Acquirer Merchant ID"
|
||||
placeholder = "Enter Acquirer Merchant ID"
|
||||
required = false
|
||||
type = "Text"
|
||||
|
||||
@ -3,6 +3,7 @@ pub mod adyen;
|
||||
pub mod adyenplatform;
|
||||
pub mod airwallex;
|
||||
pub mod amazonpay;
|
||||
pub mod archipel;
|
||||
pub mod authorizedotnet;
|
||||
pub mod bambora;
|
||||
pub mod bamboraapac;
|
||||
@ -98,7 +99,7 @@ pub mod zen;
|
||||
pub mod zsl;
|
||||
pub use self::{
|
||||
aci::Aci, adyen::Adyen, adyenplatform::Adyenplatform, airwallex::Airwallex,
|
||||
amazonpay::Amazonpay, authorizedotnet::Authorizedotnet, bambora::Bambora,
|
||||
amazonpay::Amazonpay, archipel::Archipel, authorizedotnet::Authorizedotnet, bambora::Bambora,
|
||||
bamboraapac::Bamboraapac, bankofamerica::Bankofamerica, billwerk::Billwerk, bitpay::Bitpay,
|
||||
bluesnap::Bluesnap, boku::Boku, braintree::Braintree, cashtocode::Cashtocode,
|
||||
chargebee::Chargebee, checkout::Checkout, coinbase::Coinbase, coingate::Coingate,
|
||||
|
||||
1071
crates/hyperswitch_connectors/src/connectors/archipel.rs
Normal file
1071
crates/hyperswitch_connectors/src/connectors/archipel.rs
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -122,6 +122,7 @@ default_imp_for_authorize_session_token!(
|
||||
connectors::Adyenplatform,
|
||||
connectors::Airwallex,
|
||||
connectors::Amazonpay,
|
||||
connectors::Archipel,
|
||||
connectors::Authorizedotnet,
|
||||
connectors::Bambora,
|
||||
connectors::Bamboraapac,
|
||||
@ -235,6 +236,7 @@ default_imp_for_calculate_tax!(
|
||||
connectors::Adyenplatform,
|
||||
connectors::Airwallex,
|
||||
connectors::Amazonpay,
|
||||
connectors::Archipel,
|
||||
connectors::Authorizedotnet,
|
||||
connectors::Bambora,
|
||||
connectors::Bamboraapac,
|
||||
@ -349,6 +351,7 @@ default_imp_for_session_update!(
|
||||
connectors::Adyenplatform,
|
||||
connectors::Airwallex,
|
||||
connectors::Amazonpay,
|
||||
connectors::Archipel,
|
||||
connectors::Authorizedotnet,
|
||||
connectors::Bambora,
|
||||
connectors::Bamboraapac,
|
||||
@ -463,6 +466,7 @@ default_imp_for_post_session_tokens!(
|
||||
connectors::Adyenplatform,
|
||||
connectors::Airwallex,
|
||||
connectors::Amazonpay,
|
||||
connectors::Archipel,
|
||||
connectors::Authorizedotnet,
|
||||
connectors::Bambora,
|
||||
connectors::Bamboraapac,
|
||||
@ -576,6 +580,7 @@ default_imp_for_update_metadata!(
|
||||
connectors::Adyenplatform,
|
||||
connectors::Airwallex,
|
||||
connectors::Amazonpay,
|
||||
connectors::Archipel,
|
||||
connectors::Authorizedotnet,
|
||||
connectors::Bambora,
|
||||
connectors::Bamboraapac,
|
||||
@ -693,6 +698,7 @@ default_imp_for_complete_authorize!(
|
||||
connectors::Adyen,
|
||||
connectors::Adyenplatform,
|
||||
connectors::Amazonpay,
|
||||
connectors::Archipel,
|
||||
connectors::Bamboraapac,
|
||||
connectors::Bankofamerica,
|
||||
connectors::Billwerk,
|
||||
@ -903,6 +909,7 @@ default_imp_for_create_customer!(
|
||||
connectors::Adyenplatform,
|
||||
connectors::Airwallex,
|
||||
connectors::Amazonpay,
|
||||
connectors::Archipel,
|
||||
connectors::Authorizedotnet,
|
||||
connectors::Bambora,
|
||||
connectors::Bamboraapac,
|
||||
@ -1017,6 +1024,7 @@ default_imp_for_connector_redirect_response!(
|
||||
connectors::Adyen,
|
||||
connectors::Adyenplatform,
|
||||
connectors::Amazonpay,
|
||||
connectors::Archipel,
|
||||
connectors::Billwerk,
|
||||
connectors::Bitpay,
|
||||
connectors::Bamboraapac,
|
||||
@ -1111,6 +1119,7 @@ default_imp_for_pre_processing_steps!(
|
||||
connectors::Aci,
|
||||
connectors::Adyenplatform,
|
||||
connectors::Amazonpay,
|
||||
connectors::Archipel,
|
||||
connectors::Authorizedotnet,
|
||||
connectors::Bambora,
|
||||
connectors::Bamboraapac,
|
||||
@ -1216,6 +1225,7 @@ default_imp_for_post_processing_steps!(
|
||||
connectors::Adyenplatform,
|
||||
connectors::Airwallex,
|
||||
connectors::Amazonpay,
|
||||
connectors::Archipel,
|
||||
connectors::Authorizedotnet,
|
||||
connectors::Bambora,
|
||||
connectors::Bamboraapac,
|
||||
@ -1331,6 +1341,7 @@ default_imp_for_approve!(
|
||||
connectors::Adyenplatform,
|
||||
connectors::Airwallex,
|
||||
connectors::Amazonpay,
|
||||
connectors::Archipel,
|
||||
connectors::Authorizedotnet,
|
||||
connectors::Bambora,
|
||||
connectors::Bamboraapac,
|
||||
@ -1447,6 +1458,7 @@ default_imp_for_reject!(
|
||||
connectors::Adyenplatform,
|
||||
connectors::Airwallex,
|
||||
connectors::Amazonpay,
|
||||
connectors::Archipel,
|
||||
connectors::Authorizedotnet,
|
||||
connectors::Bambora,
|
||||
connectors::Bamboraapac,
|
||||
@ -1563,6 +1575,7 @@ default_imp_for_webhook_source_verification!(
|
||||
connectors::Adyenplatform,
|
||||
connectors::Airwallex,
|
||||
connectors::Amazonpay,
|
||||
connectors::Archipel,
|
||||
connectors::Authorizedotnet,
|
||||
connectors::Bambora,
|
||||
connectors::Bamboraapac,
|
||||
@ -1678,6 +1691,7 @@ default_imp_for_accept_dispute!(
|
||||
connectors::Adyenplatform,
|
||||
connectors::Airwallex,
|
||||
connectors::Amazonpay,
|
||||
connectors::Archipel,
|
||||
connectors::Authorizedotnet,
|
||||
connectors::Bambora,
|
||||
connectors::Bamboraapac,
|
||||
@ -1792,6 +1806,7 @@ default_imp_for_submit_evidence!(
|
||||
connectors::Adyenplatform,
|
||||
connectors::Airwallex,
|
||||
connectors::Amazonpay,
|
||||
connectors::Archipel,
|
||||
connectors::Authorizedotnet,
|
||||
connectors::Bambora,
|
||||
connectors::Bamboraapac,
|
||||
@ -1906,6 +1921,7 @@ default_imp_for_defend_dispute!(
|
||||
connectors::Adyenplatform,
|
||||
connectors::Airwallex,
|
||||
connectors::Amazonpay,
|
||||
connectors::Archipel,
|
||||
connectors::Authorizedotnet,
|
||||
connectors::Bambora,
|
||||
connectors::Bamboraapac,
|
||||
@ -2029,6 +2045,7 @@ default_imp_for_file_upload!(
|
||||
connectors::Adyenplatform,
|
||||
connectors::Airwallex,
|
||||
connectors::Amazonpay,
|
||||
connectors::Archipel,
|
||||
connectors::Authorizedotnet,
|
||||
connectors::Bambora,
|
||||
connectors::Bamboraapac,
|
||||
@ -2135,6 +2152,7 @@ default_imp_for_payouts!(
|
||||
connectors::Aci,
|
||||
connectors::Airwallex,
|
||||
connectors::Amazonpay,
|
||||
connectors::Archipel,
|
||||
connectors::Authorizedotnet,
|
||||
connectors::Bambora,
|
||||
connectors::Bamboraapac,
|
||||
@ -2245,6 +2263,7 @@ default_imp_for_payouts_create!(
|
||||
connectors::Adyenplatform,
|
||||
connectors::Airwallex,
|
||||
connectors::Amazonpay,
|
||||
connectors::Archipel,
|
||||
connectors::Authorizedotnet,
|
||||
connectors::Bambora,
|
||||
connectors::Bamboraapac,
|
||||
@ -2359,6 +2378,7 @@ default_imp_for_payouts_retrieve!(
|
||||
connectors::Adyenplatform,
|
||||
connectors::Airwallex,
|
||||
connectors::Amazonpay,
|
||||
connectors::Archipel,
|
||||
connectors::Authorizedotnet,
|
||||
connectors::Bambora,
|
||||
connectors::Bamboraapac,
|
||||
@ -2474,6 +2494,7 @@ default_imp_for_payouts_eligibility!(
|
||||
connectors::Adyenplatform,
|
||||
connectors::Airwallex,
|
||||
connectors::Amazonpay,
|
||||
connectors::Archipel,
|
||||
connectors::Authorizedotnet,
|
||||
connectors::Bambora,
|
||||
connectors::Bamboraapac,
|
||||
@ -2587,6 +2608,7 @@ default_imp_for_payouts_fulfill!(
|
||||
connectors::Aci,
|
||||
connectors::Airwallex,
|
||||
connectors::Amazonpay,
|
||||
connectors::Archipel,
|
||||
connectors::Authorizedotnet,
|
||||
connectors::Bambora,
|
||||
connectors::Bamboraapac,
|
||||
@ -2698,6 +2720,7 @@ default_imp_for_payouts_cancel!(
|
||||
connectors::Adyenplatform,
|
||||
connectors::Airwallex,
|
||||
connectors::Amazonpay,
|
||||
connectors::Archipel,
|
||||
connectors::Authorizedotnet,
|
||||
connectors::Bambora,
|
||||
connectors::Bamboraapac,
|
||||
@ -2813,6 +2836,7 @@ default_imp_for_payouts_quote!(
|
||||
connectors::Adyenplatform,
|
||||
connectors::Airwallex,
|
||||
connectors::Amazonpay,
|
||||
connectors::Archipel,
|
||||
connectors::Authorizedotnet,
|
||||
connectors::Bambora,
|
||||
connectors::Bamboraapac,
|
||||
@ -2928,6 +2952,7 @@ default_imp_for_payouts_recipient!(
|
||||
connectors::Adyenplatform,
|
||||
connectors::Airwallex,
|
||||
connectors::Amazonpay,
|
||||
connectors::Archipel,
|
||||
connectors::Authorizedotnet,
|
||||
connectors::Bambora,
|
||||
connectors::Bamboraapac,
|
||||
@ -3043,6 +3068,7 @@ default_imp_for_payouts_recipient_account!(
|
||||
connectors::Adyenplatform,
|
||||
connectors::Airwallex,
|
||||
connectors::Amazonpay,
|
||||
connectors::Archipel,
|
||||
connectors::Authorizedotnet,
|
||||
connectors::Bambora,
|
||||
connectors::Bamboraapac,
|
||||
@ -3160,6 +3186,7 @@ default_imp_for_frm_sale!(
|
||||
connectors::Adyenplatform,
|
||||
connectors::Airwallex,
|
||||
connectors::Amazonpay,
|
||||
connectors::Archipel,
|
||||
connectors::Authorizedotnet,
|
||||
connectors::Bambora,
|
||||
connectors::Bamboraapac,
|
||||
@ -3276,6 +3303,7 @@ default_imp_for_frm_checkout!(
|
||||
connectors::Adyenplatform,
|
||||
connectors::Airwallex,
|
||||
connectors::Amazonpay,
|
||||
connectors::Archipel,
|
||||
connectors::Authorizedotnet,
|
||||
connectors::Bambora,
|
||||
connectors::Bamboraapac,
|
||||
@ -3392,6 +3420,7 @@ default_imp_for_frm_transaction!(
|
||||
connectors::Adyenplatform,
|
||||
connectors::Airwallex,
|
||||
connectors::Amazonpay,
|
||||
connectors::Archipel,
|
||||
connectors::Authorizedotnet,
|
||||
connectors::Bambora,
|
||||
connectors::Bamboraapac,
|
||||
@ -3508,6 +3537,7 @@ default_imp_for_frm_fulfillment!(
|
||||
connectors::Adyenplatform,
|
||||
connectors::Airwallex,
|
||||
connectors::Amazonpay,
|
||||
connectors::Archipel,
|
||||
connectors::Authorizedotnet,
|
||||
connectors::Bambora,
|
||||
connectors::Bamboraapac,
|
||||
@ -3624,6 +3654,7 @@ default_imp_for_frm_record_return!(
|
||||
connectors::Adyenplatform,
|
||||
connectors::Airwallex,
|
||||
connectors::Amazonpay,
|
||||
connectors::Archipel,
|
||||
connectors::Authorizedotnet,
|
||||
connectors::Bambora,
|
||||
connectors::Bamboraapac,
|
||||
@ -3737,6 +3768,7 @@ default_imp_for_revoking_mandates!(
|
||||
connectors::Adyenplatform,
|
||||
connectors::Airwallex,
|
||||
connectors::Amazonpay,
|
||||
connectors::Archipel,
|
||||
connectors::Authorizedotnet,
|
||||
connectors::Bambora,
|
||||
connectors::Bamboraapac,
|
||||
@ -3848,6 +3880,7 @@ default_imp_for_uas_pre_authentication!(
|
||||
connectors::Adyenplatform,
|
||||
connectors::Airwallex,
|
||||
connectors::Amazonpay,
|
||||
connectors::Archipel,
|
||||
connectors::Authorizedotnet,
|
||||
connectors::Bambora,
|
||||
connectors::Bamboraapac,
|
||||
@ -3961,6 +3994,7 @@ default_imp_for_uas_post_authentication!(
|
||||
connectors::Adyenplatform,
|
||||
connectors::Airwallex,
|
||||
connectors::Amazonpay,
|
||||
connectors::Archipel,
|
||||
connectors::Authorizedotnet,
|
||||
connectors::Bambora,
|
||||
connectors::Bamboraapac,
|
||||
@ -4075,6 +4109,7 @@ default_imp_for_uas_authentication_confirmation!(
|
||||
connectors::Adyenplatform,
|
||||
connectors::Airwallex,
|
||||
connectors::Amazonpay,
|
||||
connectors::Archipel,
|
||||
connectors::Authorizedotnet,
|
||||
connectors::Bambora,
|
||||
connectors::Bamboraapac,
|
||||
@ -4180,6 +4215,7 @@ default_imp_for_connector_request_id!(
|
||||
connectors::Adyen,
|
||||
connectors::Adyenplatform,
|
||||
connectors::Airwallex,
|
||||
connectors::Archipel,
|
||||
connectors::Authorizedotnet,
|
||||
connectors::Amazonpay,
|
||||
connectors::Bambora,
|
||||
@ -4289,6 +4325,7 @@ default_imp_for_fraud_check!(
|
||||
connectors::Adyenplatform,
|
||||
connectors::Airwallex,
|
||||
connectors::Amazonpay,
|
||||
connectors::Archipel,
|
||||
connectors::Authorizedotnet,
|
||||
connectors::Bambora,
|
||||
connectors::Bamboraapac,
|
||||
@ -4427,6 +4464,7 @@ default_imp_for_connector_authentication!(
|
||||
connectors::Adyenplatform,
|
||||
connectors::Airwallex,
|
||||
connectors::Amazonpay,
|
||||
connectors::Archipel,
|
||||
connectors::Authorizedotnet,
|
||||
connectors::Bambora,
|
||||
connectors::Bamboraapac,
|
||||
@ -4538,6 +4576,7 @@ default_imp_for_uas_authentication!(
|
||||
connectors::Adyenplatform,
|
||||
connectors::Airwallex,
|
||||
connectors::Amazonpay,
|
||||
connectors::Archipel,
|
||||
connectors::Authorizedotnet,
|
||||
connectors::Bambora,
|
||||
connectors::Bamboraapac,
|
||||
@ -4644,6 +4683,7 @@ default_imp_for_revenue_recovery! {
|
||||
connectors::Adyenplatform,
|
||||
connectors::Airwallex,
|
||||
connectors::Amazonpay,
|
||||
connectors::Archipel,
|
||||
connectors::Authorizedotnet,
|
||||
connectors::Bambora,
|
||||
connectors::Bamboraapac,
|
||||
@ -4761,6 +4801,7 @@ default_imp_for_billing_connector_payment_sync!(
|
||||
connectors::Adyenplatform,
|
||||
connectors::Airwallex,
|
||||
connectors::Amazonpay,
|
||||
connectors::Archipel,
|
||||
connectors::Authorizedotnet,
|
||||
connectors::Bambora,
|
||||
connectors::Bamboraapac,
|
||||
@ -4877,6 +4918,7 @@ default_imp_for_revenue_recovery_record_back!(
|
||||
connectors::Adyenplatform,
|
||||
connectors::Airwallex,
|
||||
connectors::Amazonpay,
|
||||
connectors::Archipel,
|
||||
connectors::Authorizedotnet,
|
||||
connectors::Bambora,
|
||||
connectors::Bamboraapac,
|
||||
@ -4991,6 +5033,7 @@ default_imp_for_billing_connector_invoice_sync!(
|
||||
connectors::Adyenplatform,
|
||||
connectors::Airwallex,
|
||||
connectors::Amazonpay,
|
||||
connectors::Archipel,
|
||||
connectors::Authorizedotnet,
|
||||
connectors::Bambora,
|
||||
connectors::Bamboraapac,
|
||||
|
||||
@ -1002,10 +1002,20 @@ impl AccessTokenRequestInfo for RefreshTokenRouterData {
|
||||
}
|
||||
pub trait ApplePayDecrypt {
|
||||
fn get_expiry_month(&self) -> Result<Secret<String>, Error>;
|
||||
fn get_two_digit_expiry_year(&self) -> Result<Secret<String>, Error>;
|
||||
fn get_four_digit_expiry_year(&self) -> Result<Secret<String>, Error>;
|
||||
}
|
||||
|
||||
impl ApplePayDecrypt for Box<ApplePayPredecryptData> {
|
||||
fn get_two_digit_expiry_year(&self) -> Result<Secret<String>, Error> {
|
||||
Ok(Secret::new(
|
||||
self.application_expiration_date
|
||||
.get(0..2)
|
||||
.ok_or(errors::ConnectorError::RequestEncodingFailed)?
|
||||
.to_string(),
|
||||
))
|
||||
}
|
||||
|
||||
fn get_four_digit_expiry_year(&self) -> Result<Secret<String>, Error> {
|
||||
Ok(Secret::new(format!(
|
||||
"20{}",
|
||||
|
||||
@ -17,6 +17,7 @@ pub struct Connectors {
|
||||
pub airwallex: ConnectorParams,
|
||||
pub amazonpay: ConnectorParams,
|
||||
pub applepay: ConnectorParams,
|
||||
pub archipel: ConnectorParams,
|
||||
pub authorizedotnet: ConnectorParams,
|
||||
pub bambora: ConnectorParams,
|
||||
pub bamboraapac: ConnectorParams,
|
||||
|
||||
@ -5,8 +5,8 @@ pub mod utils;
|
||||
|
||||
pub use hyperswitch_connectors::connectors::{
|
||||
aci, aci::Aci, adyen, adyen::Adyen, adyenplatform, adyenplatform::Adyenplatform, airwallex,
|
||||
airwallex::Airwallex, amazonpay, amazonpay::Amazonpay, authorizedotnet,
|
||||
authorizedotnet::Authorizedotnet, bambora, bambora::Bambora, bamboraapac,
|
||||
airwallex::Airwallex, amazonpay, amazonpay::Amazonpay, archipel, archipel::Archipel,
|
||||
authorizedotnet, authorizedotnet::Authorizedotnet, bambora, bambora::Bambora, bamboraapac,
|
||||
bamboraapac::Bamboraapac, bankofamerica, bankofamerica::Bankofamerica, billwerk,
|
||||
billwerk::Billwerk, bitpay, bitpay::Bitpay, bluesnap, bluesnap::Bluesnap, boku, boku::Boku,
|
||||
braintree, braintree::Braintree, cashtocode, cashtocode::Cashtocode, chargebee,
|
||||
|
||||
@ -1327,6 +1327,11 @@ impl ConnectorAuthTypeAndMetadataValidation<'_> {
|
||||
airwallex::transformers::AirwallexAuthType::try_from(self.auth_type)?;
|
||||
Ok(())
|
||||
}
|
||||
api_enums::Connector::Archipel => {
|
||||
archipel::transformers::ArchipelAuthType::try_from(self.auth_type)?;
|
||||
archipel::transformers::ArchipelConfigData::try_from(self.connector_meta_data)?;
|
||||
Ok(())
|
||||
}
|
||||
api_enums::Connector::Authorizedotnet => {
|
||||
authorizedotnet::transformers::AuthorizedotnetAuthType::try_from(self.auth_type)?;
|
||||
Ok(())
|
||||
|
||||
@ -303,6 +303,9 @@ impl ConnectorData {
|
||||
// enums::Connector::Amazonpay => {
|
||||
// Ok(ConnectorEnum::Old(Box::new(connector::Amazonpay)))
|
||||
// }
|
||||
enums::Connector::Archipel => {
|
||||
Ok(ConnectorEnum::Old(Box::new(connector::Archipel::new())))
|
||||
}
|
||||
enums::Connector::Authorizedotnet => {
|
||||
Ok(ConnectorEnum::Old(Box::new(&connector::Authorizedotnet)))
|
||||
}
|
||||
|
||||
@ -214,6 +214,7 @@ impl ForeignTryFrom<api_enums::Connector> for common_enums::RoutableConnectors {
|
||||
api_enums::Connector::Adyenplatform => Self::Adyenplatform,
|
||||
api_enums::Connector::Airwallex => Self::Airwallex,
|
||||
// api_enums::Connector::Amazonpay => Self::Amazonpay,
|
||||
api_enums::Connector::Archipel => Self::Archipel,
|
||||
api_enums::Connector::Authorizedotnet => Self::Authorizedotnet,
|
||||
api_enums::Connector::Bambora => Self::Bambora,
|
||||
api_enums::Connector::Bamboraapac => Self::Bamboraapac,
|
||||
|
||||
@ -13,6 +13,8 @@ api_secret = "Secondary key"
|
||||
[amazonpay]
|
||||
api_key="API Key"
|
||||
|
||||
[archipel]
|
||||
|
||||
[authorizedotnet]
|
||||
api_key = "MyMerchantName"
|
||||
key1 = "MyTransactionKey"
|
||||
|
||||
@ -18,6 +18,7 @@ pub struct ConnectorAuthentication {
|
||||
pub adyen_uk: Option<SignatureKey>,
|
||||
pub airwallex: Option<BodyKey>,
|
||||
pub amazonpay: Option<HeaderKey>,
|
||||
pub archipel: Option<NoKey>,
|
||||
pub authorizedotnet: Option<BodyKey>,
|
||||
pub bambora: Option<BodyKey>,
|
||||
pub bamboraapac: Option<HeaderKey>,
|
||||
@ -324,6 +325,9 @@ impl From<MultiAuthKey> for ConnectorAuthType {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Clone)]
|
||||
pub struct NoKey {}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Clone)]
|
||||
pub struct AutomationConfigs {
|
||||
pub hs_base_url: Option<String>,
|
||||
|
||||
383
cypress-tests/cypress/e2e/configs/Payment/Archipel.js
Normal file
383
cypress-tests/cypress/e2e/configs/Payment/Archipel.js
Normal file
@ -0,0 +1,383 @@
|
||||
import { customerAcceptance } from "./Commons.js";
|
||||
|
||||
const successfulNo3DSCardDetails = {
|
||||
card_number: "4242424242424242",
|
||||
card_exp_month: "01",
|
||||
card_exp_year: "50",
|
||||
card_holder_name: "joseph Doe",
|
||||
card_cvc: "123",
|
||||
};
|
||||
|
||||
const singleUseMandateData = {
|
||||
customer_acceptance: customerAcceptance,
|
||||
mandate_type: {
|
||||
single_use: {
|
||||
amount: 8000,
|
||||
currency: "USD",
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const connectorDetails = {
|
||||
card_pm: {
|
||||
PaymentIntent: {
|
||||
Request: {
|
||||
amount: 6000,
|
||||
currency: "USD",
|
||||
customer_acceptance: null,
|
||||
setup_future_usage: "on_session",
|
||||
},
|
||||
Response: {
|
||||
status: 200,
|
||||
body: {
|
||||
status: "requires_payment_method",
|
||||
setup_future_usage: "on_session",
|
||||
},
|
||||
},
|
||||
},
|
||||
PaymentIntentOffSession: {
|
||||
Request: {
|
||||
currency: "USD",
|
||||
billing: {
|
||||
address: {
|
||||
line1: "1467",
|
||||
line2: "CA",
|
||||
line3: "CA",
|
||||
city: "Florence",
|
||||
state: "Tuscany",
|
||||
zip: "12345",
|
||||
first_name: "Max",
|
||||
last_name: "Mustermann",
|
||||
},
|
||||
email: "mauro.morandi@nexi.it",
|
||||
phone: {
|
||||
number: "9123456789",
|
||||
country_code: "+91",
|
||||
},
|
||||
},
|
||||
},
|
||||
Response: {
|
||||
status: 200,
|
||||
body: {
|
||||
status: "requires_payment_method",
|
||||
},
|
||||
},
|
||||
},
|
||||
No3DSManualCapture: {
|
||||
Request: {
|
||||
amount: 6000,
|
||||
payment_method: "card",
|
||||
payment_method_data: {
|
||||
card: successfulNo3DSCardDetails,
|
||||
},
|
||||
currency: "USD",
|
||||
customer_acceptance: null,
|
||||
setup_future_usage: "on_session",
|
||||
},
|
||||
Response: {
|
||||
status: 200,
|
||||
body: {
|
||||
status: "requires_capture",
|
||||
},
|
||||
},
|
||||
},
|
||||
No3DSAutoCapture: {
|
||||
Request: {
|
||||
amount: 6000,
|
||||
payment_method: "card",
|
||||
payment_method_data: {
|
||||
card: successfulNo3DSCardDetails,
|
||||
},
|
||||
currency: "USD",
|
||||
customer_acceptance: null,
|
||||
setup_future_usage: "on_session",
|
||||
},
|
||||
Response: {
|
||||
status: 200,
|
||||
body: {
|
||||
status: "succeeded",
|
||||
},
|
||||
},
|
||||
},
|
||||
Capture: {
|
||||
Request: {
|
||||
amount_to_capture: 6000,
|
||||
},
|
||||
Response: {
|
||||
status: 200,
|
||||
body: {
|
||||
status: "succeeded",
|
||||
},
|
||||
},
|
||||
},
|
||||
PartialCapture: {
|
||||
Request: {
|
||||
amount_to_capture: 3000,
|
||||
},
|
||||
Response: {
|
||||
status: 200,
|
||||
body: {
|
||||
status: "partially_captured",
|
||||
amount: 6000,
|
||||
amount_capturable: 0,
|
||||
amount_received: 3000,
|
||||
},
|
||||
},
|
||||
},
|
||||
Void: {
|
||||
Request: {},
|
||||
Response: {
|
||||
status: 200,
|
||||
body: {
|
||||
status: "cancelled",
|
||||
},
|
||||
},
|
||||
},
|
||||
Refund: {
|
||||
Request: {
|
||||
amount: 6000,
|
||||
},
|
||||
Response: {
|
||||
status: 200,
|
||||
body: {
|
||||
status: "failed",
|
||||
},
|
||||
},
|
||||
},
|
||||
manualPaymentRefund: {
|
||||
Request: {
|
||||
amount: 6000,
|
||||
},
|
||||
Response: {
|
||||
status: 200,
|
||||
body: {
|
||||
status: "failed",
|
||||
},
|
||||
},
|
||||
},
|
||||
manualPaymentPartialRefund: {
|
||||
Request: {
|
||||
amount: 2000,
|
||||
},
|
||||
Response: {
|
||||
status: 200,
|
||||
body: {
|
||||
status: "failed",
|
||||
},
|
||||
},
|
||||
},
|
||||
PartialRefund: {
|
||||
Request: {
|
||||
amount: 2000,
|
||||
},
|
||||
Response: {
|
||||
status: 200,
|
||||
body: {
|
||||
status: "failed",
|
||||
},
|
||||
},
|
||||
},
|
||||
SyncRefund: {
|
||||
Response: {
|
||||
status: 200,
|
||||
body: {
|
||||
status: "failed",
|
||||
},
|
||||
},
|
||||
},
|
||||
IncrementalAuth: {
|
||||
Request: {
|
||||
amount: 7000,
|
||||
},
|
||||
Response: {
|
||||
status: 200,
|
||||
body: {
|
||||
status: "requires_capture",
|
||||
amount: 7000,
|
||||
amount_capturable: 7000,
|
||||
amount_received: null,
|
||||
},
|
||||
},
|
||||
},
|
||||
ZeroAuthMandate: {
|
||||
Request: {
|
||||
payment_method: "card",
|
||||
payment_method_data: {
|
||||
card: successfulNo3DSCardDetails,
|
||||
},
|
||||
currency: "USD",
|
||||
mandate_data: singleUseMandateData,
|
||||
},
|
||||
Response: {
|
||||
status: 200,
|
||||
body: {
|
||||
status: "succeeded",
|
||||
},
|
||||
},
|
||||
},
|
||||
ZeroAuthPaymentIntent: {
|
||||
Request: {
|
||||
amount: 0,
|
||||
setup_future_usage: "off_session",
|
||||
currency: "USD",
|
||||
},
|
||||
Response: {
|
||||
status: 200,
|
||||
body: {
|
||||
status: "requires_payment_method",
|
||||
setup_future_usage: "off_session",
|
||||
},
|
||||
},
|
||||
},
|
||||
ZeroAuthConfirmPayment: {
|
||||
Request: {
|
||||
payment_type: "setup_mandate",
|
||||
payment_method: "card",
|
||||
payment_method_type: "credit",
|
||||
payment_method_data: {
|
||||
card: successfulNo3DSCardDetails,
|
||||
},
|
||||
},
|
||||
Response: {
|
||||
status: 200,
|
||||
body: {
|
||||
status: "succeeded",
|
||||
setup_future_usage: "off_session",
|
||||
},
|
||||
},
|
||||
},
|
||||
SaveCardUseNo3DSAutoCapture: {
|
||||
Request: {
|
||||
payment_method: "card",
|
||||
payment_method_type: "debit",
|
||||
payment_method_data: {
|
||||
card: successfulNo3DSCardDetails,
|
||||
},
|
||||
currency: "USD",
|
||||
setup_future_usage: "on_session",
|
||||
customer_acceptance: customerAcceptance,
|
||||
},
|
||||
Response: {
|
||||
status: 200,
|
||||
body: {
|
||||
status: "succeeded",
|
||||
},
|
||||
},
|
||||
},
|
||||
SaveCardConfirmAutoCaptureOffSession: {
|
||||
Request: {},
|
||||
Response: {
|
||||
status: 200,
|
||||
body: {
|
||||
status: "succeeded",
|
||||
},
|
||||
},
|
||||
},
|
||||
SaveCardUseNo3DSAutoCaptureOffSession: {
|
||||
Request: {
|
||||
setup_future_usage: "off_session",
|
||||
payment_method: "card",
|
||||
payment_method_data: {
|
||||
card: successfulNo3DSCardDetails,
|
||||
},
|
||||
currency: "USD",
|
||||
customer_acceptance: customerAcceptance,
|
||||
},
|
||||
Response: {
|
||||
status: 200,
|
||||
body: {
|
||||
status: "succeeded",
|
||||
},
|
||||
},
|
||||
},
|
||||
SaveCardUseNo3DSManualCaptureOffSession: {
|
||||
Request: {
|
||||
setup_future_usage: "off_session",
|
||||
payment_method: "card",
|
||||
payment_method_data: {
|
||||
card: successfulNo3DSCardDetails,
|
||||
},
|
||||
currency: "USD",
|
||||
customer_acceptance: customerAcceptance,
|
||||
},
|
||||
Response: {
|
||||
status: 200,
|
||||
body: {
|
||||
status: "requires_capture",
|
||||
},
|
||||
},
|
||||
},
|
||||
SaveCardConfirmAutoCaptureOffSessionWithoutBilling: {
|
||||
Request: {
|
||||
setup_future_usage: "off_session",
|
||||
},
|
||||
Response: {
|
||||
status: 400,
|
||||
body: {
|
||||
error: {
|
||||
type: "invalid_request",
|
||||
message:
|
||||
"No eligible connector was found for the current payment method configuration",
|
||||
code: "IR_39",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
SaveCardUseNo3DSManualCapture: {
|
||||
Request: {
|
||||
payment_method: "card",
|
||||
payment_method_data: {
|
||||
card: successfulNo3DSCardDetails,
|
||||
},
|
||||
currency: "USD",
|
||||
setup_future_usage: "on_session",
|
||||
customer_acceptance: customerAcceptance,
|
||||
},
|
||||
Response: {
|
||||
status: 200,
|
||||
body: {
|
||||
status: "requires_capture",
|
||||
},
|
||||
},
|
||||
},
|
||||
PaymentIntentWithShippingCost: {
|
||||
Request: {
|
||||
currency: "USD",
|
||||
amount: 6500,
|
||||
shipping_cost: 50,
|
||||
},
|
||||
Response: {
|
||||
status: 200,
|
||||
body: {
|
||||
status: "requires_payment_method",
|
||||
shipping_cost: 50,
|
||||
amount: 6500,
|
||||
net_amount: 6550,
|
||||
amount_capturable: 6550,
|
||||
},
|
||||
},
|
||||
},
|
||||
PaymentConfirmWithShippingCost: {
|
||||
Request: {
|
||||
amount: 6500,
|
||||
shipping_cost: 50,
|
||||
payment_method: "card",
|
||||
payment_method_data: {
|
||||
card: successfulNo3DSCardDetails,
|
||||
},
|
||||
customer_acceptance: null,
|
||||
setup_future_usage: "on_session",
|
||||
},
|
||||
Response: {
|
||||
status: 200,
|
||||
body: {
|
||||
status: "succeeded",
|
||||
shipping_cost: 50,
|
||||
amount_received: 6550,
|
||||
amount: 6500,
|
||||
net_amount: 6550,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
@ -1,5 +1,6 @@
|
||||
// This file is the default. To override, add to connector.js
|
||||
import { getCustomExchange } from "./Modifiers";
|
||||
import State from "../../../utils/State.js";
|
||||
|
||||
export const customerAcceptance = {
|
||||
acceptance_type: "offline",
|
||||
@ -10,6 +11,47 @@ export const customerAcceptance = {
|
||||
},
|
||||
};
|
||||
|
||||
const globalState = new State({
|
||||
connectorId: Cypress.env("CONNECTOR"),
|
||||
baseUrl: Cypress.env("BASEURL"),
|
||||
adminApiKey: Cypress.env("ADMINAPIKEY"),
|
||||
connectorAuthFilePath: Cypress.env("CONNECTOR_AUTH_FILE_PATH"),
|
||||
});
|
||||
|
||||
const connectorName = normalize(globalState.get("connectorId"));
|
||||
|
||||
function normalize(input) {
|
||||
const exceptions = {
|
||||
bankofamerica: "Bank of America",
|
||||
cybersource: "Cybersource",
|
||||
paybox: "Paybox",
|
||||
paypal: "Paypal",
|
||||
wellsfargo: "Wellsfargo",
|
||||
fiuu: "Fiuu",
|
||||
noon: "Noon",
|
||||
archipel: "Archipel",
|
||||
// Add more known exceptions here
|
||||
};
|
||||
|
||||
if (typeof input !== "string") {
|
||||
const specName = Cypress.spec.name;
|
||||
|
||||
if (specName.includes("-")) {
|
||||
const parts = specName.split("-");
|
||||
|
||||
if (parts.length > 1 && parts[1].includes(".")) {
|
||||
return parts[1].split(".")[0];
|
||||
}
|
||||
}
|
||||
|
||||
// Fallback
|
||||
return `${specName}`;
|
||||
}
|
||||
|
||||
const lowerCaseInput = input.toLowerCase();
|
||||
return exceptions[lowerCaseInput] || input;
|
||||
}
|
||||
|
||||
const successfulNo3DSCardDetails = {
|
||||
card_number: "4111111111111111",
|
||||
card_exp_month: "08",
|
||||
|
||||
@ -18,6 +18,7 @@ function normalize(input) {
|
||||
paypal: "Paypal",
|
||||
wellsfargo: "Wellsfargo",
|
||||
noon: "Noon",
|
||||
archipel: "Archipel",
|
||||
// Add more known exceptions here
|
||||
};
|
||||
|
||||
|
||||
@ -33,6 +33,7 @@ import { connectorDetails as trustpayConnectorDetails } from "./Trustpay.js";
|
||||
import { connectorDetails as wellsfargoConnectorDetails } from "./WellsFargo.js";
|
||||
import { connectorDetails as worldpayConnectorDetails } from "./WorldPay.js";
|
||||
import { connectorDetails as xenditConnectorDetails } from "./Xendit.js";
|
||||
import { connectorDetails as archipelConnectorDetails } from "./Archipel.js";
|
||||
|
||||
const connectorDetails = {
|
||||
adyen: adyenConnectorDetails,
|
||||
@ -66,6 +67,7 @@ const connectorDetails = {
|
||||
wellsfargo: wellsfargoConnectorDetails,
|
||||
worldpay: worldpayConnectorDetails,
|
||||
xendit: xenditConnectorDetails,
|
||||
archipel: archipelConnectorDetails,
|
||||
};
|
||||
|
||||
export default function getConnectorDetails(connectorId) {
|
||||
|
||||
@ -18,9 +18,9 @@
|
||||
"first_name": "john",
|
||||
"last_name": "doe",
|
||||
"zip": "10001",
|
||||
"line1": "123 Main Street Apt 4B",
|
||||
"line2": "123 Main Street Apt 4B",
|
||||
"line3": "123 Main Street Apt 4B"
|
||||
"line1": "123",
|
||||
"line2": "Main Street",
|
||||
"line3": "Apt 4B"
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@ -824,6 +824,18 @@ Cypress.Commands.add(
|
||||
updateConnectorBody.connector_type = connectorType;
|
||||
updateConnectorBody.connector_label = connectorLabel;
|
||||
|
||||
cy.readFile(globalState.get("connectorAuthFilePath")).then(
|
||||
(jsonContent) => {
|
||||
const { authDetails } = getValueByKey(
|
||||
JSON.stringify(jsonContent),
|
||||
connector_id
|
||||
);
|
||||
if (authDetails && authDetails.metadata) {
|
||||
updateConnectorBody.metadata = {
|
||||
...updateConnectorBody.metadata, // Preserve existing metadata
|
||||
...authDetails.metadata,
|
||||
};
|
||||
}
|
||||
cy.request({
|
||||
method: "POST",
|
||||
url: url,
|
||||
@ -837,9 +849,10 @@ Cypress.Commands.add(
|
||||
failOnStatusCode: false,
|
||||
}).then((response) => {
|
||||
logRequestId(response.headers["x-request-id"]);
|
||||
|
||||
cy.wrap(response).then(() => {
|
||||
expect(response.headers["content-type"]).to.include("application/json");
|
||||
expect(response.headers["content-type"]).to.include(
|
||||
"application/json"
|
||||
);
|
||||
expect(response.body.connector_name).to.equal(connector_id);
|
||||
expect(response.body.merchant_connector_id).to.equal(
|
||||
merchant_connector_id
|
||||
@ -849,6 +862,8 @@ Cypress.Commands.add(
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
// Generic function to list all connectors
|
||||
Cypress.Commands.add("connectorListByMid", (globalState) => {
|
||||
@ -2611,6 +2626,7 @@ Cypress.Commands.add(
|
||||
}
|
||||
} else if (response.body.authentication_type === "no_three_ds") {
|
||||
for (const key in resData.body) {
|
||||
|
||||
expect(resData.body[key], [key]).to.deep.equal(
|
||||
response.body[key]
|
||||
);
|
||||
|
||||
@ -81,6 +81,7 @@ adyen.dispute_base_url = "https://ca-test.adyen.com/"
|
||||
airwallex.base_url = "https://api-demo.airwallex.com/"
|
||||
amazonpay.base_url = "https://pay-api.amazon.com/v2"
|
||||
applepay.base_url = "https://apple-pay-gateway.apple.com/"
|
||||
archipel.base_url = "https://{{merchant_endpoint_prefix}}/ArchiPEL/Transaction/v1"
|
||||
authorizedotnet.base_url = "https://apitest.authorize.net/xml/v1/request.api"
|
||||
bambora.base_url = "https://api.na.bambora.com"
|
||||
bamboraapac.base_url = "https://demo.ippayments.com.au/interface/api"
|
||||
@ -203,6 +204,7 @@ cards = [
|
||||
"adyenplatform",
|
||||
"airwallex",
|
||||
"amazonpay",
|
||||
"archipel",
|
||||
"authorizedotnet",
|
||||
"bambora",
|
||||
"bamboraapac",
|
||||
@ -600,7 +602,7 @@ card.credit = { connector_list = "cybersource" }
|
||||
card.debit = { connector_list = "cybersource" }
|
||||
|
||||
[network_transaction_id_supported_connectors]
|
||||
connector_list = "adyen,cybersource,novalnet,stripe,worldpay"
|
||||
connector_list = "adyen,archipel,cybersource,novalnet,stripe,worldpay"
|
||||
|
||||
[analytics]
|
||||
source = "sqlx"
|
||||
|
||||
22
postman/collection-dir/archipel/.auth.json
Normal file
22
postman/collection-dir/archipel/.auth.json
Normal file
@ -0,0 +1,22 @@
|
||||
{
|
||||
"auth": {
|
||||
"type": "apikey",
|
||||
"apikey": [
|
||||
{
|
||||
"key": "value",
|
||||
"value": "{{api_key}}",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"key": "key",
|
||||
"value": "api-key",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"key": "in",
|
||||
"value": "header",
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
6
postman/collection-dir/archipel/.event.meta.json
Normal file
6
postman/collection-dir/archipel/.event.meta.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"eventOrder": [
|
||||
"event.prerequest.js",
|
||||
"event.test.js"
|
||||
]
|
||||
}
|
||||
9
postman/collection-dir/archipel/.info.json
Normal file
9
postman/collection-dir/archipel/.info.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"info": {
|
||||
"_postman_id": "c505d595-99e0-4cd0-b384-f47fbbd0c560",
|
||||
"name": "archipel",
|
||||
"description": "## Get started\n\nJuspay Router provides a collection of APIs that enable you to process and manage payments. Our APIs accept and return JSON in the HTTP body, and return standard HTTP response codes. \nYou can consume the APIs directly using your favorite HTTP/REST library. \nWe have a testing environment referred to \"sandbox\", which you can setup to test API calls without affecting production data.\n\n### Base URLs\n\nUse the following base URLs when making requests to the APIs:\n\n| Environment | Base URL |\n| --- | --- |\n| Sandbox | [https://sandbox.hyperswitch.io](https://sandbox.hyperswitch.io) |\n| Production | [https://router.juspay.io](https://router.juspay.io) |\n\n# Authentication\n\nWhen you sign up for an account, you are given a secret key (also referred as api-key). You may authenticate all API requests with Juspay server by providing the appropriate key in the request Authorization header. \nNever share your secret api keys. Keep them guarded and secure.\n\nContact Support: \nName: Juspay Support \nEmail: [support@juspay.in](mailto:support@juspay.in)",
|
||||
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
|
||||
"_exporter_id": "37912341"
|
||||
}
|
||||
}
|
||||
6
postman/collection-dir/archipel/.meta.json
Normal file
6
postman/collection-dir/archipel/.meta.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"childrenOrder": [
|
||||
"Health check",
|
||||
"Flow Testcases"
|
||||
]
|
||||
}
|
||||
88
postman/collection-dir/archipel/.variable.json
Normal file
88
postman/collection-dir/archipel/.variable.json
Normal file
@ -0,0 +1,88 @@
|
||||
{
|
||||
"variable": [
|
||||
{
|
||||
"key": "baseUrl",
|
||||
"value": "",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"key": "admin_api_key",
|
||||
"value": "",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"key": "organization_id",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"key": "merchant_id",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"key": "profile_id",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"key": "api_key",
|
||||
"value": "",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"key": "api_key_id",
|
||||
"value": "",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"key": "publishable_key",
|
||||
"value": "",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"key": "client_secret",
|
||||
"value": "",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"key": "archipel_tenant_id",
|
||||
"value": "",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"key": "archipel_platform_url",
|
||||
"value": "",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"key": "merchant_connector_id",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"key": "payment_id",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"key": "customer_id",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"key": "mandate_id",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"key": "refund_id",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"key": "payment_token",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"key": "connector_transaction_id",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"key": "archipel_transaction_uuid",
|
||||
"value": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
{
|
||||
"childrenOrder": [
|
||||
"QuickStart",
|
||||
"Happy Cases",
|
||||
"Negative Cases"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
{
|
||||
"childrenOrder": [
|
||||
"Scenario1-Create payment with confirm true",
|
||||
"Scenario2-Create payment with confirm false",
|
||||
"Scenario3a-Create payment with Manual capture",
|
||||
"Scenario3b-Create payment with partial capture",
|
||||
"Scenario3c-Create payment with confirm false and manual capture",
|
||||
"Scenario4-Zero auth mandates",
|
||||
"Scenario5-Create a mandate and recurring payment",
|
||||
"Scenario6-Saved card flow",
|
||||
"Scenario8a-Incremental authorization",
|
||||
"Scenario8b-Incremental authorization with partial capture",
|
||||
"Scenario9a-Refund full payment",
|
||||
"Scenario9b-Refund partial payment",
|
||||
"Scenario9c-Refund full incremented payment",
|
||||
"Scenario10-Create 3DS payment"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
{
|
||||
"childrenOrder": [
|
||||
"Payments - Create",
|
||||
"Payments - Retrieve",
|
||||
"Payments - Retrieve payment attempt"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,5 @@
|
||||
{
|
||||
"eventOrder": [
|
||||
"event.test.js"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,66 @@
|
||||
// Validate status 2xx
|
||||
pm.test("[POST]::/payments - Status code is 2xx", function () {
|
||||
pm.response.to.be.success;
|
||||
});
|
||||
|
||||
// Validate if response header has matching content-type
|
||||
pm.test("[POST]::/payments - Content-Type is application/json", function () {
|
||||
pm.expect(pm.response.headers.get("Content-Type")).to.include(
|
||||
"application/json",
|
||||
);
|
||||
});
|
||||
|
||||
// Validate if response has JSON Body
|
||||
pm.test("[POST]::/payments - Response has JSON Body", function () {
|
||||
pm.response.to.have.jsonBody();
|
||||
});
|
||||
|
||||
// Set response object as internal variable
|
||||
let jsonData = {};
|
||||
try {
|
||||
jsonData = pm.response.json();
|
||||
} catch (e) { }
|
||||
|
||||
// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
|
||||
if (jsonData?.payment_id) {
|
||||
pm.collectionVariables.set("payment_id", jsonData.payment_id);
|
||||
console.log(
|
||||
"- use {{payment_id}} as collection variable for value",
|
||||
jsonData.payment_id,
|
||||
);
|
||||
} else {
|
||||
console.log(
|
||||
"INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.",
|
||||
);
|
||||
}
|
||||
|
||||
// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
|
||||
if (jsonData?.client_secret) {
|
||||
pm.collectionVariables.set("client_secret", jsonData.client_secret);
|
||||
console.log(
|
||||
"- use {{client_secret}} as collection variable for value",
|
||||
jsonData.client_secret,
|
||||
);
|
||||
} else {
|
||||
console.log(
|
||||
"INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.",
|
||||
);
|
||||
}
|
||||
|
||||
// Response body should have value "succeeded" for "status"
|
||||
pm.test(
|
||||
"[POST]::/payments - Content check if value for 'status' matches 'succeeded'",
|
||||
function () {
|
||||
pm.expect(jsonData.status).to.eql("succeeded");
|
||||
},
|
||||
);
|
||||
|
||||
// Response body should have "connector_transaction_id"
|
||||
pm.test(
|
||||
"[POST]::/payments - Content check if 'connector_transaction_id' exists",
|
||||
function () {
|
||||
pm.expect(typeof jsonData.connector_transaction_id !== "undefined").to.be
|
||||
.true;
|
||||
pm.collectionVariables.set("connector_transaction_id", jsonData.connector_transaction_id)
|
||||
},
|
||||
);
|
||||
@ -0,0 +1,90 @@
|
||||
{
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Content-Type",
|
||||
"value": "application/json"
|
||||
},
|
||||
{
|
||||
"key": "Accept",
|
||||
"value": "application/json"
|
||||
}
|
||||
],
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
},
|
||||
"raw_json_formatted": {
|
||||
"amount": 500,
|
||||
"amount_to_capture": 500,
|
||||
"currency": "EUR",
|
||||
"confirm": true,
|
||||
"capture_method": "automatic",
|
||||
"authentication_type": "no_three_ds",
|
||||
"payment_method": "card",
|
||||
"payment_method_type": "credit",
|
||||
"payment_method_data": {
|
||||
"card": {
|
||||
"card_cvc": "123",
|
||||
"card_exp_month": "01",
|
||||
"card_exp_year": "50",
|
||||
"card_holder_name": "John Doe",
|
||||
"card_number": "5185570141917102"
|
||||
}
|
||||
},
|
||||
"profile_id": "{{profile_id}}",
|
||||
"email": "john_doe@gmail.com",
|
||||
"name": "John Doe",
|
||||
"phone": "8056594427",
|
||||
"phone_country_code": "+91",
|
||||
"description": "{{$randomLoremSentence}}",
|
||||
"billing": {
|
||||
"address": {
|
||||
"line1": "2 ter",
|
||||
"line2": "rue du château",
|
||||
"line3": "",
|
||||
"city": "Neuilly-sur-Seine",
|
||||
"state": "France",
|
||||
"zip": "92200",
|
||||
"country": "FR"
|
||||
},
|
||||
"phone": {
|
||||
"number": "8056594427",
|
||||
"country_code": "+91"
|
||||
}
|
||||
},
|
||||
"shipping": {
|
||||
"address": {
|
||||
"line1": "1467",
|
||||
"line2": "Harrison Street",
|
||||
"line3": "Harrison Street",
|
||||
"city": "San Fransico",
|
||||
"state": "California",
|
||||
"zip": "94122",
|
||||
"country": "US",
|
||||
"first_name": "joseph",
|
||||
"last_name": "Doe"
|
||||
},
|
||||
"phone": {
|
||||
"number": "8056594427",
|
||||
"country_code": "+91"
|
||||
}
|
||||
},
|
||||
"statement_descriptor_name": "Joseph Doe",
|
||||
"statement_descriptor_suffix": "JS"
|
||||
}
|
||||
},
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/payments",
|
||||
"host": [
|
||||
"{{baseUrl}}"
|
||||
],
|
||||
"path": [
|
||||
"payments"
|
||||
]
|
||||
},
|
||||
"description": "To process a payment you will have to create a payment, attach a payment method and confirm. Depending on the user journey you wish to achieve, you may opt to all the steps in a single request or in a sequence of API request using following APIs: (i) Payments - Update, (ii) Payments - Confirm, and (iii) Payments - Capture"
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
[]
|
||||
@ -0,0 +1,5 @@
|
||||
{
|
||||
"eventOrder": [
|
||||
"event.test.js"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,85 @@
|
||||
// Validate status 2xx
|
||||
pm.test("[GET]::/payments/:id - Status code is 2xx", function () {
|
||||
pm.response.to.be.success;
|
||||
});
|
||||
|
||||
// Validate if response header has matching content-type
|
||||
pm.test("[GET]::/payments/:id - Content-Type is application/json", function () {
|
||||
pm.expect(pm.response.headers.get("Content-Type")).to.include(
|
||||
"application/json",
|
||||
);
|
||||
});
|
||||
|
||||
// Validate if response has JSON Body
|
||||
pm.test("[GET]::/payments/:id - Response has JSON Body", function () {
|
||||
pm.response.to.have.jsonBody();
|
||||
});
|
||||
|
||||
// Set response object as internal variable
|
||||
let jsonData = {};
|
||||
try {
|
||||
jsonData = pm.response.json();
|
||||
} catch (e) {}
|
||||
|
||||
// Response body should have value "Succeeded" for "status"
|
||||
pm.test(
|
||||
"[POST]::/payments/:id - Content check if value for 'status' matches 'succeeded'",
|
||||
function () {
|
||||
pm.expect(jsonData.status).to.eql("succeeded");
|
||||
},
|
||||
);
|
||||
|
||||
// Response body should have "connector_transaction_id"
|
||||
pm.test(
|
||||
"[POST]::/payments - Content check if 'connector_transaction_id' exists",
|
||||
function () {
|
||||
pm.expect(jsonData.connector_transaction_id).to.be.equal(
|
||||
pm.collectionVariables.get("connector_transaction_id")
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
let payment_attempt = {}
|
||||
|
||||
pm.test(
|
||||
"[POST]::/payments - Payment has one 'Payment Attempt'",
|
||||
function () {
|
||||
pm.expect(jsonData.attempts.length).to.be.equal(1);
|
||||
payment_attempt = jsonData.attempts[0]
|
||||
},
|
||||
);
|
||||
|
||||
pm.test(
|
||||
"[POST]::/payments - Payment Attempt has 'charged' status",
|
||||
function () {
|
||||
pm.expect(payment_attempt.status).to.be.equal("charged");
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
pm.test(
|
||||
"[POST]::/payments - Payment Attempt has 'connector_transaction_id'",
|
||||
function () {
|
||||
pm.expect(jsonData.connector_transaction_id).to.be.equal(
|
||||
pm.collectionVariables.get("connector_transaction_id")
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
pm.test(
|
||||
"[POST]::/payments - Archiepl response 'transactionId' is updated and not null",
|
||||
function () {
|
||||
pm.expect(payment_attempt.connector_metadata.transactionId).not.null
|
||||
pm.expect(payment_attempt.connector_metadata.transactionId).to.not.equal(
|
||||
pm.collectionVariables.get("archipel_transaction_uuid")
|
||||
)
|
||||
pm.collectionVariables.set("archipel_transaction_uuid", payment_attempt.connector_metadata.transactionId)
|
||||
},
|
||||
);
|
||||
|
||||
pm.test(
|
||||
"[POST]::/payments - Payment Attempt has no error",
|
||||
function () {
|
||||
pm.expect(payment_attempt.error_message).to.be.null;
|
||||
},
|
||||
);
|
||||
@ -0,0 +1,33 @@
|
||||
{
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Accept",
|
||||
"value": "application/json"
|
||||
}
|
||||
],
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/payments/:id?expand_attempts=true",
|
||||
"host": [
|
||||
"{{baseUrl}}"
|
||||
],
|
||||
"path": [
|
||||
"payments",
|
||||
":id"
|
||||
],
|
||||
"query": [
|
||||
{
|
||||
"key": "expand_attempts",
|
||||
"value": "true"
|
||||
}
|
||||
],
|
||||
"variable": [
|
||||
{
|
||||
"key": "id",
|
||||
"value": "{{payment_id}}",
|
||||
"description": "(Required) unique payment id"
|
||||
}
|
||||
]
|
||||
},
|
||||
"description": "To retrieve the properties of a Payment. This may be used to get the status of a previously initiated payment or next action for an ongoing payment"
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
[]
|
||||
@ -0,0 +1,5 @@
|
||||
{
|
||||
"eventOrder": [
|
||||
"event.test.js"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,69 @@
|
||||
|
||||
// Validate status 2xx
|
||||
pm.test("[GET]::/payments/:id - Status code is 2xx", function () {
|
||||
pm.response.to.be.success;
|
||||
});
|
||||
|
||||
// Validate if response header has matching content-type
|
||||
pm.test("[GET]::/payments/:id - Content-Type is application/json", function () {
|
||||
pm.expect(pm.response.headers.get("Content-Type")).to.include(
|
||||
"application/json",
|
||||
);
|
||||
});
|
||||
|
||||
// Validate if response has JSON Body
|
||||
pm.test("[GET]::/payments/:id - Response has JSON Body", function () {
|
||||
pm.response.to.have.jsonBody();
|
||||
});
|
||||
|
||||
// Set response object as internal variable
|
||||
let jsonData = {};
|
||||
try {
|
||||
jsonData = pm.response.json();
|
||||
} catch (e) {}
|
||||
|
||||
// Response body should have value "Succeeded" for "status"
|
||||
pm.test(
|
||||
"[POST]::/payments/:id - Content check if value for 'status' matches 'succeeded'",
|
||||
function () {
|
||||
pm.expect(jsonData.status).to.eql("succeeded");
|
||||
},
|
||||
);
|
||||
|
||||
pm.test(
|
||||
"[POST]::/payments/:id - Content check if value for 'amount' equal 500",
|
||||
function () {
|
||||
pm.expect(jsonData.amount).to.eql(500);
|
||||
},
|
||||
);
|
||||
|
||||
pm.test(
|
||||
"[POST]::/payments/:id - Content check if value for 'net_amount' equal 500",
|
||||
function () {
|
||||
pm.expect(jsonData.net_amount).to.eql(500);
|
||||
},
|
||||
);
|
||||
|
||||
pm.test(
|
||||
"[POST]::/payments/:id - Content check if value for 'amount_capturable' equal 0",
|
||||
function () {
|
||||
pm.expect(jsonData.amount_capturable).to.eql(0);
|
||||
},
|
||||
);
|
||||
|
||||
pm.test(
|
||||
"[POST]::/payments/:id - Content check if value for 'amount_received' equal 500",
|
||||
function () {
|
||||
pm.expect(jsonData.amount_received).to.eql(500);
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
// Response body should have "connector_transaction_id"
|
||||
pm.test(
|
||||
"[POST]::/payments - Content check if 'connector_transaction_id' exists",
|
||||
function () {
|
||||
pm.expect(typeof jsonData.connector_transaction_id !== "undefined").to.be
|
||||
.true;
|
||||
},
|
||||
);
|
||||
@ -0,0 +1,33 @@
|
||||
{
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Accept",
|
||||
"value": "application/json"
|
||||
}
|
||||
],
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/payments/:id?force_sync=true",
|
||||
"host": [
|
||||
"{{baseUrl}}"
|
||||
],
|
||||
"path": [
|
||||
"payments",
|
||||
":id"
|
||||
],
|
||||
"query": [
|
||||
{
|
||||
"key": "force_sync",
|
||||
"value": "true"
|
||||
}
|
||||
],
|
||||
"variable": [
|
||||
{
|
||||
"key": "id",
|
||||
"value": "{{payment_id}}",
|
||||
"description": "(Required) unique payment id"
|
||||
}
|
||||
]
|
||||
},
|
||||
"description": "To retrieve the properties of a Payment. This may be used to get the status of a previously initiated payment or next action for an ongoing payment"
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
[]
|
||||
@ -0,0 +1,9 @@
|
||||
{
|
||||
"childrenOrder": [
|
||||
"Payments - Create",
|
||||
"Payments - Confirm",
|
||||
"Payments - External 3ds authentication",
|
||||
"Payments - Authorize request intent",
|
||||
"Payments - Retrieve after confirm"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,5 @@
|
||||
{
|
||||
"eventOrder": [
|
||||
"event.test.js"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,4 @@
|
||||
// Validate status 2xx
|
||||
pm.test("[GET]::/payments/:id - Status code is 2xx", function () {
|
||||
pm.response.to.be.success;
|
||||
});
|
||||
@ -0,0 +1,23 @@
|
||||
{
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Accept",
|
||||
"value": "application/json"
|
||||
}
|
||||
],
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/payments/{{payment_id}}/{{merchant_id}}/authorize/archipel",
|
||||
"host": [
|
||||
"{{baseUrl}}"
|
||||
],
|
||||
"path": [
|
||||
"payments",
|
||||
"{{payment_id}}",
|
||||
"{{merchant_id}}",
|
||||
"authorize",
|
||||
"archipel"
|
||||
]
|
||||
},
|
||||
"description": "To retrieve the properties of a Payment. This may be used to get the status of a previously initiated payment or next action for an ongoing payment"
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
[]
|
||||
@ -0,0 +1,6 @@
|
||||
{
|
||||
"eventOrder": [
|
||||
"event.test.js",
|
||||
"event.prerequest.js"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,49 @@
|
||||
// Validate status 2xx
|
||||
pm.test("[POST]::/payments/:id/confirm - Status code is 2xx", function () {
|
||||
pm.response.to.be.success;
|
||||
});
|
||||
|
||||
// Validate if response header has matching content-type
|
||||
pm.test(
|
||||
"[POST]::/payments/:id/confirm - Content-Type is application/json",
|
||||
function () {
|
||||
pm.expect(pm.response.headers.get("Content-Type")).to.include(
|
||||
"application/json",
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
// Validate if response has JSON Body
|
||||
pm.test("[POST]::/payments/:id/confirm - Response has JSON Body", function () {
|
||||
pm.response.to.have.jsonBody();
|
||||
});
|
||||
|
||||
// Set response object as internal variable
|
||||
let jsonData = {};
|
||||
try {
|
||||
jsonData = pm.response.json();
|
||||
} catch (e) {}
|
||||
|
||||
// Response body should have value "requires_customer_action" for "status"
|
||||
pm.test(
|
||||
"[POST]::/payments/:id/confirm - Content check if value for 'status' matches 'requires_customer_action'",
|
||||
function () {
|
||||
pm.expect(jsonData.status).to.eql("requires_customer_action");
|
||||
},
|
||||
);
|
||||
|
||||
pm.test(
|
||||
"[POST]::/payments - Content check if 'connector_transaction_id' exists",
|
||||
function () {
|
||||
pm.expect(typeof jsonData.connector_transaction_id !== "undefined").to.be
|
||||
.true;
|
||||
pm.collectionVariables.set("connector_transaction_id", jsonData.connector_transaction_id)
|
||||
},
|
||||
);
|
||||
|
||||
pm.test(
|
||||
"[POST]::/payments - Content check if 'connector' is archipel",
|
||||
function () {
|
||||
pm.expect(jsonData.connector).to.be.equal("archipel");
|
||||
},
|
||||
);
|
||||
@ -0,0 +1,86 @@
|
||||
{
|
||||
"auth": {
|
||||
"type": "apikey",
|
||||
"apikey": [
|
||||
{
|
||||
"key": "value",
|
||||
"value": "{{publishable_key}}",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"key": "key",
|
||||
"value": "api-key",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"key": "in",
|
||||
"value": "header",
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Content-Type",
|
||||
"value": "application/json"
|
||||
},
|
||||
{
|
||||
"key": "Accept",
|
||||
"value": "application/json"
|
||||
}
|
||||
],
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
},
|
||||
"raw_json_formatted": {
|
||||
"client_secret": "{{client_secret}}",
|
||||
"payment_method": "card",
|
||||
"payment_method_type": "credit",
|
||||
"payment_method_data": {
|
||||
"card": {
|
||||
"card_cvc": "123",
|
||||
"card_exp_month": "01",
|
||||
"card_exp_year": "50",
|
||||
"card_holder_name": "John Doe",
|
||||
"card_number": "4242424242424242"
|
||||
}
|
||||
},
|
||||
"browser_info": {
|
||||
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
|
||||
"accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
|
||||
"language": "nl-NL",
|
||||
"color_depth": 24,
|
||||
"screen_height": 723,
|
||||
"screen_width": 1536,
|
||||
"time_zone": 0,
|
||||
"java_enabled": true,
|
||||
"java_script_enabled": true,
|
||||
"ip_address": "125.0.0.1"
|
||||
}
|
||||
}
|
||||
},
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/payments/:id/confirm",
|
||||
"host": [
|
||||
"{{baseUrl}}"
|
||||
],
|
||||
"path": [
|
||||
"payments",
|
||||
":id",
|
||||
"confirm"
|
||||
],
|
||||
"variable": [
|
||||
{
|
||||
"key": "id",
|
||||
"value": "{{payment_id}}",
|
||||
"description": "(Required) unique payment id"
|
||||
}
|
||||
]
|
||||
},
|
||||
"description": "This API is to confirm the payment request and forward payment to the payment processor. This API provides more granular control upon when the API is forwarded to the payment processor. Alternatively you can confirm the payment within the Payments-Create API"
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
[]
|
||||
@ -0,0 +1,6 @@
|
||||
{
|
||||
"eventOrder": [
|
||||
"event.test.js",
|
||||
"event.prerequest.js"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,58 @@
|
||||
// Validate status 2xx
|
||||
pm.test("[POST]::/payments - Status code is 2xx", function () {
|
||||
pm.response.to.be.success;
|
||||
});
|
||||
|
||||
// Validate if response header has matching content-type
|
||||
pm.test("[POST]::/payments - Content-Type is application/json", function () {
|
||||
pm.expect(pm.response.headers.get("Content-Type")).to.include(
|
||||
"application/json",
|
||||
);
|
||||
});
|
||||
|
||||
// Validate if response has JSON Body
|
||||
pm.test("[POST]::/payments - Response has JSON Body", function () {
|
||||
pm.response.to.have.jsonBody();
|
||||
});
|
||||
|
||||
// Set response object as internal variable
|
||||
let jsonData = {};
|
||||
try {
|
||||
jsonData = pm.response.json();
|
||||
} catch (e) {}
|
||||
|
||||
// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
|
||||
if (jsonData?.payment_id) {
|
||||
pm.collectionVariables.set("payment_id", jsonData.payment_id);
|
||||
console.log(
|
||||
"- use {{payment_id}} as collection variable for value",
|
||||
jsonData.payment_id,
|
||||
);
|
||||
} else {
|
||||
console.log(
|
||||
"INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.",
|
||||
);
|
||||
}
|
||||
|
||||
// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
|
||||
if (jsonData?.client_secret) {
|
||||
pm.collectionVariables.set("client_secret", jsonData.client_secret);
|
||||
console.log(
|
||||
"- use {{client_secret}} as collection variable for value",
|
||||
jsonData.client_secret,
|
||||
);
|
||||
} else {
|
||||
console.log(
|
||||
"INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.",
|
||||
);
|
||||
}
|
||||
|
||||
// Response body should have value "requires_payment_method" for "status"
|
||||
if (jsonData?.status) {
|
||||
pm.test(
|
||||
"[POST]::/payments - Content check if value for 'status' matches 'requires_payment_method'",
|
||||
function () {
|
||||
pm.expect(jsonData.status).to.eql("requires_payment_method");
|
||||
},
|
||||
);
|
||||
}
|
||||
@ -0,0 +1,78 @@
|
||||
{
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Content-Type",
|
||||
"value": "application/json"
|
||||
},
|
||||
{
|
||||
"key": "Accept",
|
||||
"value": "application/json"
|
||||
}
|
||||
],
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
},
|
||||
"raw_json_formatted": {
|
||||
"amount": 500,
|
||||
"amount_to_capture": 500,
|
||||
"currency": "USD",
|
||||
"confirm": false,
|
||||
"capture_method": "automatic",
|
||||
"authentication_type": "three_ds",
|
||||
"request_external_three_ds_authentication": true,
|
||||
"profile_id": "{{profile_id}}",
|
||||
"email": "john_doe@gmail.com",
|
||||
"name": "John Doe",
|
||||
"phone": "8056594427",
|
||||
"phone_country_code": "+91",
|
||||
"description": "{{$randomLoremSentence}}",
|
||||
"billing": {
|
||||
"address": {
|
||||
"line1": "2 ter",
|
||||
"line2": "rue du château",
|
||||
"line3": "",
|
||||
"city": "Neuilly-sur-Seine",
|
||||
"state": "FRA",
|
||||
"zip": "92200",
|
||||
"country": "FR"
|
||||
},
|
||||
"phone": {
|
||||
"number": "8056594427",
|
||||
"country_code": "+91"
|
||||
}
|
||||
},
|
||||
"shipping": {
|
||||
"address": {
|
||||
"line1": "1467",
|
||||
"line2": "Harrison Street",
|
||||
"line3": "Harrison Street",
|
||||
"city": "San Fransico",
|
||||
"state": "California",
|
||||
"zip": "94122",
|
||||
"country": "US",
|
||||
"first_name": "joseph",
|
||||
"last_name": "Doe"
|
||||
},
|
||||
"phone": {
|
||||
"number": "8056594427",
|
||||
"country_code": "+91"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/payments",
|
||||
"host": [
|
||||
"{{baseUrl}}"
|
||||
],
|
||||
"path": [
|
||||
"payments"
|
||||
]
|
||||
},
|
||||
"description": "To process a payment you will have to create a payment, attach a payment method and confirm. Depending on the user journey you wish to achieve, you may opt to all the steps in a single request or in a sequence of API request using following APIs: (i) Payments - Update, (ii) Payments - Confirm, and (iii) Payments - Capture"
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
[]
|
||||
@ -0,0 +1,6 @@
|
||||
{
|
||||
"eventOrder": [
|
||||
"event.test.js",
|
||||
"event.prerequest.js"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,4 @@
|
||||
// Validate status 2xx
|
||||
pm.test("[POST]::/payments/:id/confirm - Status code is 2xx", function () {
|
||||
pm.response.to.be.success;
|
||||
});
|
||||
@ -0,0 +1,66 @@
|
||||
{
|
||||
"auth": {
|
||||
"type": "apikey",
|
||||
"apikey": [
|
||||
{
|
||||
"key": "value",
|
||||
"value": "{{publishable_key}}",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"key": "key",
|
||||
"value": "api-key",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"key": "in",
|
||||
"value": "header",
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Content-Type",
|
||||
"value": "application/json"
|
||||
},
|
||||
{
|
||||
"key": "Accept",
|
||||
"value": "application/json"
|
||||
}
|
||||
],
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
},
|
||||
"raw_json_formatted": {
|
||||
"client_secret": "{{client_secret}}",
|
||||
"device_channel": "BRW",
|
||||
"threeds_method_comp_ind": "Y"
|
||||
}
|
||||
},
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/payments/:id/3ds/authentication",
|
||||
"host": [
|
||||
"{{baseUrl}}"
|
||||
],
|
||||
"path": [
|
||||
"payments",
|
||||
":id",
|
||||
"3ds",
|
||||
"authentication"
|
||||
],
|
||||
"variable": [
|
||||
{
|
||||
"key": "id",
|
||||
"value": "{{payment_id}}",
|
||||
"description": "(Required) unique payment id"
|
||||
}
|
||||
]
|
||||
},
|
||||
"description": "This API is to confirm the payment request and forward payment to the payment processor. This API provides more granular control upon when the API is forwarded to the payment processor. Alternatively you can confirm the payment within the Payments-Create API"
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
[]
|
||||
@ -0,0 +1,5 @@
|
||||
{
|
||||
"eventOrder": [
|
||||
"event.test.js"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,68 @@
|
||||
// Validate status 2xx
|
||||
pm.test("[GET]::/payments/:id - Status code is 2xx", function () {
|
||||
pm.response.to.be.success;
|
||||
});
|
||||
|
||||
// Validate if response header has matching content-type
|
||||
pm.test("[GET]::/payments/:id - Content-Type is application/json", function () {
|
||||
pm.expect(pm.response.headers.get("Content-Type")).to.include(
|
||||
"application/json",
|
||||
);
|
||||
});
|
||||
|
||||
// Validate if response has JSON Body
|
||||
pm.test("[GET]::/payments/:id - Response has JSON Body", function () {
|
||||
pm.response.to.have.jsonBody();
|
||||
});
|
||||
|
||||
// Set response object as internal variable
|
||||
let jsonData = {};
|
||||
try {
|
||||
jsonData = pm.response.json();
|
||||
} catch (e) {}
|
||||
|
||||
// Response body should have value "Succeeded" for "status"
|
||||
pm.test(
|
||||
"[POST]::/payments/:id - Content check if value for 'status' matches 'succeeded'",
|
||||
function () {
|
||||
pm.expect(jsonData.status).to.eql("succeeded");
|
||||
},
|
||||
);
|
||||
|
||||
pm.test(
|
||||
"[POST]::/payments/:id - Content check if value for 'amount' equal 500",
|
||||
function () {
|
||||
pm.expect(jsonData.amount).to.eql(500);
|
||||
},
|
||||
);
|
||||
|
||||
pm.test(
|
||||
"[POST]::/payments/:id - Content check if value for 'net_amount' equal 500",
|
||||
function () {
|
||||
pm.expect(jsonData.net_amount).to.eql(500);
|
||||
},
|
||||
);
|
||||
|
||||
pm.test(
|
||||
"[POST]::/payments/:id - Content check if value for 'amount_capturable' equal 0",
|
||||
function () {
|
||||
pm.expect(jsonData.amount_capturable).to.eql(0);
|
||||
},
|
||||
);
|
||||
|
||||
pm.test(
|
||||
"[POST]::/payments/:id - Content check if value for 'amount_received' equal 500",
|
||||
function () {
|
||||
pm.expect(jsonData.amount_received).to.eql(500);
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
// Response body should have "connector_transaction_id"
|
||||
pm.test(
|
||||
"[POST]::/payments - Content check if 'connector_transaction_id' exists",
|
||||
function () {
|
||||
pm.expect(typeof jsonData.connector_transaction_id !== "undefined").to.be
|
||||
.true;
|
||||
},
|
||||
);
|
||||
@ -0,0 +1,33 @@
|
||||
{
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Accept",
|
||||
"value": "application/json"
|
||||
}
|
||||
],
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/payments/:id?force_sync=true",
|
||||
"host": [
|
||||
"{{baseUrl}}"
|
||||
],
|
||||
"path": [
|
||||
"payments",
|
||||
":id"
|
||||
],
|
||||
"query": [
|
||||
{
|
||||
"key": "force_sync",
|
||||
"value": "true"
|
||||
}
|
||||
],
|
||||
"variable": [
|
||||
{
|
||||
"key": "id",
|
||||
"value": "{{payment_id}}",
|
||||
"description": "(Required) unique payment id"
|
||||
}
|
||||
]
|
||||
},
|
||||
"description": "To retrieve the properties of a Payment. This may be used to get the status of a previously initiated payment or next action for an ongoing payment"
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
[]
|
||||
@ -0,0 +1,10 @@
|
||||
{
|
||||
"childrenOrder": [
|
||||
"Payments - Create",
|
||||
"Payments - Retrieve with client secret",
|
||||
"Payments - Retrieve",
|
||||
"Payments - Confirm",
|
||||
"Payments - Retrieve after confirm",
|
||||
"Payments - Retrieve with connector sync"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,6 @@
|
||||
{
|
||||
"eventOrder": [
|
||||
"event.test.js",
|
||||
"event.prerequest.js"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,49 @@
|
||||
// Validate status 2xx
|
||||
pm.test("[POST]::/payments/:id/confirm - Status code is 2xx", function () {
|
||||
pm.response.to.be.success;
|
||||
});
|
||||
|
||||
// Validate if response header has matching content-type
|
||||
pm.test(
|
||||
"[POST]::/payments/:id/confirm - Content-Type is application/json",
|
||||
function () {
|
||||
pm.expect(pm.response.headers.get("Content-Type")).to.include(
|
||||
"application/json",
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
// Validate if response has JSON Body
|
||||
pm.test("[POST]::/payments/:id/confirm - Response has JSON Body", function () {
|
||||
pm.response.to.have.jsonBody();
|
||||
});
|
||||
|
||||
// Set response object as internal variable
|
||||
let jsonData = {};
|
||||
try {
|
||||
jsonData = pm.response.json();
|
||||
} catch (e) {}
|
||||
|
||||
// Response body should have value "succeeded" for "status"
|
||||
pm.test(
|
||||
"[POST]::/payments/:id/confirm - Content check if value for 'status' matches 'succeeded'",
|
||||
function () {
|
||||
pm.expect(jsonData.status).to.eql("succeeded");
|
||||
},
|
||||
);
|
||||
|
||||
pm.test(
|
||||
"[POST]::/payments - Content check if 'connector_transaction_id' exists",
|
||||
function () {
|
||||
pm.expect(typeof jsonData.connector_transaction_id !== "undefined").to.be
|
||||
.true;
|
||||
pm.collectionVariables.set("connector_transaction_id", jsonData.connector_transaction_id)
|
||||
},
|
||||
);
|
||||
|
||||
pm.test(
|
||||
"[POST]::/payments - Content check if 'connector' is archipel",
|
||||
function () {
|
||||
pm.expect(jsonData.connector).to.be.equal("archipel");
|
||||
},
|
||||
);
|
||||
@ -0,0 +1,86 @@
|
||||
{
|
||||
"auth": {
|
||||
"type": "apikey",
|
||||
"apikey": [
|
||||
{
|
||||
"key": "value",
|
||||
"value": "{{publishable_key}}",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"key": "key",
|
||||
"value": "api-key",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"key": "in",
|
||||
"value": "header",
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Content-Type",
|
||||
"value": "application/json"
|
||||
},
|
||||
{
|
||||
"key": "Accept",
|
||||
"value": "application/json"
|
||||
}
|
||||
],
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
},
|
||||
"raw_json_formatted": {
|
||||
"client_secret": "{{client_secret}}",
|
||||
"payment_method": "card",
|
||||
"payment_method_type": "credit",
|
||||
"payment_method_data": {
|
||||
"card": {
|
||||
"card_cvc": "123",
|
||||
"card_exp_month": "01",
|
||||
"card_exp_year": "50",
|
||||
"card_holder_name": "John Doe",
|
||||
"card_number": "5185570141917102"
|
||||
}
|
||||
},
|
||||
"browser_info": {
|
||||
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
|
||||
"accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
|
||||
"language": "nl-NL",
|
||||
"color_depth": 24,
|
||||
"screen_height": 723,
|
||||
"screen_width": 1536,
|
||||
"time_zone": 0,
|
||||
"java_enabled": true,
|
||||
"java_script_enabled": true,
|
||||
"ip_address": "125.0.0.1"
|
||||
}
|
||||
}
|
||||
},
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/payments/:id/confirm",
|
||||
"host": [
|
||||
"{{baseUrl}}"
|
||||
],
|
||||
"path": [
|
||||
"payments",
|
||||
":id",
|
||||
"confirm"
|
||||
],
|
||||
"variable": [
|
||||
{
|
||||
"key": "id",
|
||||
"value": "{{payment_id}}",
|
||||
"description": "(Required) unique payment id"
|
||||
}
|
||||
]
|
||||
},
|
||||
"description": "This API is to confirm the payment request and forward payment to the payment processor. This API provides more granular control upon when the API is forwarded to the payment processor. Alternatively you can confirm the payment within the Payments-Create API"
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
[]
|
||||
@ -0,0 +1,6 @@
|
||||
{
|
||||
"eventOrder": [
|
||||
"event.test.js",
|
||||
"event.prerequest.js"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,58 @@
|
||||
// Validate status 2xx
|
||||
pm.test("[POST]::/payments - Status code is 2xx", function () {
|
||||
pm.response.to.be.success;
|
||||
});
|
||||
|
||||
// Validate if response header has matching content-type
|
||||
pm.test("[POST]::/payments - Content-Type is application/json", function () {
|
||||
pm.expect(pm.response.headers.get("Content-Type")).to.include(
|
||||
"application/json",
|
||||
);
|
||||
});
|
||||
|
||||
// Validate if response has JSON Body
|
||||
pm.test("[POST]::/payments - Response has JSON Body", function () {
|
||||
pm.response.to.have.jsonBody();
|
||||
});
|
||||
|
||||
// Set response object as internal variable
|
||||
let jsonData = {};
|
||||
try {
|
||||
jsonData = pm.response.json();
|
||||
} catch (e) {}
|
||||
|
||||
// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
|
||||
if (jsonData?.payment_id) {
|
||||
pm.collectionVariables.set("payment_id", jsonData.payment_id);
|
||||
console.log(
|
||||
"- use {{payment_id}} as collection variable for value",
|
||||
jsonData.payment_id,
|
||||
);
|
||||
} else {
|
||||
console.log(
|
||||
"INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.",
|
||||
);
|
||||
}
|
||||
|
||||
// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
|
||||
if (jsonData?.client_secret) {
|
||||
pm.collectionVariables.set("client_secret", jsonData.client_secret);
|
||||
console.log(
|
||||
"- use {{client_secret}} as collection variable for value",
|
||||
jsonData.client_secret,
|
||||
);
|
||||
} else {
|
||||
console.log(
|
||||
"INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.",
|
||||
);
|
||||
}
|
||||
|
||||
// Response body should have value "requires_payment_method" for "status"
|
||||
if (jsonData?.status) {
|
||||
pm.test(
|
||||
"[POST]::/payments - Content check if value for 'status' matches 'requires_payment_method'",
|
||||
function () {
|
||||
pm.expect(jsonData.status).to.eql("requires_payment_method");
|
||||
},
|
||||
);
|
||||
}
|
||||
@ -0,0 +1,79 @@
|
||||
{
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Content-Type",
|
||||
"value": "application/json"
|
||||
},
|
||||
{
|
||||
"key": "Accept",
|
||||
"value": "application/json"
|
||||
}
|
||||
],
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
},
|
||||
"raw_json_formatted": {
|
||||
"amount": 500,
|
||||
"amount_to_capture": 500,
|
||||
"currency": "EUR",
|
||||
"confirm": false,
|
||||
"capture_method": "automatic",
|
||||
"authentication_type": "no_three_ds",
|
||||
"profile_id": "{{profile_id}}",
|
||||
"email": "john_doe@gmail.com",
|
||||
"name": "John Doe",
|
||||
"phone": "8056594427",
|
||||
"phone_country_code": "+91",
|
||||
"description": "{{$randomLoremSentence}}",
|
||||
"billing": {
|
||||
"address": {
|
||||
"line1": "2 ter",
|
||||
"line2": "rue du château",
|
||||
"line3": "",
|
||||
"city": "Neuilly-sur-Seine",
|
||||
"state": "France",
|
||||
"zip": "92200",
|
||||
"country": "FR"
|
||||
},
|
||||
"phone": {
|
||||
"number": "8056594427",
|
||||
"country_code": "+91"
|
||||
}
|
||||
},
|
||||
"shipping": {
|
||||
"address": {
|
||||
"line1": "1467",
|
||||
"line2": "Harrison Street",
|
||||
"line3": "Harrison Street",
|
||||
"city": "San Fransico",
|
||||
"state": "California",
|
||||
"zip": "94122",
|
||||
"country": "US",
|
||||
"first_name": "joseph",
|
||||
"last_name": "Doe"
|
||||
},
|
||||
"phone": {
|
||||
"number": "8056594427",
|
||||
"country_code": "+91"
|
||||
}
|
||||
},
|
||||
"statement_descriptor_name": "Joseph Doe",
|
||||
"statement_descriptor_suffix": "JS"
|
||||
}
|
||||
},
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/payments",
|
||||
"host": [
|
||||
"{{baseUrl}}"
|
||||
],
|
||||
"path": [
|
||||
"payments"
|
||||
]
|
||||
},
|
||||
"description": "To process a payment you will have to create a payment, attach a payment method and confirm. Depending on the user journey you wish to achieve, you may opt to all the steps in a single request or in a sequence of API request using following APIs: (i) Payments - Update, (ii) Payments - Confirm, and (iii) Payments - Capture"
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
[]
|
||||
@ -0,0 +1,5 @@
|
||||
{
|
||||
"eventOrder": [
|
||||
"event.test.js"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,68 @@
|
||||
// Validate status 2xx
|
||||
pm.test("[GET]::/payments/:id - Status code is 2xx", function () {
|
||||
pm.response.to.be.success;
|
||||
});
|
||||
|
||||
// Validate if response header has matching content-type
|
||||
pm.test("[GET]::/payments/:id - Content-Type is application/json", function () {
|
||||
pm.expect(pm.response.headers.get("Content-Type")).to.include(
|
||||
"application/json",
|
||||
);
|
||||
});
|
||||
|
||||
// Validate if response has JSON Body
|
||||
pm.test("[GET]::/payments/:id - Response has JSON Body", function () {
|
||||
pm.response.to.have.jsonBody();
|
||||
});
|
||||
|
||||
// Set response object as internal variable
|
||||
let jsonData = {};
|
||||
try {
|
||||
jsonData = pm.response.json();
|
||||
} catch (e) {}
|
||||
|
||||
// Response body should have value "Succeeded" for "status"
|
||||
pm.test(
|
||||
"[POST]::/payments/:id - Content check if value for 'status' matches 'succeeded'",
|
||||
function () {
|
||||
pm.expect(jsonData.status).to.eql("succeeded");
|
||||
},
|
||||
);
|
||||
|
||||
pm.test(
|
||||
"[POST]::/payments/:id - Content check if value for 'amount' equal 500",
|
||||
function () {
|
||||
pm.expect(jsonData.amount).to.eql(500);
|
||||
},
|
||||
);
|
||||
|
||||
pm.test(
|
||||
"[POST]::/payments/:id - Content check if value for 'net_amount' equal 500",
|
||||
function () {
|
||||
pm.expect(jsonData.net_amount).to.eql(500);
|
||||
},
|
||||
);
|
||||
|
||||
pm.test(
|
||||
"[POST]::/payments/:id - Content check if value for 'amount_capturable' equal 0",
|
||||
function () {
|
||||
pm.expect(jsonData.amount_capturable).to.eql(0);
|
||||
},
|
||||
);
|
||||
|
||||
pm.test(
|
||||
"[POST]::/payments/:id - Content check if value for 'amount_received' equal 500",
|
||||
function () {
|
||||
pm.expect(jsonData.amount_received).to.eql(500);
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
// Response body should have "connector_transaction_id"
|
||||
pm.test(
|
||||
"[POST]::/payments - Content check if 'connector_transaction_id' exists",
|
||||
function () {
|
||||
pm.expect(typeof jsonData.connector_transaction_id !== "undefined").to.be
|
||||
.true;
|
||||
},
|
||||
);
|
||||
@ -0,0 +1,33 @@
|
||||
{
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Accept",
|
||||
"value": "application/json"
|
||||
}
|
||||
],
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/payments/:id?force_sync=true",
|
||||
"host": [
|
||||
"{{baseUrl}}"
|
||||
],
|
||||
"path": [
|
||||
"payments",
|
||||
":id"
|
||||
],
|
||||
"query": [
|
||||
{
|
||||
"key": "force_sync",
|
||||
"value": "true"
|
||||
}
|
||||
],
|
||||
"variable": [
|
||||
{
|
||||
"key": "id",
|
||||
"value": "{{payment_id}}",
|
||||
"description": "(Required) unique payment id"
|
||||
}
|
||||
]
|
||||
},
|
||||
"description": "To retrieve the properties of a Payment. This may be used to get the status of a previously initiated payment or next action for an ongoing payment"
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
[]
|
||||
@ -0,0 +1,5 @@
|
||||
{
|
||||
"eventOrder": [
|
||||
"event.test.js"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,45 @@
|
||||
// Validate status 2xx
|
||||
pm.test("[GET]::/payments/:id - Status code is 2xx", function () {
|
||||
pm.response.to.be.success;
|
||||
});
|
||||
|
||||
// Validate if response header has matching content-type
|
||||
pm.test("[GET]::/payments/:id - Content-Type is application/json", function () {
|
||||
pm.expect(pm.response.headers.get("Content-Type")).to.include(
|
||||
"application/json",
|
||||
);
|
||||
});
|
||||
|
||||
// Validate if response has JSON Body
|
||||
pm.test("[GET]::/payments/:id - Response has JSON Body", function () {
|
||||
pm.response.to.have.jsonBody();
|
||||
});
|
||||
|
||||
// Set response object as internal variable
|
||||
let jsonData = {};
|
||||
try {
|
||||
jsonData = pm.response.json();
|
||||
} catch (e) {}
|
||||
|
||||
// Response body should have value "Succeeded" for "status"
|
||||
pm.test(
|
||||
"[POST]::/payments/:id - Content check if value for 'status' matches 'requires_payment_method'",
|
||||
function () {
|
||||
pm.expect(jsonData.status).to.eql("requires_payment_method");
|
||||
},
|
||||
);
|
||||
|
||||
pm.test(
|
||||
"[POST]::/payments - Content check if no 'connector' is affected to the payment intent",
|
||||
function () {
|
||||
pm.expect(jsonData.connector).to.be.null;
|
||||
},
|
||||
);
|
||||
|
||||
// Response body should not have "connector_transaction_id"
|
||||
pm.test(
|
||||
"[POST]::/payments - Content check if 'connector_transaction_id' is null",
|
||||
function () {
|
||||
pm.expect(jsonData.connector_transaction_id).to.be.null;
|
||||
},
|
||||
);
|
||||
@ -0,0 +1,53 @@
|
||||
{
|
||||
"auth": {
|
||||
"type": "apikey",
|
||||
"apikey": [
|
||||
{
|
||||
"key": "value",
|
||||
"value": "{{publishable_key}}",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"key": "key",
|
||||
"value": "api-key",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"key": "in",
|
||||
"value": "header",
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Accept",
|
||||
"value": "application/json"
|
||||
}
|
||||
],
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/payments/:id?client_secret={{client_secret}}",
|
||||
"host": [
|
||||
"{{baseUrl}}"
|
||||
],
|
||||
"path": [
|
||||
"payments",
|
||||
":id"
|
||||
],
|
||||
"query": [
|
||||
{
|
||||
"key": "client_secret",
|
||||
"value": "{{client_secret}}"
|
||||
}
|
||||
],
|
||||
"variable": [
|
||||
{
|
||||
"key": "id",
|
||||
"value": "{{payment_id}}",
|
||||
"description": "(Required) unique payment id"
|
||||
}
|
||||
]
|
||||
},
|
||||
"description": "To retrieve the properties of a Payment. This may be used to get the status of a previously initiated payment or next action for an ongoing payment"
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
[]
|
||||
@ -0,0 +1,5 @@
|
||||
{
|
||||
"eventOrder": [
|
||||
"event.test.js"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,85 @@
|
||||
// Validate status 2xx
|
||||
pm.test("[GET]::/payments/:id - Status code is 2xx", function () {
|
||||
pm.response.to.be.success;
|
||||
});
|
||||
|
||||
// Validate if response header has matching content-type
|
||||
pm.test("[GET]::/payments/:id - Content-Type is application/json", function () {
|
||||
pm.expect(pm.response.headers.get("Content-Type")).to.include(
|
||||
"application/json",
|
||||
);
|
||||
});
|
||||
|
||||
// Validate if response has JSON Body
|
||||
pm.test("[GET]::/payments/:id - Response has JSON Body", function () {
|
||||
pm.response.to.have.jsonBody();
|
||||
});
|
||||
|
||||
// Set response object as internal variable
|
||||
let jsonData = {};
|
||||
try {
|
||||
jsonData = pm.response.json();
|
||||
} catch (e) {}
|
||||
|
||||
// Response body should have value "Succeeded" for "status"
|
||||
pm.test(
|
||||
"[POST]::/payments/:id - Content check if value for 'status' matches 'succeeded'",
|
||||
function () {
|
||||
pm.expect(jsonData.status).to.eql("succeeded");
|
||||
},
|
||||
);
|
||||
|
||||
// Response body should have "connector_transaction_id"
|
||||
pm.test(
|
||||
"[POST]::/payments - Content check if 'connector_transaction_id' exists",
|
||||
function () {
|
||||
pm.expect(jsonData.connector_transaction_id).to.be.equal(
|
||||
pm.collectionVariables.get("connector_transaction_id")
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
let payment_attempt = {}
|
||||
|
||||
pm.test(
|
||||
"[POST]::/payments - Payment has one 'Payment Attempt'",
|
||||
function () {
|
||||
pm.expect(jsonData.attempts.length).to.be.equal(1);
|
||||
payment_attempt = jsonData.attempts[0]
|
||||
},
|
||||
);
|
||||
|
||||
pm.test(
|
||||
"[POST]::/payments - Payment Attempt has 'charged' status",
|
||||
function () {
|
||||
pm.expect(payment_attempt.status).to.be.equal("charged");
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
pm.test(
|
||||
"[POST]::/payments - Payment Attempt has 'connector_transaction_id'",
|
||||
function () {
|
||||
pm.expect(jsonData.connector_transaction_id).to.be.equal(
|
||||
pm.collectionVariables.get("connector_transaction_id")
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
pm.test(
|
||||
"[POST]::/payments - Archiepl response 'transactionId' is updated and not null",
|
||||
function () {
|
||||
pm.expect(payment_attempt.connector_metadata.transactionId).not.null
|
||||
pm.expect(payment_attempt.connector_metadata.transactionId).to.not.equal(
|
||||
pm.collectionVariables.get("archipel_transaction_uuid")
|
||||
)
|
||||
pm.collectionVariables.set("archipel_transaction_uuid", payment_attempt.connector_metadata.transactionId)
|
||||
},
|
||||
);
|
||||
|
||||
pm.test(
|
||||
"[POST]::/payments - Payment Attempt has no error",
|
||||
function () {
|
||||
pm.expect(payment_attempt.error_message).to.be.null;
|
||||
},
|
||||
);
|
||||
@ -0,0 +1,33 @@
|
||||
{
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Accept",
|
||||
"value": "application/json"
|
||||
}
|
||||
],
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/payments/:id?expand_attempts=true",
|
||||
"host": [
|
||||
"{{baseUrl}}"
|
||||
],
|
||||
"path": [
|
||||
"payments",
|
||||
":id"
|
||||
],
|
||||
"query": [
|
||||
{
|
||||
"key": "expand_attempts",
|
||||
"value": "true"
|
||||
}
|
||||
],
|
||||
"variable": [
|
||||
{
|
||||
"key": "id",
|
||||
"value": "{{payment_id}}",
|
||||
"description": "(Required) unique payment id"
|
||||
}
|
||||
]
|
||||
},
|
||||
"description": "To retrieve the properties of a Payment. This may be used to get the status of a previously initiated payment or next action for an ongoing payment"
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
[]
|
||||
@ -0,0 +1,5 @@
|
||||
{
|
||||
"eventOrder": [
|
||||
"event.test.js"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,45 @@
|
||||
// Validate status 2xx
|
||||
pm.test("[GET]::/payments/:id - Status code is 2xx", function () {
|
||||
pm.response.to.be.success;
|
||||
});
|
||||
|
||||
// Validate if response header has matching content-type
|
||||
pm.test("[GET]::/payments/:id - Content-Type is application/json", function () {
|
||||
pm.expect(pm.response.headers.get("Content-Type")).to.include(
|
||||
"application/json",
|
||||
);
|
||||
});
|
||||
|
||||
// Validate if response has JSON Body
|
||||
pm.test("[GET]::/payments/:id - Response has JSON Body", function () {
|
||||
pm.response.to.have.jsonBody();
|
||||
});
|
||||
|
||||
// Set response object as internal variable
|
||||
let jsonData = {};
|
||||
try {
|
||||
jsonData = pm.response.json();
|
||||
} catch (e) {}
|
||||
|
||||
// Response body should have value "Succeeded" for "status"
|
||||
pm.test(
|
||||
"[POST]::/payments/:id - Content check if value for 'status' matches 'requires_payment_method'",
|
||||
function () {
|
||||
pm.expect(jsonData.status).to.eql("requires_payment_method");
|
||||
},
|
||||
);
|
||||
|
||||
pm.test(
|
||||
"[POST]::/payments - Content check if no 'connector' is affected to the payment intent",
|
||||
function () {
|
||||
pm.expect(jsonData.connector).to.be.null;
|
||||
},
|
||||
);
|
||||
|
||||
// Response body should not have "connector_transaction_id"
|
||||
pm.test(
|
||||
"[POST]::/payments - Content check if 'connector_transaction_id' is null",
|
||||
function () {
|
||||
pm.expect(jsonData.connector_transaction_id).to.be.null;
|
||||
},
|
||||
);
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user