Kingdom Funding gateway via NMI (replaces Accept Blue)#8
Open
michael-revitpay wants to merge 4 commits into
Open
Kingdom Funding gateway via NMI (replaces Accept Blue)#8michael-revitpay wants to merge 4 commits into
michael-revitpay wants to merge 4 commits into
Conversation
- KingdomFundingTokenForm: hosted tokenization component (iframe) that exposes a getNonce() handle to parent forms - KingdomFundingNonAuthDonationInner: guest donation flow for Kingdom Funding with card + ACH bank account support, reCAPTCHA, and one-time/recurring modes - Helpers: added "kingdomfunding" to provider type unions in PaymentMethod, DonationInterface, StripePaymentMethod; widened DonationHelper.isProvider and findGatewayByProvider; new DonationHelper.isKingdomFunding helper - Components/index.tsx: three new exports for the Kingdom Funding components - DonationPreviewModal: useEffect to reset loading state when modal reopens - 4 single-line type-cast boundaries in BankForm/CardForm/DonationForm/ MultiGatewayDonationForm so the widened provider union doesn't break existing Stripe-only paths All additive -- no upstream methods, types, or exports removed. handle3DSIfRequired and ThreeDSResult are preserved untouched.
- Restore MultiGatewayDonationForm, PaymentMethods, RecurringDonations cancel button, and NonAuthDonation polish that were dropped during the earlier surgical refactor. - Fix donation history dates falling back to today by reading donationDate from the API response. - Cover the unhandled promise rejection from Accept Blue's hosted tokenization destroy(). - Add KF locale strings (donation.kingdomFunding.*) to both the apphelper fallbacks and the playground en.json. - Add a playground README with sandbox test cards and KF setup notes. - Add .env to .gitignore.
Replace the Accept Blue hosted-tokenization iframe with NMI Collect.js in KingdomFundingTokenForm (card + ACH, returns payment_token; backward-compatible result). Wire a card/bank toggle through MultiGatewayDonationForm, KingdomFundingNonAuthDonationInner, and PaymentMethods; remove the old un-tokenized routing/account path and the KF_ACH_ENABLED=false gates so donors can tokenize ACH. Add payWithCard/payWithBank locale strings. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… bank tab) NMI Collect.js only honors one configure() per script load, so toggling the field set silently failed to re-init (bank/ACH form hung on the loading spinner). Reload the script on field-set change and add a fail-safe timeout so it never hangs. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Kingdom Funding gateway via NMI (Accept Blue → NMI)
Implements the Kingdom Funding payment gateway on NMI (Network Merchants Inc.) instead of Accept Blue. The motivation is ACH: Accept Blue cannot tokenize bank accounts, while NMI Collect.js tokenizes both card and ACH into a single-use
payment_token, so donors can give by card or bank account.This is internals-only — the "Kingdom Funding" name, branding, signup flow, locale strings, dropdown labels, and the admin gateway-settings page are unchanged. (This is the NMI version of the earlier Kingdom Funding work; supersedes the Accept Blue approach.)
Highlights
KingdomFundingGatewayProvideron the NMI Payment API (transact.php) — card+ACH charge viapayment_token, Customer Vault for saved methods, recurring subscriptions, refund/void, andWebhook-SignatureHMAC-SHA256 verification.gatewayscolumns:publicKey= Collect.js tokenization key,privateKey= NMI Security Key,webhookKey= NMI signing key.Verification
tscclean (Api + apphelper); gateway unit tests pass.NMI_MIGRATION_HANDOFF.md(in the Api PR) has setup, local-test, and config details. Note: the branch is based on the Kingdom Funding integration and is behind currentmain, so a merge/rebase may be needed on your side.🤖 Generated with Claude Code