fix(ramp): show PayPal in payment selector for UB2 (TRAM-3462) cp-7.74.0#29046
Conversation
PaymentSelectionModal and ProviderSelectionModal omitted `redirectUrl` when fetching quotes, so the API never materialized a PayPal dummy quote and PayPal only appeared in `customActions`. The per-row visibility filter also excluded `isCustomAction: true` quotes, so PayPal was hidden even when returned. Pass `redirectUrl: getRampCallbackBaseUrl()` from both modals and drop the `!isCustomAction(q)` clause from the `visiblePaymentMethods` filter so custom-action quotes count as available. The per-item matchedQuote find still skips custom-action quotes so rows without a priced quote don't render a misleading amount.
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 1f06b92. Configure here.
|
aah so we were actually not sending the redirect url in that view get quotes call, great catch. One question, if paypal is selected the flow works normally? Please fix the unused |
I plan to remove the As far as "works normally", yes - I am directed to PayPal's iframe/widget url.
@wachunei
|
|
@wachunei yes —
|
|
@wachunei All changes were made |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: Key changes:
These changes are entirely scoped to the Ramp (buy/sell) feature. No shared components (navigation, Engine, controllers, confirmations), no cross-cutting concerns. SmokeRamps is the correct and only tag needed. No dependent tags are required per the tag descriptions. Performance Test Selection: |
|
|
✅ E2E Fixture Validation — Schema is up to date |





Description
In Unified Buy V2, PayPal is not shown in the Pay With bottom sheet even when the server would accept it. Two defects stack:
PaymentSelectionModalandProviderSelectionModalcalleduseRampsQuoteswithoutredirectUrl. The quotes API only materializes a PayPal dummy quote when bothredirectUrlandwalletAddressare provided; otherwise PayPal is only returned undercustomActions.BuildQuotealready sendsredirectUrl, but the selection-stage modals were inconsistent.PaymentSelectionModal's visibility filter inrenderListContentexcluded anysuccessentry withquote.isCustomAction: true, so even when PayPal surfaced insuccess(e.g. when we do passredirectUrl), its payment method row was still filtered out and the "No payment methods are available." banner was shown.This PR:
redirectUrl: getRampCallbackBaseUrl()fromPaymentSelectionModalandProviderSelectionModal, matchingBuildQuote's existing shape so the quotes request is consistent across selection stages.!isCustomAction(q)from thevisiblePaymentMethodsfilter so custom-action quotes count as "available" for listing. The per-itemmatchedQuotefind remains strict, so custom-action rows still do not render a misleading priced preview.Changelog
CHANGELOG entry: Fixed a bug where PayPal was missing from the Pay With list in Unified Buy V2 and the selector showed "No payment methods are available." instead.
Related issues
Fixes: https://consensyssoftware.atlassian.net/jira/software/c/projects/TRAM/boards/1568?assignee=712020%3Afd12f7ea-d9e1-4a0a-8a26-36804c9e11c9&selectedIssue=TRAM-3462
Manual testing steps
Screenshots/Recordings
Before
https://www.loom.com/share/865aefe1f2024ed28f0564192c01bf0b
After
https://www.loom.com/share/556420ed2f3c41028cc9a1fc21b0d847
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
Small UI selection logic change plus added test coverage; risk is limited to which payment methods are shown and the quote request parameters sent.
Overview
Fixes Unified Buy V2 payment/provider selection so quote fetches from
PaymentSelectionModalandProviderSelectionModalincluderedirectUrl: getRampCallbackBaseUrl(), aligning them with the Build Quote flow and enabling providers that require a redirect URL to surface correctly.Updates the payment-method visibility filter to treat custom-action quotes as “available” (so their rows remain listed), while keeping per-row price previews gated by non-custom-action quotes; tests were updated/added to cover both the new
redirectUrlparam and the custom-action visibility/no-price behavior.Reviewed by Cursor Bugbot for commit 8c4209e. Bugbot is set up for automated code reviews on this repo. Configure here.