Inventory tracking bug in Paypal module.

Create issue
Issue #1387 new
klein4 created an issue

When a user completes an order, the inventory gets deducted twice:

(1) As soon as payment is made, the IPN view payment.modules.paypal.views.ipn records the payment, causing the signal to be sent, causing the listener to deduct the sold items from the inventory.

(2) When the user clicks "Return to <site>" on Paypal, the payment.modules.paypal.views.success view again deducts the sold items from the inventory.

This means that the inventory will decrease twice as fast as the items in it are selling.

On a related note, why is the logic that clears the cart in the success view and not the ipn view? What if a user never clicks the "Return to <site>" link on Paypal? Clearly his cart should still be cleared after his payment goes through.

Comments (1)

  1. Log in to comment