hyperswitch icon indicating copy to clipboard operation
hyperswitch copied to clipboard

feat(stripe): add support for afterpay clearpay through stripe

Open Narayanbhat166 opened this issue 2 years ago • 2 comments

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 as pay_later and body as
{
  "payment_method_data": {
    "pay_later": {
      "afterpay_clearpay_redirect": {
        "issuer_name": "afterpay_clearpay",
        "billing_email": "[email protected]",
        "billing_name": "Juspay"
      }
    }
  }
}

Screenshot 2023-01-20 at 11 23 29 PM

  • Complete the redirection Screenshot 2023-01-20 at 11 23 42 PM
  • Redirection status is succeeced Screenshot 2023-01-20 at 11 23 57 PM

Checklist

  • [x] I formatted the code cargo +nightly fmt --all
  • [x] I addressed lints thrown by cargo clippy
  • [x] I reviewed submitted code

Narayanbhat166 avatar Jan 20 '23 17:01 Narayanbhat166

@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.

ashokkjag avatar Jan 22 '23 13:01 ashokkjag

@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

Narayanbhat166 avatar Jan 22 '23 13:01 Narayanbhat166