woocommerce / woocommerce-gateway-paypal-express-checkout

58 stars 65 forks source link

PayPal error (10525) when a bookable slot is not selected #846

Open grig-23 opened 3 years ago

grig-23 commented 3 years ago

Describe the bug

Let me know if this should be moved to WooCommerce Bookings repository.

When a bookable slot is not selected (and the product price is effectively 0) and customers click one of the PayPal Checkout buttons at the product page - this error message appears:

PayPal error (10525): An error (10525) occurred while processing your PayPal payment. Please contact the store owner for assistance.

To reproduce

  1. Go to a bookable product page. Do not select any slots.
  2. Click the yellow PayPal Checkout button on the product page.
  3. See the error.

Screenshots

Screenshot Screenshot direct link: https://d.pr/i/npBUCd

https://snipboard.io/A3gDxY.jpg

Expected behavior

The buttons should be hidden before the slot is selected. Alternatively, the error message should be more clear, although the first approach sounds better.

Related to https://github.com/woocommerce/woocommerce-gateway-paypal-express-checkout/issues/635

Environment (please complete the following information):

Additional details

reported in 27086523-hc

joweber123 commented 3 years ago

Another report of this here 3845301-hc I have been able to reproduce this as well.

joweber123 commented 3 years ago

Just to add more information, error code 10525 is the following.

PayPal returned API error code 10525 - This transaction cannot be processed. The amount to be charged is zero.

This makes sense since no amount has been selected to send to PayPal. Agreed that the best solution here would be to make the button not clickable or hide it until a timeslot is selected.