I think there's a glitch in the uc_paypal.install script

the status code "paypal_pending" is created with a state of "payment_received" but that means that it will act like the invoice really has been paid, and could cause creation of subscriptions, enabling of downloads, or anything else hooked to invoice completion.

i am using a modified version of uc_subscribe and i found that if the above was changed to state "post_checkout" (like the regular "pending" status) then things behaved properly.

so why does the install program create the paypal_pending status the way that it does? is this a bug, or am i missing some obvious reason why "payment_received" is normally the correct state for this status?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

longwave’s picture

Agreed this should probably be changed, but would like input from another maintainer or someone else before we go changing this in case there's something I haven't thought of.

jfarhat’s picture

FileSize
2.08 KB

Indeed there is an issue with the PayPal module, specifically in the Express Checkout API.

Symptoms:
When an Express Checkout process completes all orders succeeded, failed, or otherwise have a 'pending' status. For succeeded transactions the order details page doesn't show the PayPal transaction ID, the balance remains as the full order amount.

Source of the problem:
Tracing the issue we were able to narrow it down to the function uc_paypal_ec_submit_form_submit. We discovered that the PayPal response string is not processed at all.

Solution:
We processed the incoming response and made the appropriate calls to register the payment if succeeded, log the appropriate order comments. We found out that it worked beautifully.

Attached is a patch to solve the issue. Please let us know if that works out for you.

Joseph,
Kirkham Systems Inc.

longwave’s picture

Your patch isn't really related to this specific issue, instead it seems to be for #952648: Paypal response not checked for failure when submitting express checkout - could you repost your patch and comment there?

jfarhat’s picture

Thanks for the heads up. I posted it at 952648 as you suggested.

Joseph,
Kirkham Systems Inc.

longwave’s picture

Version: 6.x-2.x-dev » 7.x-3.x-dev
Status: Active » Needs review
FileSize
991 bytes

This patch fixes this issue in 7.x-3.x.

earthangelconsulting’s picture

thanks Longwave! by coincidence i am right now setting up a copy of Ubercart 7.x-3.x for a client, i hadn't gotten to the testing stage yet but i will be sure to try out that patch!

longwave’s picture

Status: Needs review » Fixed

Committed #5.

Status: Fixed » Closed (fixed)

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