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

[Split PE] Local tokens not being synced with the payment methods in Stripe from the Block checkout #2896

Closed
a-danae opened this issue Feb 13, 2024 · 1 comment
Assignees

Comments

@a-danae
Copy link
Contributor

a-danae commented Feb 13, 2024

Describe the bug

When the local tokens and the payment methods in Stripe are out of sync, they don't get synced by visiting the Block checkout.

Bit of context:
When retrieving the tokens for a user, we check them with the payment methods saved in Stripe. The payment methods in Stripe are our source of truth. Local payment methods will get created or deleted according to those. This is handled by WC_Stripe_Payment_Tokens::woocommerce_get_customer_upe_payment_tokens().

To Reproduce

Deleting local tokens:

  1. Check out add/deferred-intent
  2. Under the Stripe extension settings, enable UPE
  3. As a shopper, go to My account > Payment methods > Add new
  4. Select Cards as the payment method
  5. Enter 4242424242424242 and save
  6. Go to My Account > Payment methods and confirm a token exists for the selected card
  7. On the Stripe dashboard, go to the page for this customer
  8. Delete the payment method you just saved
image
  1. As the shopper, add a product to the cart and go to the Block checkout page
  2. Notice that the payment method continues to be displayed
image

Creating local tokens:

  1. As a shopper, go to My Account > Payment methods
  2. Notice the payment methods that are listed
  3. On the Stripe dashboard, go to the page for this customer
  4. Add a new card
image
  1. As the shopper, add a product to the cart and go to the Block checkout page
  2. Notice that the newly added payment method isn't listed in the local tokens

Expected behavior
When visiting the Block checkout page, local tokens must be synced to the payment methods that exist in Stripe.

@a-danae
Copy link
Contributor Author

a-danae commented Feb 19, 2024

Fixed by #2897

@a-danae a-danae closed this as completed Feb 19, 2024
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

No branches or pull requests

1 participant