I the uc_userpoints_product modules, Paypal purchases are applying double the points, this is because it does an extra status update from completed -> completed.

This obviously not a issue with this module but it does open up the issue that we this module should only add points if the status is being changes from something other then completed to completed.

This simple patch just adds an extra check to confirm the order states is actually changing.

CommentFileSizeAuthor
userpoints_ubercart-duplicate.patch1.03 KBunivate

Comments

davedg629’s picture

This patch works great. The only thing is that when you apply this patch, the user no longer sees the updated points message when they return to the site from paypal. The updated points message basically says, "X points have been added to your account. Your total points total is X" or something like that. After you apply the patch the user no longer sees this message. It is a pretty crucial message, if anyone knows why this is happening please help.

Thanks.

bmagistro’s picture

Status: Needs review » Fixed

All I got to say is wow... I really don't like how this was implemented (not sure if it was/is my code or if it has changed over time) but it's there and working for now. If anything I would change this to be a conditional action so that the checks are handled there and it is applied once full payment is received in a similar manner to the award module. Either way, this has been added to the module. Unfortunately I don't have a paypal test environment so if you could test this one out for me that would be great. The fix will be in the dev release.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.