WP-e-Commerce
WP-e-Commerce copied to clipboard
Wrong totals sent to payment gateway when using free shipping coupon
I've noticed customers being charged incorrect amounts through multiple payment gateways when using a free shipping coupon.
The issue occurs if the free shipping discount is greater than the total product price.
To replicate, add 2 quantity Aeropress + 1kg variant of this product. http://creative-order.com.au/staging/coffeebird/shop/all-coffee/white-blend-espresso-roast/
Go to checkout: http://creative-order.com.au/staging/coffeebird/shop/checkout/
Enter coupon 'coffee' and postcode 0820.
You should see this
Note the discount amount is $109.90. The total price is $84.00.
Pay using Stripe credit card (in dev mode, so use 4242424242424242 and any in future expiration date and any 3 digit CVC). Or pay using 'Credit Card' option which is manual payments/test gateway.
Hey, look! You've been charged the discount amount ($109.90) not the total price ($84.00)!
Related for Tev2 https://github.com/wp-e-commerce/WP-e-Commerce/issues/2312