Repository navigation
fix(core): refuse stripe_tax with a non-Stripe provider - #111
Closed
alexasomba wants to merge 1 commit into
Closed
alexasomba wants to merge 1 commit into
alexasomba wants to merge 1 commit into
Conversation
Author
|
Superseded by #115. No review had started, so the two small safety fixes were combined to reduce the stack. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of the Flutterwave follow-up in #97. Independent of the split work.
Why
taxMode: "stripe_tax"defers tax calculation to Stripe: core returns zero tax inrecalculate()and sendsautomaticTax: trueon checkout. A provider that does not implement Stripe'sautomatic_tax(Flutterwave, Paystack, the mock) ignores that field, so the customer is charged the pre-tax total with no error.This is the one silent money bug in the Stripe parity gap. Flat and table tax are unaffected because core computes those and includes them in the amount.
What
checkout/create-sessionreturns409withcode: "stripe_tax_requires_stripe"whentaxModeisstripe_taxand the selected provider is not Stripe.Tests
stripe_taxwith the mock provider returns 409 and the code; flat tax still starts checkout.upstream/main, 0 failures.Notes
checkout/create-intentis already Stripe-only and returns 409 for a non-Stripe provider before this point.