-
Notifications
You must be signed in to change notification settings - Fork 205
W-20394105: Save payment method for future use #3570
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
base: t/team404/sfp-on-pwa
Are you sure you want to change the base?
W-20394105: Save payment method for future use #3570
Conversation
|
Thanks for the contribution! It looks like @rvishwanathbhat is an internal user so signing the CLA is not required. However, we need to confirm this. |
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
| ) | ||
| }) | ||
|
|
||
| // Store the updated basket for potential cleanup on cancel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove so many of these descriptive comments?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Guess they were removed by mistake. Added them again. Few extra spaces have been added along, will clear them up the next iteration, as it's not allowing me to just push spacebar changes.
| statusCode, | ||
| errorMessage, | ||
| errorDetails, | ||
| requestBody: JSON.parse(JSON.stringify(requestBody)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How can we be sure it's safe to log the entire request body? If we keep this, let's please not do parse(stringify()).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the Request body. Modified to log only error details.
|
|
||
| const account = findPaymentAccount(paymentMethodSetAccounts, paymentMethodType) | ||
| if (!account) { | ||
| return paymentMethodType === 'card' ? 'stripe' : null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand the need for these fallbacks. Also, can we put constants in a file to use here instead of repeating strings?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed these, now just returning null if an account isn't found.
|
@rasbhat I saw the save as default checkbox in the screenshot. Since we don't support default SPM yet, should we suppress that checkbox? |
Makes sense, I've disabled the save as default checkbox. |
A registered customer will be able to save payment method.
Description
Types of Changes
Changes
How to Test-Drive This PR
Checklists
General
Accessibility Compliance
You must check off all items in one of the follow two lists:
or...
Localization