mirror of
https://github.com/juspay/hyperswitch.git
synced 2026-03-13 09:02:06 +08:00
ci(cypress): enable manual retry test cases for different connectors (#11417)
This commit is contained in:
@@ -23,6 +23,14 @@ const customerAcceptance = {
|
||||
},
|
||||
};
|
||||
|
||||
const failedNo3DSCardDetails = {
|
||||
card_number: "4276038578596818",
|
||||
card_exp_month: "03",
|
||||
card_exp_year: "30",
|
||||
card_holder_name: "joseph Doe",
|
||||
card_cvc: "737",
|
||||
};
|
||||
|
||||
const singleUseMandateData = {
|
||||
customer_acceptance: customerAcceptance,
|
||||
mandate_type: {
|
||||
@@ -585,5 +593,82 @@ export const connectorDetails = {
|
||||
},
|
||||
},
|
||||
},
|
||||
No3DSFailPayment: {
|
||||
Request: {
|
||||
payment_method: "card",
|
||||
payment_method_data: {
|
||||
card: failedNo3DSCardDetails,
|
||||
},
|
||||
customer_acceptance: null,
|
||||
setup_future_usage: "on_session",
|
||||
},
|
||||
Response: {
|
||||
status: 200,
|
||||
body: {
|
||||
status: "failed",
|
||||
error_code: "2005C",
|
||||
error_message: "Transaction not supported/blocked by issuer",
|
||||
},
|
||||
},
|
||||
},
|
||||
ManualRetryPaymentDisabled: {
|
||||
Request: {
|
||||
payment_method: "card",
|
||||
payment_method_data: {
|
||||
card: successfulNo3DSCardDetails,
|
||||
},
|
||||
currency: "USD",
|
||||
customer_acceptance: null,
|
||||
setup_future_usage: "on_session",
|
||||
},
|
||||
Response: {
|
||||
status: 400,
|
||||
body: {
|
||||
type: "invalid_request",
|
||||
message:
|
||||
"You cannot confirm this payment because it has status failed, you can enable `manual_retry` in profile to try this payment again",
|
||||
code: "IR_16",
|
||||
},
|
||||
},
|
||||
},
|
||||
ManualRetryPaymentEnabled: {
|
||||
Request: {
|
||||
payment_method: "card",
|
||||
payment_method_data: {
|
||||
card: successfulNo3DSCardDetails,
|
||||
},
|
||||
currency: "USD",
|
||||
customer_acceptance: null,
|
||||
setup_future_usage: "on_session",
|
||||
},
|
||||
Response: {
|
||||
status: 200,
|
||||
body: {
|
||||
status: "succeeded",
|
||||
payment_method: "card",
|
||||
attempt_count: 2,
|
||||
},
|
||||
},
|
||||
},
|
||||
ManualRetryPaymentCutoffExpired: {
|
||||
Request: {
|
||||
payment_method: "card",
|
||||
payment_method_data: {
|
||||
card: successfulNo3DSCardDetails,
|
||||
},
|
||||
currency: "USD",
|
||||
customer_acceptance: null,
|
||||
setup_future_usage: "on_session",
|
||||
},
|
||||
Response: {
|
||||
status: 400,
|
||||
body: {
|
||||
type: "invalid_request",
|
||||
message:
|
||||
"You cannot confirm this payment using `manual_retry` because the allowed duration has expired",
|
||||
code: "IR_16",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -16,6 +16,15 @@ const successfulThreeDSCardDetails = {
|
||||
card_holder_name: "CL-BRW1",
|
||||
card_cvc: "123",
|
||||
};
|
||||
|
||||
const failedNo3DSCardDetails = {
|
||||
card_number: "4008370896662369",
|
||||
card_exp_month: "01",
|
||||
card_exp_year: "35",
|
||||
card_holder_name: "joseph Doe",
|
||||
card_cvc: "123",
|
||||
};
|
||||
|
||||
const singleUseMandateData = {
|
||||
customer_acceptance: customerAcceptance,
|
||||
mandate_type: {
|
||||
@@ -707,6 +716,24 @@ export const connectorDetails = {
|
||||
},
|
||||
},
|
||||
},
|
||||
No3DSFailPayment: {
|
||||
Request: {
|
||||
payment_method: "card",
|
||||
payment_method_data: {
|
||||
card: failedNo3DSCardDetails,
|
||||
},
|
||||
customer_acceptance: null,
|
||||
setup_future_usage: "on_session",
|
||||
},
|
||||
Response: {
|
||||
status: 200,
|
||||
body: {
|
||||
status: "failed",
|
||||
error_code: "-1",
|
||||
error_message: "Decline",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
// Bank redirect payment methods
|
||||
bank_redirect_pm: {
|
||||
|
||||
@@ -16,6 +16,14 @@ const successfulThreeDSTestCardDetails = {
|
||||
card_cvc: "123",
|
||||
};
|
||||
|
||||
const failedNo3DSCardDetails = {
|
||||
card_number: "4012888888881881",
|
||||
card_exp_month: "01",
|
||||
card_exp_year: "35",
|
||||
card_holder_name: "CCREJECT-REFUSED",
|
||||
card_cvc: "123",
|
||||
};
|
||||
|
||||
const customerAcceptance = {
|
||||
acceptance_type: "offline",
|
||||
accepted_at: "1963-05-03T04:07:52.723Z",
|
||||
@@ -667,6 +675,83 @@ export const connectorDetails = {
|
||||
},
|
||||
},
|
||||
},
|
||||
No3DSFailPayment: {
|
||||
Request: {
|
||||
payment_method: "card",
|
||||
payment_method_data: {
|
||||
card: failedNo3DSCardDetails,
|
||||
},
|
||||
customer_acceptance: null,
|
||||
setup_future_usage: "on_session",
|
||||
},
|
||||
Response: {
|
||||
status: 200,
|
||||
body: {
|
||||
status: "failed",
|
||||
error_code: "0500",
|
||||
error_message: "DO_NOT_HONOR.",
|
||||
},
|
||||
},
|
||||
},
|
||||
ManualRetryPaymentDisabled: {
|
||||
Request: {
|
||||
payment_method: "card",
|
||||
payment_method_data: {
|
||||
card: successfulNo3DSCardDetails,
|
||||
},
|
||||
currency: "USD",
|
||||
customer_acceptance: null,
|
||||
setup_future_usage: "on_session",
|
||||
},
|
||||
Response: {
|
||||
status: 400,
|
||||
body: {
|
||||
type: "invalid_request",
|
||||
message:
|
||||
"You cannot confirm this payment because it has status failed, you can enable `manual_retry` in profile to try this payment again",
|
||||
code: "IR_16",
|
||||
},
|
||||
},
|
||||
},
|
||||
ManualRetryPaymentEnabled: {
|
||||
Request: {
|
||||
payment_method: "card",
|
||||
payment_method_data: {
|
||||
card: successfulNo3DSCardDetails,
|
||||
},
|
||||
currency: "USD",
|
||||
customer_acceptance: null,
|
||||
setup_future_usage: "on_session",
|
||||
},
|
||||
Response: {
|
||||
status: 200,
|
||||
body: {
|
||||
status: "succeeded",
|
||||
payment_method: "card",
|
||||
attempt_count: 2,
|
||||
},
|
||||
},
|
||||
},
|
||||
ManualRetryPaymentCutoffExpired: {
|
||||
Request: {
|
||||
payment_method: "card",
|
||||
payment_method_data: {
|
||||
card: successfulNo3DSCardDetails,
|
||||
},
|
||||
currency: "USD",
|
||||
customer_acceptance: null,
|
||||
setup_future_usage: "on_session",
|
||||
},
|
||||
Response: {
|
||||
status: 400,
|
||||
body: {
|
||||
type: "invalid_request",
|
||||
message:
|
||||
"You cannot confirm this payment using `manual_retry` because the allowed duration has expired",
|
||||
code: "IR_16",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
bank_redirect_pm: {
|
||||
Ideal: {
|
||||
|
||||
@@ -20,6 +20,14 @@ const successfulThreeDSTestCardDetails = {
|
||||
card_cvc: "737",
|
||||
};
|
||||
|
||||
const failedNo3DSCardDetails = {
|
||||
card_number: "4900490000000519",
|
||||
card_exp_month: "01",
|
||||
card_exp_year: "35",
|
||||
card_holder_name: "CCREJECT-REFUSED",
|
||||
card_cvc: "123",
|
||||
};
|
||||
|
||||
const singleUseMandateData = {
|
||||
customer_acceptance: customerAcceptance,
|
||||
mandate_type: {
|
||||
@@ -533,6 +541,83 @@ export const connectorDetails = {
|
||||
},
|
||||
},
|
||||
},
|
||||
No3DSFailPayment: {
|
||||
Request: {
|
||||
payment_method: "card",
|
||||
payment_method_data: {
|
||||
card: failedNo3DSCardDetails,
|
||||
},
|
||||
customer_acceptance: null,
|
||||
setup_future_usage: "on_session",
|
||||
},
|
||||
Response: {
|
||||
status: 200,
|
||||
body: {
|
||||
status: "failed",
|
||||
error_code: "85",
|
||||
error_message: "the card is not enrolled for a supported 3DS version",
|
||||
},
|
||||
},
|
||||
},
|
||||
ManualRetryPaymentDisabled: {
|
||||
Request: {
|
||||
payment_method: "card",
|
||||
payment_method_data: {
|
||||
card: successfulNo3DSCardDetails,
|
||||
},
|
||||
currency: "USD",
|
||||
customer_acceptance: null,
|
||||
setup_future_usage: "on_session",
|
||||
},
|
||||
Response: {
|
||||
status: 400,
|
||||
body: {
|
||||
type: "invalid_request",
|
||||
message:
|
||||
"You cannot confirm this payment because it has status failed, you can enable `manual_retry` in profile to try this payment again",
|
||||
code: "IR_16",
|
||||
},
|
||||
},
|
||||
},
|
||||
ManualRetryPaymentEnabled: {
|
||||
Request: {
|
||||
payment_method: "card",
|
||||
payment_method_data: {
|
||||
card: successfulNo3DSCardDetails,
|
||||
},
|
||||
currency: "USD",
|
||||
customer_acceptance: null,
|
||||
setup_future_usage: "on_session",
|
||||
},
|
||||
Response: {
|
||||
status: 200,
|
||||
body: {
|
||||
status: "succeeded",
|
||||
payment_method: "card",
|
||||
attempt_count: 2,
|
||||
},
|
||||
},
|
||||
},
|
||||
ManualRetryPaymentCutoffExpired: {
|
||||
Request: {
|
||||
payment_method: "card",
|
||||
payment_method_data: {
|
||||
card: successfulNo3DSCardDetails,
|
||||
},
|
||||
currency: "USD",
|
||||
customer_acceptance: null,
|
||||
setup_future_usage: "on_session",
|
||||
},
|
||||
Response: {
|
||||
status: 400,
|
||||
body: {
|
||||
type: "invalid_request",
|
||||
message:
|
||||
"You cannot confirm this payment using `manual_retry` because the allowed duration has expired",
|
||||
code: "IR_16",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
bank_redirect_pm: {
|
||||
Ideal: {
|
||||
|
||||
@@ -446,6 +446,7 @@ export const CONNECTOR_LISTS = {
|
||||
OVERCAPTURE: ["adyen"],
|
||||
MANUAL_RETRY: [
|
||||
"cybersource",
|
||||
"checkout",
|
||||
"stripe",
|
||||
"adyen",
|
||||
"airwallex",
|
||||
@@ -456,10 +457,14 @@ export const CONNECTOR_LISTS = {
|
||||
"fiuu",
|
||||
"globalpay",
|
||||
"nexinets",
|
||||
"nuvei",
|
||||
"paypal",
|
||||
"powertranz",
|
||||
"shift4",
|
||||
"trustpay",
|
||||
"worldpay",
|
||||
"worldpayvantiv",
|
||||
"worldpayxml",
|
||||
],
|
||||
PAYMENTS_WEBHOOK: ["noon", "stripe", "authorizedotnet"],
|
||||
// Add more inclusion lists
|
||||
|
||||
Reference in New Issue
Block a user