WooPay Subscription error when using direct checkout
Opened this issue · 0 comments
alefesouza commented
Describe the bug
(copied from the WooPay repo, text by @malithsen)
Shopper should always be logged into the merchant site when purchasing a subscription via WooPay, however this requirement is bypassed when using Direct Checkout which can sometimes results in an order failure.
To Reproduce
- Create a new account in the merchant site.
- Log out of the account.
- In a separate tab create a WooPay account using the same email address used in step 1.
- Go back to the merchant site, add a subscription product to the cart.
- Go to the cart page.
- Click on the Proceed to Checkout button.
- You will be redirected to the WooPay checkout page.
- Place order.
- Notice that the order fails and the payment gets auto-refunded.
This failure is because when processing the subscription, merchant site tries to create a new user for the email provided by WooPay but fails as there's already a user with that email.
Actual behavior
Direct Checkout is enabled when shopper is logged out and is purchasing a subscription.
Screenshots
Expected behavior
Direct Checkout should be disabled when the shopper is not logged in to merchant site and is purchasing a subscription.