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

Payment Methods: handle PPCP as PayPal method in list and receipts #97247

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

michaeldcain
Copy link
Member

As part of the PayPal API migration to the PPCP API, we need to handle PPCP stored payment methods in a similar manner to PayPal express methods. This includes the following:

  • On the payment method list (from Me > Purchases > Payment Methods):
    • Using the PayPal email address to identify the method
    • Hiding the option to "use as backup"
    • Showing the PayPal icon
    • Fixing the list of associated subscriptions on the "delete this payment method" confirmation modal
  • On the receipt view for a PPCP transaction (from Me > Purchases > Billing History):
    • Setting the payment method to "PayPal"

Ultimately, we just need to include the paypal_ppcp payment partner key anywhere that the paypal_express one is currently used.

Screenshot 2024-12-09 at 11 01 55 AM
Screenshot 2024-12-09 at 11 02 21 AM
Screenshot 2024-12-09 at 11 02 52 AM

To test:

  • Make a PayPal PPCP purchase (or five) in Checkout using the PayPal (A8C-only) payment method option
  • Visit the payment method list (from Me > Purchases > Payment Methods)
  • Verify that the changes above have been made
  • Click "delete this payment method"
  • Verify that the associated subscriptions for the payment method are all listed
  • Visit your billing history and select a receipt from the PPCP purchases
  • Verify that "PayPal" is shown as the payment method

@michaeldcain michaeldcain requested a review from a team as a code owner December 9, 2024 16:17
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Dec 9, 2024
@matticbot
Copy link
Contributor

Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:

Sections (~33 bytes added 📈 [gzipped])

name                          parsed_size           gzip_size
site-purchases                      +67 B  (+0.0%)      +33 B  (+0.0%)
purchases                           +67 B  (+0.0%)      +33 B  (+0.0%)
jetpack-cloud-partner-portal        +48 B  (+0.0%)      +25 B  (+0.0%)
checkout                            +48 B  (+0.0%)      +25 B  (+0.0%)
a8c-for-agencies-purchases          +48 B  (+0.0%)      +25 B  (+0.0%)
a8c-for-agencies-client             +48 B  (+0.0%)      +25 B  (+0.0%)

Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to.

Async-loaded Components (~25 bytes added 📈 [gzipped])

name                                                                              parsed_size           gzip_size
async-load-signup-steps-page-picker                                                     +48 B  (+0.0%)      +25 B  (+0.0%)
async-load-purchase-modal-wrapper                                                       +48 B  (+0.0%)      +25 B  (+0.0%)
async-load-my-sites-checkout-purchase-modal-is-eligible-for-one-click-checkou...        +48 B  (+0.0%)      +25 B  (+0.0%)
async-load-calypso-my-sites-checkout-modal                                              +48 B  (+0.0%)      +25 B  (+0.0%)
async-load-calypso-blocks-editor-checkout-modal                                         +48 B  (+0.0%)      +25 B  (+0.0%)

React components that are loaded lazily, when a certain part of UI is displayed for the first time.

Legend

What is parsed and gzip size?

Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory.
Gzip Size: Compressed size of the JS and CSS files. This much data needs to be downloaded over network.

Generated by performance advisor bot at iscalypsofastyet.com.

Copy link
Member

@sirbrillig sirbrillig left a comment

Choose a reason for hiding this comment

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

Looks good!

@michaeldcain michaeldcain merged commit e3aaaa6 into trunk Dec 9, 2024
14 of 15 checks passed
@michaeldcain michaeldcain deleted the update/payment-method-list-ppcp branch December 9, 2024 17:13
@github-actions github-actions bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants