Skip to content

Commit

Permalink
add cypress test trigger skip for no3ds zero auth mandate config
Browse files Browse the repository at this point in the history
  • Loading branch information
cookieg13 committed Jan 2, 2025
1 parent 39a645b commit 31be626
Showing 1 changed file with 106 additions and 0 deletions.
106 changes: 106 additions & 0 deletions cypress-tests/cypress/e2e/PaymentUtils/Novalnet.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,31 @@ const successfulThreeDSTestCardDetails = {
card_cvc: "123",
};

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: {
acceptance_type: "offline",
accepted_at: "1963-05-03T04:07:52.723Z",
online: {
ip_address: "125.0.0.1",
user_agent: "amet irure esse",
},
},
mandate_type: {
single_use: {
amount: 8000,
currency: "EUR",
},
},
};

export const connectorDetails = {
card_pm: {
PaymentIntent: {
Expand Down Expand Up @@ -206,5 +231,86 @@ export const connectorDetails = {
},
},
},
SaveCardConfirmAutoCaptureOffSession: {
Request: {
setup_future_usage: "off_session",
},
Response: {
status: 200,
trigger_skip: true,
body: {
status: "requires_customer_action",
},
},
},
PaymentIntentOffSession: {
Request: {
currency: "EUR",
amount: 6500,
authentication_type: "no_three_ds",
customer_acceptance: null,
setup_future_usage: "off_session",
},
Response: {
status: 200,
trigger_skip: true,
body: {
status: "requires_payment_method",
setup_future_usage: "off_session",
},
},
},
ZeroAuthPaymentIntent: {
Request: {
amount: 0,
setup_future_usage: "off_session",
currency: "EUR",
},
Response: {
status: 200,
trigger_skip: true,
body: {
status: "requires_payment_method",
setup_future_usage: "off_session",
},
},
},
ZeroAuthMandate: {
Request: {
payment_method: "card",
payment_method_data: {
card: successfulNo3DSCardDetails,
},
currency: "USD",
mandate_data: singleUseMandateData,
},
Response: {
status: 200,
trigger_skip: true,
body: {
status: "succeeded",
},
},
},
ZeroAuthConfirmPayment: {
Request: {
payment_type: "setup_mandate",
payment_method: "card",
payment_method_type: "credit",
payment_method_data: {
card: successfulNo3DSCardDetails,
},
},
Response: {
status: 501,
body: {
error: {
type: "invalid_request",
message: "Setup Mandate flow for Novalnet is not implemented",
code: "IR_00",
},
},
},
},
},
};

0 comments on commit 31be626

Please sign in to comment.