The current uc_paypal module only triggers a successful transaction when the message "Success" is returned from Paypal.

However, there is another successful transaction message of "SuccessWithWarning" that is returned when Paypal wants to simply return a warning along with the success message.

The big problem here, is that it charges the card successfully, however Ubercart reports that the transaction is unsuccessful and prompts them to try again, resulting in many duplicate charges.

This was reported earlier at http://www.ubercart.org/issue/9428/paymentuc_paypaluc_paypalmodule_simpl...

Files: 

Comments

grendzy’s picture

grendzy’s picture

Status:Active» Needs review
StatusFileSize
new6.47 KB

Here is a patch. It uses a switch statement to cover all of the documented paypal acknowledgement statuses, as a matter of defensive programming.

This also only covers the direct payment method, and not express checkout.

cha0s’s picture

StatusFileSize
new6.64 KB

Thanks for the better error coverage. =)

While we're improving that code, I added better support for PayPal's error messages, which I read can go from L_ERRORCODE0..14.

matt westgate’s picture

Seeing this same issue. Trying out the code in production for a bit to see how it does. Will keep you posted.

thill_’s picture

Status:Needs review» Reviewed & tested by the community

Matt is using this in a live environment now for 5 weeks without an issue. This bettor error reporting should be RTBC

Island Usurper’s picture

Status:Reviewed & tested by the community» Fixed

Sounds good to me. Thanks, everyone. Committed.

Status:Fixed» Closed (fixed)

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