Enable Klarna and PayPal on the Banxa buy path#6057
Open
j0ntz wants to merge 1 commit into
Open
Conversation
Banxa already exposes Klarna (KLARNACKO, SEK) and PayPal (PRIMERPAYPAL, EUR) via its payment-methods API, but the GUI dropped both because their payment-type codes were not recognized. Add a klarna FiatPaymentType, map the two Banxa codes, and allow both on the Banxa buy path so the options surface in the ramp flow. PayPal reuses the existing logo and string; Klarna falls back to the provider icon until a dedicated asset is added.
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.
Description
Enables Klarna and PayPal as Buy payment options on the Banxa ramp path.
Banxa already exposes both methods through its payment-methods API (verified live:
KLARNACKOfor Klarna in SEK andPRIMERPAYPALfor PayPal in EUR, bothACTIVE/FIAT_TO_CRYPTO), but the GUI dropped them because their payment-type codes were not recognized by the Banxa ramp plugin's cleaner. This adds the two codes, maps them to Edge payment types, and allows them on the buy path so they surface in the ramp option list.Changes (all in the live
src/plugins/rampsarchitecture, which powers the current Buy flow):klarnato theFiatPaymentTypeunion (paypalalready existed).KLARNACKOandPRIMERPAYPAL, map them toklarna/paypal, and setklarna: true/paypal: trueunderallowedPaymentTypes.buy.klarnacases to the buy and sell settlement-range switches and aklarnaentry to the payment-type icon map (falls back to the provider icon until a dedicated Klarna asset is added by design).Asana: https://app.asana.com/0/1215088146871429/1215175793390820
CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
none
Requirements
If you have made any visual changes to the GUI. Make sure you have:
Testing notes: tsc, jest (436 tests), and verify-repo all pass. The in-app Banxa Buy ramp scene could not be driven on the iOS simulator because
RampCreateScenehits a reproducible debug-build RN FabricRCTTextLayoutManagercrash on render (unrelated to this data-only change). Behavior was instead verified directly against the mechanism the UI routes through: the live Banxa payment-methods response was run through the committedtypeMapandallowedPaymentTypes.buy, confirmingKLARNACKO->klarnaandPRIMERPAYPAL->paypalare now recognized and allowed on the buy path. A follow-up is noted for design to supply an official Klarna logo asset.Note
Low Risk
Data-layer ramp configuration and UI labels only; no auth or payment execution logic changes in-app.
Overview
Banxa buy now surfaces Klarna and PayPal by recognizing Banxa API codes
KLARNACKOandPRIMERPAYPAL, mapping them toklarna/paypal, and allowing both underallowedPaymentTypes.buy(PayPal was already a knownFiatPaymentTypebut was not wired for Banxa buy).Adds
klarnato the fiat payment type union, localized Klarna label, settlement-range cases for Klarna on buy/sell, and icon handling where Klarna intentionally has no dedicated asset (null→ provider icon). Unit tests cover the new display name and null icon behavior.Reviewed by Cursor Bugbot for commit c254821. Bugbot is set up for automated code reviews on this repo. Configure here.