solidusio / solidus_stripe

๐Ÿ’ณ Integrate Solidus with Stripe
https://stripe.com
BSD 3-Clause "New" or "Revised" License
36 stars 62 forks source link

Improve payment form handling and start using `@stripe/stripe-js` module #255

Closed elia closed 1 year ago

elia commented 1 year ago

Summary

Extracted from #249

Use the @stripe/stripe-js module with importmap, as partially described in the Stripe doc.

The <script> tag is added to every page to support fraud detection as suggested in the stripe-js repo. We opted for using the script tag instead of relying on the implicit side-effect because the browser will be able to start loading it earlier if it's directly in the HTML.

https://github.com/stripe/stripe-js#ensuring-stripejs-is-available-everywhere

Checklist

Check out our PR guidelines for more details.

The following are mandatory for all PRs:

The following are not always needed:

codecov[bot] commented 1 year ago

Codecov Report

Merging #255 (07723f1) into master (682579e) will decrease coverage by 0.01%. The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #255      +/-   ##
==========================================
- Coverage   99.79%   99.79%   -0.01%     
==========================================
  Files          25       25              
  Lines         481      480       -1     
==========================================
- Hits          480      479       -1     
  Misses          1        1              
Impacted Files Coverage ฮ”
...lates/app/views/checkouts/payment/_stripe.html.erb 100.00% <รธ> (รธ)

:mega: Weโ€™re building smart automated test selection to slash your CI/CD build times. Learn more