Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introducing express methods constants for the frontend #3824

Open
wants to merge 26 commits into
base: develop
Choose a base branch
from

Conversation

wjrosa
Copy link
Contributor

@wjrosa wjrosa commented Feb 3, 2025

Changes proposed in this Pull Request:

This PR introduces new constants for the express payment methods (Google Pay, Apple Pay, Link and Amazon Pay). And also implements them on the codebase.

Testing instructions

Code review should be enough. Check if the tests are still passing.


  • Covered with tests (or have a good reason not to test in description ☝️)
  • Added changelog entry in both changelog.txt and readme.txt (or does not apply)
  • Tested on mobile (or does not apply)

Post merge

@wjrosa wjrosa self-assigned this Feb 3, 2025
Base automatically changed from add/amazon-pay-to-classic-checkout to develop February 3, 2025 14:30
@wjrosa wjrosa marked this pull request as ready for review February 3, 2025 18:34
@wjrosa wjrosa requested review from a team and diegocurbelo and removed request for a team February 3, 2025 18:34
Copy link
Member

@diegocurbelo diegocurbelo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea of having constants, but having to use camelCase everywhere seems confusing.

Having the constants with the same prefix and in the same place as the other payment methods constants might lead to the wrong assumption that they behave the same way (can be used without the need of the camelCase wrapper)

@wjrosa
Copy link
Contributor Author

wjrosa commented Feb 4, 2025

I like the idea of having constants, but having to use camelCase everywhere seems confusing.

Having the constants with the same prefix and in the same place as the other payment methods constants might lead to the wrong assumption that they behave the same way (can be used without the need of the camelCase wrapper)

You're right, Diego. I have updated the code in dd8fb3e to introduce specific constants for this use case. What do you think?

I want to convert the constants.js file into a new folder with files for each constant type, but I think it is better to leave that for another PR.

@wjrosa wjrosa requested a review from diegocurbelo February 4, 2025 12:49
Copy link
Member

@diegocurbelo diegocurbelo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes @wjrosa.

It looks good, I'm pre-approving this because the conflicts look minor (just a couple of imports).. but happy to re-test this after you solve them if you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants