mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-27 19:46:48 +08:00
418 lines
9.4 KiB
JavaScript
418 lines
9.4 KiB
JavaScript
const successfulNo3DSCardDetails = {
|
|
card_number: "4000000000002503",
|
|
card_exp_month: "08",
|
|
card_exp_year: "25",
|
|
card_holder_name: "joseph Doe",
|
|
card_cvc: "999",
|
|
};
|
|
|
|
const successfulThreeDSTestCardDetails = {
|
|
card_number: "4000000000002503",
|
|
card_exp_month: "10",
|
|
card_exp_year: "25",
|
|
card_holder_name: "morino",
|
|
card_cvc: "999",
|
|
};
|
|
|
|
export const connectorDetails = {
|
|
card_pm: {
|
|
PaymentIntent: {
|
|
Request: {
|
|
card: successfulNo3DSCardDetails,
|
|
currency: "USD",
|
|
customer_acceptance: null,
|
|
setup_future_usage: "on_session",
|
|
},
|
|
Response: {
|
|
status: 200,
|
|
body: {
|
|
status: "requires_payment_method",
|
|
},
|
|
},
|
|
},
|
|
"3DSManualCapture": {
|
|
Request: {
|
|
card: successfulThreeDSTestCardDetails,
|
|
currency: "USD",
|
|
customer_acceptance: null,
|
|
setup_future_usage: "on_session",
|
|
},
|
|
Response: {
|
|
status: 200,
|
|
body: {
|
|
status: "processing",
|
|
},
|
|
},
|
|
},
|
|
"3DSAutoCapture": {
|
|
Request: {
|
|
card: successfulThreeDSTestCardDetails,
|
|
currency: "USD",
|
|
customer_acceptance: null,
|
|
setup_future_usage: "on_session",
|
|
},
|
|
Response: {
|
|
status: 200,
|
|
body: {
|
|
status: "processing",
|
|
},
|
|
},
|
|
},
|
|
No3DSManualCapture: {
|
|
Request: {
|
|
card: successfulNo3DSCardDetails,
|
|
currency: "USD",
|
|
customer_acceptance: null,
|
|
setup_future_usage: "on_session",
|
|
},
|
|
Response: {
|
|
status: 200,
|
|
body: {
|
|
status: "processing",
|
|
},
|
|
},
|
|
},
|
|
No3DSAutoCapture: {
|
|
Request: {
|
|
card: successfulNo3DSCardDetails,
|
|
currency: "USD",
|
|
customer_acceptance: null,
|
|
setup_future_usage: "on_session",
|
|
},
|
|
Response: {
|
|
status: 200,
|
|
body: {
|
|
status: "processing",
|
|
},
|
|
},
|
|
},
|
|
Capture: {
|
|
Request: {
|
|
card: successfulNo3DSCardDetails,
|
|
currency: "USD",
|
|
customer_acceptance: null,
|
|
},
|
|
Response: {
|
|
status: 200,
|
|
body: {
|
|
status: "processing",
|
|
amount: 6500,
|
|
amount_capturable: 6500,
|
|
},
|
|
},
|
|
},
|
|
PartialCapture: {
|
|
Request: {},
|
|
Response: {
|
|
status: 200,
|
|
body: {
|
|
status: "processing",
|
|
amount: 6500,
|
|
amount_capturable: 6500,
|
|
},
|
|
},
|
|
},
|
|
Void: {
|
|
Request: {},
|
|
Response: {
|
|
status: 400,
|
|
body: {
|
|
error: {
|
|
code: "IR_16",
|
|
message:
|
|
"You cannot cancel this payment because it has status processing",
|
|
type: "invalid_request",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
Refund: {
|
|
Request: {
|
|
card: successfulNo3DSCardDetails,
|
|
currency: "USD",
|
|
customer_acceptance: null,
|
|
},
|
|
Response: {
|
|
status: 200,
|
|
body: {
|
|
status: "pending",
|
|
},
|
|
},
|
|
},
|
|
PartialRefund: {
|
|
Request: {
|
|
card: successfulNo3DSCardDetails,
|
|
currency: "USD",
|
|
customer_acceptance: null,
|
|
},
|
|
Response: {
|
|
status: 200,
|
|
body: {
|
|
status: "pending",
|
|
},
|
|
},
|
|
},
|
|
SyncRefund: {
|
|
Request: {
|
|
card: successfulNo3DSCardDetails,
|
|
currency: "USD",
|
|
customer_acceptance: null,
|
|
},
|
|
Response: {
|
|
status: 200,
|
|
body: {
|
|
status: "succeeded",
|
|
},
|
|
},
|
|
},
|
|
MandateSingleUse3DSAutoCapture: {
|
|
Request: {
|
|
card: successfulThreeDSTestCardDetails,
|
|
currency: "USD",
|
|
mandate_type: {
|
|
single_use: {
|
|
amount: 8000,
|
|
currency: "USD",
|
|
},
|
|
},
|
|
},
|
|
Response: {
|
|
status: 400,
|
|
body: {
|
|
error: {
|
|
type: "invalid_request",
|
|
message: "Payment method type not supported",
|
|
code: "HE_03",
|
|
reason: "debit mandate payment is not supported by nmi",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
MandateSingleUse3DSManualCapture: {
|
|
Request: {
|
|
card: successfulThreeDSTestCardDetails,
|
|
currency: "USD",
|
|
mandate_type: {
|
|
single_use: {
|
|
amount: 8000,
|
|
currency: "USD",
|
|
},
|
|
},
|
|
},
|
|
Response: {
|
|
status: 400,
|
|
body: {
|
|
error: {
|
|
type: "invalid_request",
|
|
message: "Payment method type not supported",
|
|
code: "HE_03",
|
|
reason: "debit mandate payment is not supported by nmi",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
MandateSingleUseNo3DSAutoCapture: {
|
|
Request: {
|
|
card: successfulNo3DSCardDetails,
|
|
currency: "USD",
|
|
mandate_type: {
|
|
single_use: {
|
|
amount: 8000,
|
|
currency: "USD",
|
|
},
|
|
},
|
|
},
|
|
Response: {
|
|
status: 400,
|
|
body: {
|
|
error: {
|
|
type: "invalid_request",
|
|
message: "Payment method type not supported",
|
|
code: "HE_03",
|
|
reason: "debit mandate payment is not supported by nmi",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
MandateSingleUseNo3DSManualCapture: {
|
|
Request: {
|
|
card: successfulNo3DSCardDetails,
|
|
currency: "USD",
|
|
mandate_type: {
|
|
single_use: {
|
|
amount: 8000,
|
|
currency: "USD",
|
|
},
|
|
},
|
|
},
|
|
Response: {
|
|
status: 400,
|
|
body: {
|
|
error: {
|
|
type: "invalid_request",
|
|
message: "Payment method type not supported",
|
|
code: "HE_03",
|
|
reason: "debit mandate payment is not supported by nmi",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
MandateMultiUseNo3DSAutoCapture: {
|
|
Request: {
|
|
card: successfulNo3DSCardDetails,
|
|
currency: "USD",
|
|
mandate_type: {
|
|
multi_use: {
|
|
amount: 8000,
|
|
currency: "USD",
|
|
},
|
|
},
|
|
},
|
|
Response: {
|
|
status: 400,
|
|
body: {
|
|
error: {
|
|
type: "invalid_request",
|
|
message: "Payment method type not supported",
|
|
code: "HE_03",
|
|
reason: "debit mandate payment is not supported by nmi",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
MandateMultiUseNo3DSManualCapture: {
|
|
Request: {
|
|
card: successfulNo3DSCardDetails,
|
|
currency: "USD",
|
|
mandate_type: {
|
|
multi_use: {
|
|
amount: 8000,
|
|
currency: "USD",
|
|
},
|
|
},
|
|
},
|
|
Response: {
|
|
status: 400,
|
|
body: {
|
|
error: {
|
|
type: "invalid_request",
|
|
message: "Payment method type not supported",
|
|
code: "HE_03",
|
|
reason: "debit mandate payment is not supported by nmi",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
MandateMultiUse3DSAutoCapture: {
|
|
Request: {
|
|
card: successfulThreeDSTestCardDetails,
|
|
currency: "USD",
|
|
mandate_type: {
|
|
multi_use: {
|
|
amount: 8000,
|
|
currency: "USD",
|
|
},
|
|
},
|
|
},
|
|
Response: {
|
|
status: 400,
|
|
body: {
|
|
error: {
|
|
type: "invalid_request",
|
|
message: "Payment method type not supported",
|
|
code: "HE_03",
|
|
reason: "debit mandate payment is not supported by nmi",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
MandateMultiUse3DSManualCapture: {
|
|
Request: {
|
|
card: successfulThreeDSTestCardDetails,
|
|
currency: "USD",
|
|
mandate_type: {
|
|
multi_use: {
|
|
amount: 8000,
|
|
currency: "USD",
|
|
},
|
|
},
|
|
},
|
|
Response: {
|
|
status: 400,
|
|
body: {
|
|
error: {
|
|
type: "invalid_request",
|
|
message: "Payment method type not supported",
|
|
code: "HE_03",
|
|
reason: "debit mandate payment is not supported by nmi",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
ZeroAuthMandate: {
|
|
Request: {
|
|
card: successfulNo3DSCardDetails,
|
|
currency: "USD",
|
|
mandate_type: {
|
|
single_use: {
|
|
amount: 8000,
|
|
currency: "USD",
|
|
},
|
|
},
|
|
},
|
|
Response: {
|
|
status: 501,
|
|
body: {
|
|
error: {
|
|
type: "invalid_request",
|
|
message: "Setup Mandate flow for Nmi is not implemented",
|
|
code: "IR_00",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
SaveCardUseNo3DSAutoCapture: {
|
|
Request: {
|
|
card: successfulNo3DSCardDetails,
|
|
currency: "USD",
|
|
setup_future_usage: "on_session",
|
|
customer_acceptance: {
|
|
acceptance_type: "offline",
|
|
accepted_at: "1963-05-03T04:07:52.723Z",
|
|
online: {
|
|
ip_address: "127.0.0.1",
|
|
user_agent: "amet irure esse",
|
|
},
|
|
},
|
|
},
|
|
Response: {
|
|
status: 200,
|
|
body: {
|
|
status: "processing",
|
|
},
|
|
},
|
|
},
|
|
SaveCardUseNo3DSManualCapture: {
|
|
Request: {
|
|
card: successfulNo3DSCardDetails,
|
|
currency: "USD",
|
|
setup_future_usage: "on_session",
|
|
customer_acceptance: {
|
|
acceptance_type: "offline",
|
|
accepted_at: "1963-05-03T04:07:52.723Z",
|
|
online: {
|
|
ip_address: "127.0.0.1",
|
|
user_agent: "amet irure esse",
|
|
},
|
|
},
|
|
},
|
|
Response: {
|
|
status: 200,
|
|
body: {
|
|
status: "processing",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
};
|