hyperswitch
hyperswitch copied to clipboard
feat(stripe): add support for afterpay clearpay through stripe
Type of Change
- [x] New feature
Description
This PR will support creating pay_later payments using afterpay_clearpay
as the issuer through stripe. This is a redirection flow.
Motivation and Context
#347
How did you test it?
- Create a payment with
payment_method_data
aspay_later
and body as
{
"payment_method_data": {
"pay_later": {
"afterpay_clearpay_redirect": {
"issuer_name": "afterpay_clearpay",
"billing_email": "[email protected]",
"billing_name": "Juspay"
}
}
}
}
- Complete the redirection
- Redirection status is succeeced
Checklist
- [x] I formatted the code
cargo +nightly fmt --all
- [x] I addressed lints thrown by
cargo clippy
- [x] I reviewed submitted code
@Narayanbhat166 , For the address validation errors, I feel that if the address fields fail multiple constraints, we should return all the errors, or atleast return that what are all the mandatory fields, so that the developer can make sure the field conforms to the requirement with just single try.
@Narayanbhat166 , For the address validation errors, I feel that if the address fields fail multiple constraints, we should return all the errors, or atleast return that what are all the mandatory fields, so that the developer can make sure the field conforms to the requirement with just single try.
Yes @ashokkjag I agree, that will be a good experience to user. Will take that up in a separate PR. Created an issue #451