I'm using this module with credit card, check, and PayPal payments. When payment is received by credit card or check, the necessary uc_node_checkout_order_products record is created to link the nid to the order_product_id. However, when a payment comes in from PayPal, the record is not created; I have to track down the necessary information and create the record manually. Where should I start looking to patch this bug?

Comments

Mateo99999’s picture

Did you get anywhere with this? I'm finding the same problem...

Mateo99999’s picture

Status: Active » Needs review

OK, here's the very straightforward solution:

In uc_node_checkout.module on line ~ 759 (hook_order):

case 'submit' should be case 'save'

Done!

Mateo99999’s picture

Status: Needs review » Active

In fact this does not solve the problem: I think the actual problem is that, if a customer does not bother to click the 'return to merchant's site' button upon a successful payment on PayPal, UC Node Checkout never gets that final submit/save that would trigger the creation of the node/product record.

So this is still a bug...

fletch11’s picture

Anyone else working on this? would be very useful

kento’s picture

Hmmm ... after seeing the same thing on a site we're working on (3 types of payment, two offline, the other one is PayPal) and trying the proposed fix in http://drupal.org/node/737548#comment-2757636, I see this:
- the uc_node_checkout_order_products record is created and does not depend on the client returning back to the seller's site as mentioned in http://drupal.org/node/737548#comment-2812682 but ...
- if the client does not use the PayPal link to get back to the seller's site as mentioned in http://drupal.org/node/737548#comment-2812682, order status will remain in the is_checkout state
The proposed fix could solve the original issue but that second thing is surely not useful if the client has really made the payment ...

jenb919’s picture

I'm not sure if you are have the exact same problem that I had but I will explain my situation. I am using node checkout for event registration. After the order was completed I used customer php to add the event title and order id to the registration form. The instructions I used (from http://drupaleasy.com/blogs/ultimike/2009/03/event-registration-ubercart ) said to create a new predicate under the trigger "Customer completes checkout" and add custom php as the action. My registration forms weren't updated when the test buyer didnt redirect back to the store from the test paypal site. I changed the custom php action to adding another action to "Update order status upon checkout completion with full payment". In this case my registration forms are updated when a full payment is received. I was also using a paypal sand box for testing. The seller account needs to have payment review disabled so that the test order will be completed and the balance is updated to zero.

fletch11’s picture

This seems like a big issue for this module. Is there any way to get this issue more attention through a bounty or other paid services?

Cheers, Ian

kmonty’s picture

Priority: Normal » Critical
fletch11’s picture

Thanks for the tip jenb919 but I still cannot get this to work (i.e. the node is not published unless the user goes back to the drupal site from the link in paypal). Would you mind listing the conditional actions you have listed and their respective weights?

Many thanks.

jenb919’s picture

There is a CA titled "Update order status upon checkout completion with full payment" with a trigger
"Customer completes checkout", class "payment", weight is 1. I added an action to this CA using custom php similar to the example shown on the tutorial (http://drupaleasy.com/blogs/ultimike/2009/03/event-registration-ubercart).

In this case the extra information is added when the order balance is below zero and the order status is being changed to "complete".

If you are using a paypal sandbox account to test it also assumes that you have payment review disabled.
It is also assuming that you are using complete sale as the payment action for paypal and not authorization. If you are using authorization then the status change would be to "paypal pending" instead of "complete". In that case you might one to use the "a payment get entered for the order" as your trigger.

There might be another problem in your case. I tested my site and created registration forms for my products without checking out and the nodes were there. I found that if the user leaves the product in the cart and it has an associated node when cron does a cart clean up the product in the cart is remove but the node (in my case reg. form) is not deleted. I am using Ubercart 2.2 so maybe that's why we have a difference.

fletch11’s picture

Thanks for the tips Jen - this works perfectly. For others out there an added difficulty is that the shopping cart does not clear if you don't enter back to the drupal site from paypal, which is ubercart bug. This patch appears to work and will hopefully fix the situation in the near future: http://drupal.org/node/654092#comment-3288152

aidanlis’s picture

Priority: Critical » Normal
Status: Active » Fixed

Status: Fixed » Closed (fixed)

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