spree
spree copied to clipboard
feat: add stripe payment element support
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
andgetPaymentIntent
.
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.
Thanks for the review @letelete . I have updated to address your feedback if you would like to take another look :+1: