in function _uc_paypal_pending_message, in uc_paypal.module, there is a line of code

case 'multi-currency':

the code being returned by paypal actually has an underscore, not a dash, so this should be:

case 'multi_currency':

Comments

TR’s picture

Can you provide a link to the PayPal API documentation so I can verify this?

earthangelconsulting’s picture

hmmm... paypal docs are a bloody mess, but i'll see what i can find :-) i verified it by putting in a watchdog statement to capture the value of the pending_reason POST variable from paypal. but it would be good to see it right in their docs, i agree.

TR’s picture

hmmm... paypal docs are a bloody mess, but i'll see what i can find :-)

Yeah, that's why I asked. I didn't program that code and I don't use it, but I'm willing to fix it if I can get a definitive reference for the current API.

longwave’s picture

Both these pages say the original "multi-currency" is correct, but perhaps the docs are wrong? We could just handle both cases in Ubercart though.

https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=develo...
https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=develo...

TR’s picture

@goatvirus: Can you send me a copy of the IPN you received, via my contact tab? And include your PayPay account e-mail address? I contacted PayPal Merchant Technical Support this morning, and it seems to be a long-standing (>6 years) but unreported flaw in the documentation, and possibly also in PayPal's code, but PayPal would like to trace a few transactions to make certain. I've looked at some other open source PayPal code and it looks like what that other code does is check for 'multi-currency' OR 'multi_currency' OR 'multicurrency'. So others have experienced the same problem - it's a shame no one took the time to report this to PayPal ...

TR’s picture

Status: Active » Postponed (maintainer needs more info)

@goatvirus? I need that information from you to clear this up.

longwave’s picture

Title: bug in status codes that come back from paypal, when an order is pending » Bug in "multi-currency" status code that comes back from PayPal, when an order is pending

Better title.

earthangelconsulting’s picture

hi sorry about that, i was offline for a while there

well, how exactly do you want to see that IPN? in what format? aren't they a form submission, that gets handled by the ipn code in the paypal module? it's not like it's an email or something else that i can forward to you easily.

i'd be happy to help but just give me an idea of how best to harvest this info and send it to you.

longwave’s picture

Status: Postponed (maintainer needs more info) » Fixed

Confirmed that PayPal sandbox sends multi_currency instead of multi-currency. Fixed in both branches, and also improved the "unknown" messages so the reason is recorded.

earthangelconsulting’s picture

thanks longwave, sorry i kinda dropped the ball on following this up. life got in the way :-) i'm glad you found the confirmation you needed.

cheers
Peter "Fish" Fisera
http://earthangelconsulting.com

Status: Fixed » Closed (fixed)

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