Closed (cannot reproduce)
Project:
Ubercart
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Oct 2011 at 10:41 UTC
Updated:
16 Apr 2013 at 07:37 UTC
I have a shop supporting multiple payment methods, e.g. uc_credit module and PayPal Express Checkout. I ran into a problem where the uc_paypal_ec_submit_form_submit() function was been executed whenever the uc_cart_checkout_review_form form was submitted - even if Express Checkout was not chosen as the payment method! This caused it to send the DoExpressCheckoutPayment nvp request to PayPal, which obviously failed, as no payer id, etc was present in the request.
The attached patch changes it so that the ec submit handler is only added to the list of submit functions if the payment method chosen was "paypal_ec".
| Comment | File | Size | Author |
|---|---|---|---|
| paypal_multiple_payment_methods.patch | 817 bytes | stella |
Comments
Comment #2
longwaveWhat about
!empty($_SESSION['TOKEN'])? The code should be skipped if there is no PayPal token in the session.(although admittedly that's a bad choice of variable name, it should be namespaced)
Comment #3
longwavepaypal_multiple_payment_methods.patch queued for re-testing.
Comment #5
stella commentedI must have another session variable with the same name, or maybe it's not being unset from an earlier transaction? In any case that code was definitely being triggered, drupal_set_message()s confirmed it.
Don't know why this keeps failing on the testbot.
Comment #6
longwaveNot sure testbot works properly on fixed point releases.
Comment #7
longwavepaypal_multiple_payment_methods.patch queued for re-testing.
Comment #8
longwaveUnable to reproduce this, and nobody else has reported it, so I suspect this was particular to your exact setup.