33 replies [Last post]
raddy's picture
Offline
Bug Finder
Joined: 08/31/2007
Juice: 127

Hello Everybody

I finally able to check out successfully after fully configuring my Paypal Business Account in Paypal Sandbox,

Now IPN call back is not working.
In the first attempt i left Paypal IPN URL blank in Paypal Profile.
Paypal IPN call back didn't work, no IPN logs.

In the second attempt i used http://www.mysite.com/?=uc_paypal/ipn
Now IPN call back worked partially.

In the logs i saw this.
"Receiving IPN at URL for order 0."
"IPN attempted with invalid order ID."

FYI my site doesn't use Clean-Urls.

Can anybody shed some light???

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15422
Re: Paypal IPN Integration not working

Ahh, yes, it's coming back to me. I'm using a dynamic IPN URL, that's why you have to leave the field blank. The URL should be getting passed as part of the API call to process your PayPal payment. This should be safe for Clean URLs or not. It may be that the IPN just wasn't turned on before? Erase that field in your PayPal profile and try again if you don't mind.

Also, which PayPal service are you using for these tests?

raddy's picture
Offline
Bug Finder
Joined: 08/31/2007
Juice: 127
Re: Re: Paypal IPN Integration not working

I am using Paypal website payment standard.
Is ubercart require Paypal website payment Pro for the automation to work?

raddy's picture
Offline
Bug Finder
Joined: 08/31/2007
Juice: 127
Hello Ryan I tried once

Hello Ryan

I tried once again just now too.
IPN info is not at all transfered if i left the url field blank in Paypal profile configuration.

I even tried configuring Paypal Access Credentials after obtaining one from Paypal,
But still no IPN info is transfered.
Even debug option didn't show anything in the logs

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15422
Re: Hello Ryan I tried once

Ok... can you look at the HTML source on the review order page for the submit form? Basically, the PayPal module is building a form w/ a hidden field named notify_url that should be getting populated with the right address. Can you see if it's putting anything in there at all?

raddy's picture
Offline
Bug Finder
Joined: 08/31/2007
Juice: 127
Hi Ryan

Hi Ryan

notify_url hidden input field is perfectly created.

Form url also seems correct.

Vallenwood's picture
Offline
Bug Finder
Joined: 09/28/2007
Juice: 35
IPN tips

I had an IPN problem too, and in case it helps anyone else I'll share a couple of tips:

1) Make sure the IPN URL is blank--delete out the "http://" it's pre-filled with.
2) If you have HTTP authentication on your site (i.e. password protected) then IPN will not work! I had a password on my web root while developing the site, and IPN didn't work until I removed it.

hedac's picture
Offline
Joined: 12/14/2007
Juice: 143
Re: IPN tips

not working for me either..... notify_url is correct in the source code of the submit order page.

In paypal I have IPN enabled and without address. removed http://

I enabled the workflow-ng Update order status on full payment. it is configured .. order balance less or equal 0.0.

Using latest bzr version. 16 dic.
using sandbox account.

after paying and going back to the site, I see the Completed page. but I don't see any IPN entries in the log, and Order is in "Pending".

Sad

schaub123's picture
Offline
Bug FinderGetting busy with the Ubercode.PayPal Hero
Joined: 10/08/2007
Juice: 457
Re: Paypal IPN Integration not working

Double check the log for each order, not the drupal watchdog. In the admin, look at the "log" tab for an order stuck in pending. See if there is any record of the ipn coming in there. You might be seeing the paypal pending clobber bug. It could also just be an ipn configuration issue. Paypal IPN can take a long time to return sometimes. It definitely won't work if your site is basic-auth protected. Also, look for the post on setting up https if you use the secure pages module. You have to add the paypal cgi-bin path ... search for ubercart ssl.

Christopher Schaub

hedac's picture
Offline
Joined: 12/14/2007
Juice: 143
thanks in the order log

thanks
in the order log there is no ipn events... and I have logging ipn activated
just two entries:

12/16/2007 1
* Checkout message sent to xxx@xxx.com
12/16/2007 1
* Order status changed from in_checkout to pending.

maybe is a problem with the sandbox ? I could try tomorrow with live account...

schaub123's picture
Offline
Bug FinderGetting busy with the Ubercode.PayPal Hero
Joined: 10/08/2007
Juice: 457
Re: thanks in the order log

