Skip to content

Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation

test(cypress): add Placetopay connector payment config (#13184)

HS-QUALIBOT8c2448303fa9
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Placetopay.js b/cypress-tests/cypress/e2e/configs/Payment/Placetopay.js
new file mode 100644
index 0000000000..a3ed896298
--- /dev/null
+++ b/cypress-tests/cypress/e2e/configs/Payment/Placetopay.js
@@ -0,0 +1,261 @@
+const successfulNo3DSCardDetails = {
+ card_number: "4110760000000081",
+ card_exp_month: "12",
+ card_exp_year: "2030",
+ card_holder_name: "Test User",
+ card_cvc: "123",
+};
+
+const browserInfo = {
+ ip_address: "127.0.0.1",
+ user_agent:
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36",
+};
+
+const simplifiedCustomerAcceptance = {
+ acceptance_type: "offline",
+};
+
+const notImplementedConfirmRequest = {
+ payment_method: "card",
+ payment_method_data: {
+ card: successfulNo3DSCardDetails,
+ },
+};
+
+const manualCaptureConfirmRequest = {
+ payment_method: "card",
+ payment_method_type: "credit",
+ payment_method_data: {
+ card: successfulNo3DSCardDetails,
+ },
+ currency: "COP",
+ browser_info: browserInfo,
+ customer_acceptance: simplifiedCustomerAcceptance,
+ setup_future_usage: "on_session",
+ billing: {
+ address: {
+ line1: "Calle 93B No 17-25",
+ city: "Bogota",
+ state: "Bogota",
+ zip: "110111",
+ country: "CO",
+ first_name: "Test",
+ last_name: "User",
+ },
+ email: "[email protected]",
+ },
+};
+
+export const connectorDetails = {
+ card_pm: {
+ PaymentIntent: {
+ Request: {
+ currency: "COP",
+ description: "placetopay test",
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "requires_payment_method",
+ },
+ },
+ },
+ No3DSAutoCapture: {
+ Request: {
+ payment_method: "card",
+ payment_method_type: "credit",
+ payment_method_data: {
+ card: successfulNo3DSCardDetails,
+ },
+ currency: "COP",
+ browser_info: browserInfo,
+ customer_acceptance: simplifiedCustomerAcceptance,
+ setup_future_usage: "on_session",
+ billing: {
+ address: {
+ line1: "Calle 93B No 17-25",
+ city: "Bogota",
+ state: "Bogota",
+ zip: "110111",
+ country: "CO",
+ first_name: "Test",
+ last_name: "User",
+ },
+ email: "[email protected]",
+ },
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "succeeded",
+ },
+ },
+ },
+ Refund: {
+ Request: {
+ amount: 6000,
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "succeeded",
+ },
+ },
+ ResponseCustom: {
+ status: 200,
+ body: {
+ status: "succeeded",
+ },
+ },
+ },
+ PartialRefund: {
+ Request: {
+ amount: 2000,
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "succeeded",
+ },
+ },
+ ResponseCustom: {
+ status: 200,
+ body: {
+ status: "succeeded",
+ },
+ },
+ },
+ SyncRefund: {
+ Response: {
+ status: 200,
+ body: {
+ status: "succeeded",
+ },
+ },
+ ResponseCustom: {
+ status: 200,
+ body: {
+ status: "succeeded",
+ },
+ },
+ },
+ manualPaymentRefund: {
+ Request: {
+ amount: 6000,
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "succeeded",
+ },
+ },
+ ResponseCustom: {
+ status: 200,
+ body: {
+ status: "succeeded",
+ },
+ },
+ },
+ manualPaymentPartialRefund: {
+ Request: {
+ amount: 2000,
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "succeeded",
+ },
+ },
+ ResponseCustom: {
+ status: 200,
+ body: {
+ status: "succeeded",
+ },
+ },
+ },
+ No3DSManualCapture: {
+ Configs: {
+ TRIGGER_SKIP: true,
+ },
+ Request: manualCaptureConfirmRequest,
+ Response: {
+ status: 200,
+ body: {
+ status: "requires_capture",
+ },
+ },
+ },
+ "3DSAutoCapture": {
+ Configs: {
+ TRIGGER_SKIP: true,
+ },
+ Request: notImplementedConfirmRequest,
+ Response: {
+ status: 200,
+ body: {
+ status: "succeeded",
+ },
+ },
+ },
+ "3DSManualCapture": {
+ Configs: {
+ TRIGGER_SKIP: true,
+ },
+ Request: notImplementedConfirmRequest,
+ Response: {
+ status: 200,
+ body: {
+ status: "requires_capture",
+ },
+ },
+ },
+ Capture: {
+ Request: {
+ amount_to_capture: 6000,
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "succeeded",
+ },
+ },
+ },
+ PartialCapture: {
+ Request: {
+ amount_to_capture: 2000,
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "partially_captured",
+ },
+ },
+ },
+ PaymentIntentWithShippingCost: {
+ Request: {
+ currency: "COP",
+ shipping_cost: 50,
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "requires_payment_method",
+ shipping_cost: 50,
+ amount: 6000,
+ },
+ },
+ },
+ PaymentConfirmWithShippingCost: {
+ Request: manualCaptureConfirmRequest,
+ Response: {
+ status: 200,
+ body: {
+ status: "succeeded",
+ shipping_cost: 50,
+ amount: 6000,
+ },
+ },
+ },
+ },
+};
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Utils.js b/cypress-tests/cypress/e2e/configs/Payment/Utils.js
index 5b50ec1059..5e98fdadd0 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Utils.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Utils.js
@@ -61,6 +61,7 @@ import { connectorDetails as payjustnowConnectorDetails } from "./Payjustnow.js"
import { connectorDetails as payloadConnectorDetails } from "./Payload.js";
import { connectorDetails as paypalConnectorDetails } from "./Paypal.js";
import { connectorDetails as paysafeConnectorDetails } from "./Paysafe.js";
+import { connectorDetails as placetopayConnectorDetails } from "./Placetopay.js";
import { connectorDetails as payuConnectorDetails } from "./Payu.js";
import { connectorDetails as peachpaymentsConnectorDetails } from "./Peachpayments.js";
import { connectorDetails as powertranzConnectorDetails } from "./PowerTranz.js";
@@ -142,6 +143,7 @@ const connectorDetails = {
payload: payloadConnectorDetails,
paypal: paypalConnectorDetails,
paysafe: paysafeConnectorDetails,
+ placetopay: placetopayConnectorDetails,
payu: payuConnectorDetails,
peachpayments: peachpaymentsConnectorDetails,
powertranz: powertranzConnectorDetails,