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...
Comments
Comment #1
grendzy commentedThe paypal response fields are documented here:
https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=develo...
Comment #2
grendzy commentedHere 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.
Comment #3
cha0s commentedThanks 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.
Comment #4
matt westgate commentedSeeing this same issue. Trying out the code in production for a bit to see how it does. Will keep you posted.
Comment #5
thill_ commentedMatt is using this in a live environment now for 5 weeks without an issue. This bettor error reporting should be RTBC
Comment #6
Island Usurper commentedSounds good to me. Thanks, everyone. Committed.