-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added files for cypress tests and made some error handling changes
- Loading branch information
Sayak Bhattacharya
authored and
Sayak Bhattacharya
committed
Nov 25, 2024
1 parent
76fb9c5
commit ac53ed5
Showing
5 changed files
with
211 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,160 @@ | ||
const successfulNo3DSCardDetails = { | ||
card_number : "6011016011016011", | ||
card_exp_month : "10", | ||
card_exp_year : "2027", | ||
card_holder_name : "John Doe", | ||
card_cvc : "123", | ||
}; | ||
|
||
export const connectorDetails = { | ||
card_pm : { | ||
PaymentIntent : { | ||
Request : { | ||
currency : "USD", | ||
customer_acceptance : null, | ||
setup_future_usage : "on_session", | ||
}, | ||
Response : { | ||
status : 200, | ||
body : { | ||
status : | ||
"requires_payment_method", | ||
}, | ||
}, | ||
}, | ||
No3DSManualCapture: { | ||
Request: { | ||
currency: "USD", | ||
payment_method: "card", | ||
billing: { | ||
address: { | ||
line1: "1467", | ||
line2: "CA", | ||
line3: "CA", | ||
city: "Musterhausen", | ||
state: "California", | ||
zip: "12345", | ||
country: "US", | ||
first_name: "Max", | ||
last_name: "Mustermann", | ||
}, | ||
email: "[email protected]", | ||
phone: { | ||
number: "9123456789", | ||
country_code: "+91", | ||
}, | ||
}, | ||
payment_method_data: { | ||
card: successfulNo3DSCardDetails, | ||
}, | ||
customer_acceptance: null, | ||
setup_future_usage: "on_session", | ||
}, | ||
Response: { | ||
status: 200, | ||
body: { | ||
status: "requires_capture", | ||
}, | ||
}, | ||
}, | ||
No3DSAutoCapture: { | ||
Request: { | ||
// Auto capture with different currency, so we need to pass currency in here | ||
currency: "USD", | ||
payment_method: "card", | ||
// billing: { | ||
// address: { | ||
// line1: "1467", | ||
// line2: "CA", | ||
// line3: "CA", | ||
// city: "Musterhausen", | ||
// state: "California", | ||
// zip: "12345", | ||
// country: "US", | ||
// first_name: "Max", | ||
// last_name: "Mustermann", | ||
// }, | ||
// email: "[email protected]", | ||
// phone: { | ||
// number: "9123456789", | ||
// country_code: "+91", | ||
// }, | ||
// }, | ||
payment_method_data: { | ||
card: successfulNo3DSCardDetails, | ||
}, | ||
customer_acceptance: null, | ||
setup_future_usage: "on_session", | ||
}, | ||
Response: { | ||
status: 200, | ||
body: { | ||
status: "succeeded", | ||
}, | ||
}, | ||
}, | ||
Capture: { | ||
Request: { | ||
payment_method: "card", | ||
payment_method_data: { | ||
card: successfulNo3DSCardDetails, | ||
}, | ||
customer_acceptance: null, | ||
}, | ||
Response: { | ||
status: 200, | ||
body: { | ||
status: "succeeded", | ||
amount: 6500, | ||
amount_capturable: 0, | ||
amount_received: 6500, | ||
}, | ||
}, | ||
}, | ||
Refund: { | ||
Request: { | ||
payment_method: "card", | ||
payment_method_data: { | ||
card: successfulNo3DSCardDetails, | ||
}, | ||
customer_acceptance: null, | ||
}, | ||
Response: { | ||
status: 200, | ||
body: { | ||
status: "succeeded", | ||
}, | ||
}, | ||
}, | ||
PartialRefund: { | ||
Request: { | ||
payment_method: "card", | ||
payment_method_data: { | ||
card: successfulNo3DSCardDetails, | ||
}, | ||
customer_acceptance: null, | ||
}, | ||
Response: { | ||
status: 200, | ||
body: { | ||
status: "succeeded", | ||
}, | ||
}, | ||
}, | ||
SyncRefund: { | ||
Request: { | ||
payment_method: "card", | ||
payment_method_data: { | ||
card: successfulNo3DSCardDetails, | ||
}, | ||
customer_acceptance: null, | ||
}, | ||
Response: { | ||
status: 200, | ||
body: { | ||
status: "succeeded", | ||
}, | ||
}, | ||
}, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters