Payment Status Pending - PayPal IPN

Events happening in the community are now at Drupal community events on www.drupal.org.
rockitdev's picture

Hopefully this is not repetitive, but here is my dilemma.

I'm using PayPal as my payment gateway, and have the PayPal IPN configured. I add an item to my cart, checkout and pay for item on paypal (sandbox). After item is paid for, user gets redirected accordingly but noticed that the Payment is always set to Payment status of Pending, while the workflow is always set to received.

What i am wondering, is this normal process for Paypal? Do you have to manually log-in each time to PayPal, verify the Payment has been received and manually set the order to being completed? Or, should the IPN but indicating instantly that the Payment has been received?

Here is some other info if it's going to help:
PayPal Receiver Email: mysandboxaccount

PayPal processing URL:
https://www.sandbox.paypal.com/xclick/

Successful payment URL:
%order-history

PayPal IPN "request back" validation URL:
http://mydomain.com/demo3/paypal/ipn

Debug Instant Payment Notification (IPN):
Enabled.

Comments

Bit more info

rockitdev's picture

I noticed from the PayPal debug results the following data:

Data being sent to store_transaction_save:

fee = 0.88
gross = 20.00
payment_method = paypal
payment_status = 2
ppid = 85A501044J478811M
txnid = 5

shouldn't the payment_status be something similar to payment_status = completed?

Solution

rockitdev's picture

Well... as i figured, i didn't have things set up accordingly for the IPN to notify the website that payment had been received.

The following data should be configured under the PayPal module. The following settings are what would be used if you were working in the sandbox environment.

PayPal processing URL:
https://www.sandbox.paypal.com/xclick/?cmd=click

PayPal IPN "request back" validation URL:
http://www.sandbox.paypal.com/cgi-bin/webscr

Leave the others as the default settings and you should be good to go. Where i went wrong was at the top of the page, it says "The IPN URL of your site is:" and it will provide a value. Don't input that in the PayPal IPN "request back" validation URL:. This is what you input in your IPN settings of your PayPal account. Anyways, i'm sure this has been answered before, but figured i would put it out there since i posted this issue earlier.

Sorry, I didn't spot this earlier…

drew reece's picture

I submitted a patch for this, but I don't think it made it into the release until after 5.x-3-4, its in 5.x-3.4-dev apparently.
http://drupal.org/node/169257

You may want to check it is using the URL correctly since I suspect you may be getting two '?' in the query string. eg
https://www.sandbox.paypal.com/xclick/?cmd=click?<<--rest+of+your+query...

I think a simple print_r($url); at the end of the paypal_goto() function should sow you.

Drew

thanks drew, but i've got it

rockitdev's picture

thanks drew, but i've got it working now ;)

Help!!

loveantique's picture

I am still having problem with pending payment.

At moment , I have following paypal configuration. and I set up IPN request in paypal account.

Paypal processing URL:
https://www.paypal.com/cgi-bin/webscr

Paypal IPN "request back" Vallidation URL:
https://www.paypal.com/cgi-bin/webscr

Above setting works except all payment is pending even though payment was made successfully on paypal page.

I have changed Paypal processing URL to
https://www.paypal.com/xclick/?cmd=click
as rickitdev suggested however, with this setting, the page is blank after I proceeded to paypal payment. it seems that the link is not connected to my account.

I also changed Paypal IPN "request back" Validation URL; to
http://www.mywebsite.co.uk/paypal/ipn
but payment is still pending.

Could anyone help??

e-Commerce Module

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: