spree icon indicating copy to clipboard operation
spree copied to clipboard

feat: add stripe payment element support

Open mdavo6 opened this issue 2 years ago • 1 comments

Description

  • Adds support for stripe payment element (previous implementation used card element) - see comparison: https://stripe.com/docs/payments/payment-card-element-comparison.
  • Order no longer proceeds to complete when payment fails.
  • Adds support for error message from payment element when payment fails.
  • Adds two new API clients to support new functionality - addPaymentMethod and getPaymentIntent.

Related Issue

#256

Motivation and Context

See description in #256 In short, the Stripe payment element offers 18+ payment methods OOB vs the current implementation which offers card payment only.

How Has This Been Tested?

Tested on chrome. Note: PR will require corresponding spree_gateway PR to work https://github.com/spree/spree_gateway/pull/409.

Screenshots (if appropriate):

Types of changes

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [X] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • [X] My code follows the code style of this project.
  • [X] My change requires a change to the documentation.
  • [ ] I have updated the documentation accordingly.
  • [X] I have read the CONTRIBUTING document.
  • [ ] I have added tests to cover my changes.
  • [ ] All new and existing tests passed.

mdavo6 avatar Aug 18 '22 07:08 mdavo6

Thanks for the review @letelete . I have updated to address your feedback if you would like to take another look :+1:

mdavo6 avatar Aug 23 '22 01:08 mdavo6