Repository navigation
Conversation
This was referenced Nov 24, 2026
moset15
added a commit
to FIKANOVA/dashcommerce
that referenced
this pull request
Nov 26, 2026
…rk main [FIK-73] feat(core,paystack): tell the customer when the provider refuses the currency (fork integration of upstream emdashCommerce#94)
…currency Core exports CurrencyNotSupportedError; create-session answers it with a 400 the customer can act on instead of a 500. Paystack throws it for an unsupported currency and for its unsupported_currency refusal. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
moset15
force-pushed
the
fix/clear-currency-refusal
branch
from
December 5, 2026 22:53
8286cac to
fdb2c45
Compare
Contributor
Author
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.
Stacked on #85 (it changes
packages/paystack). Please review it after #85; it then shows only its own commit.Problem
Found while testing #85: a USD cart on a Paystack account that isn't enabled for USD. Paystack answers 403
unsupported_currency,create-sessionanswers 500, and the customer sees "Payment couldn't start. Please try again in a moment". Retrying never helps.Change
CurrencyNotSupportedErrorfrom@dashcommerce/core/payment-provider. A provider throws it frominitCheckoutwhen it refuses the cart's currency.create-sessionanswers it with a 400:{ error, code: "currency_not_supported", currency }. The hosted form already showserror, so the customer reads "This shop can't take payments in USD right now. Choose another currency, or contact the shop." Any other error frominitCheckoutstill throws as before.code, notinstanceof, so a provider bundling its own copy of core still works.unsupported_currencyrefusal.README note for provider authors, and a patch changeset for both packages.
Tested
codealone, and other errors still failing loudly. Two of the three fail without the change.create-sessionwith a Paystack stand-in that refuses KES.