Ok, then you have an ipn config issue. Check all of your variables in paypal again. Make sure the ipn url is blank and ipn is on. Also, make sure your paypal is set to live and to "complete sale" -- I don't think authorize only will fire the ipn until you capture payment?

Christopher Schaub

raddy's picture
Offline
Bug Finder
Joined: 08/31/2007
Juice: 127
Hi hedac You actually have

Hi hedac

You actually have to disable IPN in your Paypal Profile, and leave the url field blank.

IPN should be enabled only when the site sends the data over Post method AFAIK,
Ubercart is a certified Cart Solution that uses some special APIs to talk with Paypal,

hedac's picture
Offline
Joined: 12/14/2007
Juice: 143
Re: Hi hedac

it's strange... if I check the checkbox... and remove the http:// and save... it says IPN activated.. and On. But if I go back and edit again I see the checkbox unchecked... and the http:// again there...

doesn't work either IPN activated or not...

the return url in the paypal page after payment is
name="merchant_return" action="http://www.xxxxxxx.com/en/uc_paypal/wps/complete/20"

hedac's picture
Offline
Joined: 12/14/2007
Juice: 143
Re: Re: Hi hedac

ah I forgot to say that the cart is emptied correctly. it is just that the workflow is not being executed... but I don't know yet if it is because paypal doesn't send any ipn.. or that ipn is not being detected by ubercart....

also... can somebody explain me the settings in the workflow payment condition balance?

switch ($settings['balance_comparison']) {
case 'less':
return $balance < 0;
case 'less_equal':
return $balance <= .01;
case 'equal':
return $balance < .01 and $balance > -.01;
case 'greater':
return $balance >= .01;
}

hedac's picture
Offline
Joined: 12/14/2007
Juice: 143
Re: Re: Re: Hi hedac

my last test. in live account.. not sandbox..
12/17/2007 - * PayPal payment for 0,01€ entered by -.
12/17/2007 - * Checkout message sent to xxxxxx
12/17/2007 - * Order status changed from in_checkout to payment_received.
12/17/2007 - * Order status changed from payment_received to pending.

the ipn is received... in sandbox it wasn't receiving any ipn in the logs...

order status changed from payment_received to pending again !?

and now it doesn't clean the shopping cart..

return url is ".../uc_paypal/wps/complete/21" and it goes to the cart. with the items still there.. not a complete purchase page as before...

:/

hedac's picture
Offline
Joined: 12/14/2007
Juice: 143
Re: Re: Re: Re: Hi hedac

schaub123... your patch at http://www.ubercart.org/forum/support/2104/ipn_woes_payment_status_gets_...
worked for me...
it goes to the completed order page and the status is payment received. not pending anymore

this is the log now

12/17/2007 - * PayPal payment for 0,01€ entered by -.
12/17/2007 - * Checkout message sent to xxxxxxx.
12/17/2007 - * Order status changed from in_checkout to payment_received.

finally it works!

schaub123's picture
Offline
Bug FinderGetting busy with the Ubercode.PayPal Hero
Joined: 10/08/2007
Juice: 457
Re: Re: Re: Re: Re: Hi hedac

Awesome!!! I was freaking out that I was the only one seeing this bug! I'm hoping a better patch works into the system though. It should probably just be an sql statement checking the status, much leaner than re-getting another temp order object.

Christopher Schaub

torgosPizza's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/14/2007
Juice: 4110
Re: Re: Re: Re: Re: Re: Hi hedac

Guys, I'm seeing some intermittent HTTP errors and other IPN's not being verified issues now. I think it started when I began to have PayPal orders sent as line items, if that has anything to do with it. (Needed to do this in order for gift certificates Contrib to work with PayPal WPS).

Now this doesn't happen with EVERY order, only some. But enough to be a headache.

IPNs are, in fact, being received for each and every order - but some of them are not moving from Pending to Complete or Payment Received. Is this the same issue you've been seeing, and should I update to the latest bzr code? Have been meaning to do that, actually. Please advise.

--
Help directly fund development: Donate via PayPal!

schaub123's picture
Offline
Bug FinderGetting busy with the Ubercode.PayPal Hero
Joined: 10/08/2007
Juice: 457
Re: Re: Re: Re: Re: Re: Re: Hi hedac

