solidusio / solidus_stripe

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

Guarantee payment is linked to payment intent when receiving webhooks #236

Closed waiting-for-dev closed 1 year ago

waiting-for-dev commented 1 year ago

Summary

We create and confirm the Stripe payment intent in two steps. That's to guarantee that we associate a Solidus payment on the creation, and we can fetch it after webhook events are published on confirmation.

Closes #231

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 #236 (f827aec) into master (7201766) will increase coverage by 0.02%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #236      +/-   ##
==========================================
+ Coverage   96.37%   96.39%   +0.02%     
==========================================
  Files          23       23              
  Lines         441      444       +3     
==========================================
+ Hits          425      428       +3     
  Misses         16       16              
Impacted Files Coverage Ξ”
app/models/solidus_stripe/gateway.rb 96.49% <100.00%> (+0.19%) :arrow_up:

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