code4business / freeproduct2

Magento2 extension that allows creating sales rules that add gift products.
64 stars 28 forks source link

A second gift product is added when payment fails #20

Closed kolaente closed 2 years ago

kolaente commented 4 years ago

Preconditions

Settings / Sale Rules

This: grafik In combination with a coupon code.

Steps to reproduce

  1. Put a product applicable for a gift product in cart
  2. Enter the coupon
  3. Gift product is added to cart
  4. Make the checkout, but with failing payment information, so the checkout itself fails and redirects to the checkout page. This probably depends on the payment provider, we achived this by entering a test credit card without a card holder.

Expected result

  1. Error message from the payment processor, one gift product in cart

Actual result

  1. Error message from the payment Processor, two gift products in cart, one with a price of 0€ and one with the actual price:

grafik

You can also see the price of the second added gift product is not taken into account for the total price.

domeglic commented 4 years ago

Thank you for the report, we will look into it

domeglic commented 4 years ago

@kolaente I tried to reproduce it but don't know how to get the case where I am redirected to cart. All the payments I am able to test with fail in the checkout and do not redirect to cart. Could you tell me which payment gateway it is?

amenk commented 4 years ago

I am a colleague of @kolaente. We use CommerzbankWebPOS from Customweb / sellxed for Magento 2. It works as follows:

  1. Press "submit order"
  2. Redirect to Payment gateway (order is created)
  3. No for example you might cancel the payment on the payment page
  4. Order is canceled, new cart is created, redirect to cart

In the end of the day it's a strange behavior of the payment plugin, but it seems to be not totally uncommon that the payment gateway behaves like this.