Can you check the order log for a problem order. Do you see anything funny? Do you see the order status get switched from payment received back to pending. This only happens for code where the workflow stuff was added to change the order status (alpha8 and onward). The fix is the check the status in the database instead of the order object. Ryan posted an sql statement which does this. I'm not sure if it's been checked in yet, I don't think so. He might be coding a long-term fix which is a bit more elegant? Don't know.

If you are getting HTTP errors during validate, then it could be that a connection to paypal could not be established. This could be paypal's server being too busy to receive the connect or it might be something on your box opening an outbound connection.

// Post back to PayPal to validate
  $header = "POST /cgi-bin/webscr HTTP/1.0\r\n";
  $header .= "Host: ".$host[0].":80\r\n";
  $header .= "Content-Type: application/x-www-form-urlencoded\r\n";
  $header .= "Content-Length: ". strlen($req) ."\r\n\r\n";

  $fp = fsockopen($host[0], 80, $errno, $errstr, 30);

  if (!$fp) {
    watchdog('uc_paypal', t('IPN failed with HTTP error.'), WATCHDOG_ERROR);
          return;
  }

I'd check the order log first for a problem order, this is a known issue of orders being stuck in pending. Here's the issue:

http://www.ubercart.org/forum/support/2104/ipn_woes_payment_status_gets_...

Hope this helps.

Christopher Schaub

torgosPizza's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/14/2007
Juice: 4110
Re: Re: Re: Re: Re: Re: Re: Re: Hi hedac

Yeah I did see that - all great info! There is nothing in the order detail to show that it's ever getting moved out of Pending. I had seen this issue before installing WF-ng but hadn't seen it since. I was wondering if it was because the fsockopen call in uc_paypal_ipn was using port 80 when we are on an SSL - but switching that caused the IPN to never come through, either. So no solving there.

I'll update to the most recent bazaar today and see if that helps. Thanks for the reply!

--
Help directly fund development: Donate via PayPal!

torgosPizza's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/14/2007
Juice: 4110
Re: Re: Re: Re: Re: Re: Re: Re: Re: Hi hedac

Also, I haven't seen anymore Pending orders come in yet, but I will keep an eye on things. Good possibility that this was just an isolated incident with PayPal's servers, or something that I've fixed already. Weird.

--
Help directly fund development: Donate via PayPal!

manfromochie's picture
Offline
Joined: 07/15/2008
Juice: 28
Still have a pending status on my order

I have a pending order status problem on my cart and have read this thread to find a solution. I also came across the Curl fix for users on godaddy behind their proxy at http://www.ubercart.org/forum/ideas_and_suggestions/5187/solution_uberca...

I thought this may have been the solution to my problem; but while I fixed the IPN verification problem, the pending orders continue. I upgraded from the beta version of ubercart to the latest recommended 1.0 release, hoping to incorporate all the changes suggested here as well. Were these changes included? If not do all these changes work with the 1.0 release?

manfromochie's picture
Offline
Joined: 07/15/2008
Juice: 28
Found answer to my pending issue

After more research on the site I finally found the answer to my problem; I did not activate the "Update order status on full payment" in workflow ng. Curios why this is not activated by default though.

This step was actually addressed here http://www.ubercart.org/comment/8360/Re_Pay_Pal_Standard_IPN_orders_stuc...

I missed this when skimming the forums for info related to my issue.

So my problems were solved in 2 steps..
1) using CURL in uc_paypal for the IPN verification. This was necessary on my godaddy hosted account because of the requirement to make the call through their proxy server. I had to use CURL as well to update my billing engine on an external server for the same reason.

2) Activating the "Update order status on full payment" task in workflow-ng.

snailofsatan's picture
Offline
Joined: 10/07/2010
Juice: 8
Re: Found answer to my pending issue

Hi, I'm also having hosting issues with IPN, would you be able to let us know what you code to use to get IPN to work through CURL please?

drew.p@drupal.org's picture
Offline
Joined: 10/31/2008
Juice: 11
me too

I am also stuck with orders in Pending using Paypal Sandbox. My configs:

- Ubercart and Ubercart Marketplace

- Payment settings:
-- Enable payment tracking
-- Log payments entered and deleted to order log
-- PayPal Website Payments Standard
--- Show debug info in the logs for Instant Payment Notifications
-- Payment gateway: PayPal Website Payments Pro enabled

- I enabled PP WPS payment and PP WPP gateway based on my understanding of UC Marketplace's requirements

There is no info in the logs regarding IPN. The only thing I see in the order log is:

