Automattic / woocommerce-payments

Accept payments via credit card. Manage transactions within WordPress.
https://wordpress.org/plugins/woocommerce-payments/
Other
173 stars 69 forks source link

Enhanced UPE - WCPay Compatibility: Saved Payment Methods #5022

Closed FangedParakeet closed 1 year ago

FangedParakeet commented 1 year ago

Description

This is the continuation on the integration of Stripe's new UPE payment flows. Please see this post for more details. This WCPay compatibility issue is one of many to ensure that existing WCPay functionality is unaffected and remains fully operational after refactoring the UPE to follow the new payment flow.

This issue is to ensure that saved payment methods remain functioning normally.

This issue is currently blocked, as we await for Stripe to provide us access to their beta UPE release and while we wait to complete the PoC implementation of this new feature (#5019).

Acceptance criteria

Additional context

Stripe UPE – Options to solve WooPay compatibility and WC Pay loss of control over the payments UI/UX

4530

timur27 commented 1 year ago

All the tests were performed with the enabled split UPE with deferred intent creation.

❗ This issue doesn't check saving the SEPA payment method since the plugin currently falls back to the legacy UPE when SEPA is activated. Saving SEPA should be reviewed as part of https://github.com/Automattic/woocommerce-payments/issues/6205

Use-case Result
The CC method can be saved
Guest user shouldn't be able to save a payment method
Saved CC appears on the shortcode & Blocks checkout
Pay with saved card via shortcode & Blocks checkout
Saved CCs are listed in Payment methods
Can mark saved CC as default
Can delete saved CC
Terms are shown to the user when checking the save checkbox
CC can be saved on the Pay for order page
Saved CC can be used to pay for order
Add CC through Payment methods page
Only reusable payment methods available on the My account -> Payment methods page 🟥
Save 3DS card on shortcode & Blocks checkout
Use saved 3DS card on shortcode & Blocks checkout
Add 3DS card in My account page
Use a saved 3DS card to pay for an order/renew a subscription
CC is saved on the subscription payment
Renew a subscription with a saved CC
Save 3DS as a result of subscription payment
Change the subscription's payment method to another saved card & renew with it
With WooPay enabled, the checkbox is changed to a WooPay-related save-user checkbox
Stripe Link payment method is saved during the subscription payment on shortcode & Blocks
Stripe Link saved payment method can be used to pay for an order
Saved Stripe Link method can be set as default/removed in My account page

Fixing failed use-cases

1️⃣ Only reusable payment methods available on the My account -> Payment methods page: https://github.com/Automattic/woocommerce-payments/pull/6915

frosso commented 1 year ago

Discussed during team meeting & discussed here: p1692022749577519-slack-CU6SYV31A @FangedParakeet and I were unable to reproduce the original issue. The changes are still valid, but let's wait on @timur27 to come back after AFK to discuss whether it's needed.

FangedParakeet commented 1 year ago

Retested all of the above after merging after merging #6965 and being unable to replicate the issue in #6915. My findings with the deferred intent feature flag enabled are as follows...

Use-case Result
The CC method can be saved
Guest user shouldn't be able to save a payment method
Saved CC appears on the shortcode & Blocks checkout
Pay with saved card via shortcode & Blocks checkout
Saved CCs are listed in Payment methods
Can mark saved CC as default
Can delete saved CC
Terms are shown to the user when checking the save checkbox
CC can be saved on the Pay for order page
Saved CC can be used to pay for order
Add CC through Payment methods page
Only reusable payment methods available on the My account -> Payment methods page
Save 3DS card on shortcode & Blocks checkout
Use saved 3DS card on shortcode & Blocks checkout
Add 3DS card in My account page
Use a saved 3DS card to pay for an order/renew a subscription
CC is saved on the subscription payment
Renew a subscription with a saved CC
Save 3DS as a result of subscription payment
Change the subscription's payment method to another saved card & renew with it
With WooPay enabled, the checkbox is changed to a WooPay-related save-user checkbox
Stripe Link payment method is saved during the subscription payment on shortcode & Blocks
Stripe Link saved payment method can be used to pay for an order
Saved Stripe Link method can be set as default/removed in My account page

All these things are clear, however, I did notice one issue. Stripe Link saved payment methods are labelled incorrectly and incomprehensibly on the blocks checkout. Instead of including the email address related to the token, they are simply labelled "Saved token for woocommerce_payments".

Incorrect Link label on blocks checkout Incorrectly labelled Link token on blocks checkout

This issue is explained in more detail and resolved in #7016. Once that solution is integrated, I will consider this issue closed. 🎉