Use payment gateway label instead of Paypal by default

Created on 8 February 2024, 10 months ago
Updated 9 September 2024, 3 months ago

The problem

As mentionned in this issue : 🐛 Use payment gateway display label instead of payment method label Closed: works as designed , stored payment methods use the payment method label as payment option label.

This label in build by the buildLabel() method in PayPalCheckout payment method. When no card_type is stored in the payment method (typically when we go back to the previous checkout step), the function return "Paypal" by default. I think it is a bad behaviour because of this issue : #3154770: Remove duplicate PayPal payment method options in checkout. . I'll explain : the condition added in this issue removes the "default" Paypal payment option when a Paypal payment method is already stored. But the label of these 2 options is not created the same way :
- One is made with the payment method label
- The other one is made with the payment gateway display label

So when I choose Paypal, that I go to the review step then I go gack on the previous checkout step, the label changed. In my site, the display label of my Paypal gateway is not just "Paypal", this is why I noticed the change.

It is not a major issue but I think it is missconfusing.

Proposed resolution

Use the payment gateway display label as default return value of the buildLabel() method, instead of just "Paypal".

🐛 Bug report
Status

Fixed

Version

1.0

Component

PayPal Checkout

Created by

🇫🇷France solene_ggd

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024