11/01/2008 - * Checkout message sent to mytestemail@gmail.com.
11/01/2008 - * Order status changed from in_checkout to pending.

(Hope this is being reported in the correct place. Please advise.)

hvitebjorn's picture
Offline
Joined: 07/26/2008
Juice: 85
Re: Paypal IPN Integration not working

I have a similar problem. I have secure pages and clean URLs enabled. I have tried using IPN with and without the following pages as secured:

uc_paypal/ipn/*
uc_paypal/wps/*
uc_paypal/wps/complete/*
cgi-bin/webscr

In both cases, when using a blank IPN URL in my paypal account, the IPN request is never received by Ubercart, and the order is stuck in "Pending". I see the following in my apache2 access log:

"POST /uc_paypal/ipn/order_id HTTP/1.0" 302 - "-" "-"

where order_id is the actual order id.

So if I understand this correctly, paypal is sending an IPN, but it gets a "redirect" message from my web server. But if I type in the URL www.mysite.com/uc_paypal/ipn/order_id it does NOT get redirected (it comes up as a blank page which I believe is the correct response).

I also have the Domain Access module installed. I wonder if that is what causes this problem? I am reluctant to take it down and break my site though....

Anyone has any ideas?

hvitebjorn's picture
Offline
Joined: 07/26/2008
Juice: 85
Re: Re: Paypal IPN Integration not working

Tried disabling Domain Access but still not working so that was not the issue.

UPDATE: The problem is resolved. It was caused by the Shared Sign-on/Single Sign-on module. IPN is working as it should when disabling this module.

ckng@drupal.org's picture
Offline
Joined: 02/18/2009
Juice: 7
Re: Re: Re: Paypal IPN Integration not working

FYI. Bad Behaviors module will break paypal as well.

And for my Paypal IPN, it is a required field for me, cannot put blank.
After multiple tries, http://yourodmain.com/uc_paypal/ipn works for me.

torgosPizza's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/14/2007
Juice: 4110
Re: Re: Re: Re: Paypal IPN Integration not working

I noticed that the field is required on their end. I think, though, what happens is that Ubercart overrides this anyway, since it is including the order# in the return URL, but I could be wrong. (been a while since I looked at the module..)

--
Help directly fund development: Donate via PayPal!

maryannking's picture
Offline
Joined: 03/26/2009
Juice: 14
getting site to update from pending to payment

I added the paypal IPN to paypal and did a resend - nothing happened. It shows completed in the overview of the paypal account but only pending on ubercart's side.

I'm using drupal version 6.12

ubercart 6.x-2.0rc3

I have my conditional actions set correctly - i.e., less than or equal to $0.00

just cannot figure out why it is not updating the ubercart site to payment received? By the way, my client is very upset.

marco88's picture
Offline
Joined: 11/15/2009
Juice: 2
Bad Behaviors breaks Paypal confirmed

Hi there,

I can confirm that the Bad Behaviors module breaks the Paypal integration.

Until I disabled it in my website http://www.mega-quick-sale.co.uk, I would not receive the IPN confirmation from Paypal.

Paypal would show a 403 error in the IPN History and nothing would appear in the Drupal logs. Note it would work fine when I paste the URL in my web browser "manually".

However After disabling Bad Behaviors module, the IPN call was finally received (call visible in log) and the transaction balance updated accordingly.

However I noted that the status of the order had already moved to complete after returning from Paypal to the merchant page (i.e. before receiving the IPN call).

I would have expected the status to move to complete only when receiving the IPN call. Is there a reason for this behaviour?

Thank you very much for this great module,

Best regards,
Marc.

hosais's picture
Offline
Joined: 01/02/2010
Juice: 66
I have the same issue.

Hi,

I have the same problem. The order status does not change to complete accordingly. The only way currently in my case is input the payment MANUALY. Does anyone know any way to make it work? Anyone can use this version?

I install drupal 6.14 and Ubercart 6.x-2.2.

Joseph Lee

idcm's picture
Offline
Joined: 05/09/2010
Juice: 12
Re: I have the same issue.

Did you ever get an answer? I am having the same issue.

acb
acb's picture
Offline
Joined: 12/06/2008
Juice: 159
Re: Bad Behaviors breaks Paypal confirmed

Getting the same problem; posted a bug report on the bad-behavior module page for what it's worth.

Wondering if there is a way to whitelist pages on the ubercart site from the BB module.