Website Payments Standard does not redirect to the paypal site. Step 4 in the chart from the ubercart website on the WPS configuration is NOT working. When I hit Submit Order, I get taken to "http://my.website.com/cart/checkout/complete" instead of paypal. This results in no way to pay!

From the Ubercart website:

1. Customer fills in name, email, billing and shipping info on the checkout form.
2. Customer selects to pay with CC (WPS) on the checkout form.
3. Customer clicks "Review Order" and then "Submit Order."
4. UC automatically "packages up" the customer's order (either as an itemized list or as a sum total depending on your WPS settings), along with the name, email, and shipping / billing addresses and redirects the customer along with that information to a secure payment form at PP.
5. Customer fills in credit card info on the PP site. The form already contains all of the information passed to it by UC so the customer only needs to enter the CC details in the PayPal form.
* The customer may choose to create a PayPal account at checkout time depending on how you configured "Website Payment Preferences" in your PayPal account (see configuration steps below).
6. Customer is either approved or denied by PayPal.
7. Customer is manually or automatically redirected back to UC site.
8. A user account is created automatically and the order tables updated appropriately when Ubercart receives the IPN from PayPal.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jedsmith13’s picture

It worked fine for me. Can you give some specifics on recreating the bug?

ajsoles’s picture

Same problem here.
Screen shots included.
Arthur Soles

TR’s picture

@ajsoles: So what's the problem? Your first image shows a PHP notice, which is just an information message. That should be hidden, but it doesn't break anything. Your second image shows an order in the order history. So? I don't see how this has anything to do with the original poster's issue.

sportman1280’s picture

I disabled all the other paypal payment methods and tried paying with ONLY WBS and what happens is this.

Go to product page
Add product to cart
View cart
Checkout
Enter address information, select paypal (its the only payment method i had enabled) and such and hit "review order".
I click submit order.
I am taken to the order is complete page.

I am never taken to the Paypal page to enter my credit card information, but an order is submitted on the site. and I can see it in my order history on the drupal site... however nothing at all changed on the paypal account and again, I was never sent to the paypal site.

Is there any other specifics I can give you to help troubleshoot?

Thanks again!

longwave’s picture

Can't reproduce this but I suspect it is something going wrong with uc_paypal_page_alter() which looks pretty fragile. What was wrong with the old hook_form_alter way of doing this? This method removes the "back" button from the review form, and it's ugly for all payment methods that redirect offsite to have to implement their form this way. uc_paypal (WPS) and uc_2checkout already need this in core, uc_payment should invoke a hook which simplifies adding an offsite redirect for payment.

ajsoles’s picture

The second screenshot shows a total of $0.00 which should have been $5.00 and the status shows pending and will not complete until the Paypal site has be accessed. I am getting the same result as @sportsman1280 is getting in that I am not being sent to the Paypal site.
Art

sportman1280’s picture

I am getting what ajsoles is describing also. The order does get stuck at pending with no way to fix it. :(

sportman1280’s picture

is there any info i can provide to help trouble shoot this?

longwave’s picture

Status: Active » Needs review
FileSize
6.74 KB

Patch attached that improves the way off-site redirect payment methods are handled, which hopefully has a nice side effect of fixing this issue.

hook_payment_method() items can now optionally include an extra key, 'redirect'. This specifies a form builder function which takes an $order object as the first parameter, and is rendered in place of the "submit order" button on the checkout review page. This means that the ugly code in uc_paypal_page_alter() can be replaced, and a similar hook_form_alter() in uc_2checkout has also been replaced.

Please test this patch and let me know if uc_paypal works again for you. If anyone also has a 2Checkout account, it would be useful to test that against the same patch.

TR’s picture

@sportman1280: Can you try out this patch and let us know if it fixes your problem?

essbee’s picture

Hmmm this patch actually made things worse.
I had the same symptom - paypal staying in pending status, but at least it was navigating to paypal and back again
Applying the patch now results in the submit button on /cart/checkout/review taking me back to /cart/checkout

longwave’s picture

Did you clear your caches after applying the patch?

longwave’s picture

Also if PayPal is staying in Pending status, are IPNs being received from PayPal? If they are, what is being logged by Ubercart when an IPN is received? If they are not, what does the IPN History page at PayPal say?

geerlingguy’s picture

Subscribe.

essbee’s picture

Well after updating ubercart to latest build applying patch and clearing caches paypal is staying in pending status.
I checked "Show debug info in the logs for Instant Payment Notifications." but nothing is being logged.
Re the IPN History page, am using a sandbox account so not sure where I can get that info.

longwave’s picture

The IPN issue is a different one to that originally reported, which was "When I hit Submit Order, I get taken to "http://my.website.com/cart/checkout/complete" instead of paypal", so I think this patch should probably be committed and a new issue opened for that.

IPN history can be found in the sandbox in the same place as live; My Account > History > IPN History. Note that if you are testing on localhost, IPNs will never be delivered, as PayPal will not be able to contact your site.

jrpowell01’s picture

Priority: Major » Critical

same problem.

Click 'Submit order' and instead of going to paypal it goes to Order Complete

which means there is no way for a customer to pay.

brodiebrodie’s picture

Same here

TR’s picture

Priority: Critical » Major

@jrpowell01: So did you try the patch in #10? What happened?

@brodiebrodie: Did you try the patch?

I'm moving the issue back to "major". A proposed fix has been available for more than two months. It won't get committed until people who are having this problem test the patch and confirm that it fixes the problem, or report that it doesn't fix the problem and give details.

brodiebrodie’s picture

Many Thanks TR,

The Patch works and redirects to paypal for payment, the payment (in the sandbox and on the orders page in ubercart admin) remains as pending, is this as it should be?
Also when leaving paypal to return to the store the browser flags up a " it is not recommended to leave a secure page" kind of notice again , this just might be as it should be.
Thanks again for your work

Brodie

Ibesan’s picture

Last build, 2011-May-04

I have a similar problem. When I use the method of standard paypal payment everything works well, unless the order remains as pending (same as Brodie). I think this is wrong.

But when I use the method of express payment the problem is worse. Steps:

- Add product to cart
- View cart
- Checkout
- Filling information an click 'Review order'
- Connection with paypal sandbox site with NO information from UB in fields (name, address...).
- Login as customer, pay and redirect to "Review page" instead "complete page".
- You have to click 'Submit order' to see the complete page and finish the purchase.
- Order is pending anyway.

So, you get paypal site first than Review page, and when you complete the payment in paypal site you return to Review page. If you not click on Submit order after returning, the purchase is not completed.

Sorry for my English, and thanks a lot for your work.

brodiebrodie’s picture

Just wondering if the patch in #10 got committed, I upgraded from the dev version to beta3 and the problem is the same as before "
Click 'Submit order' and instead of going to paypal it goes to Order Complete
which means there is no way for a customer to pay."
should I apply the patch to the beta 3?

Many Thanks

Brodie

longwave’s picture

The patch has not been committed, but will still apply to beta 3 and needs testing - please report back with any results or other comments.

brodiebrodie’s picture

Thank you for your work.

I applied the patch and it works, I can go through the payment process and pay for the goods ordered (live paypal site). The status remains pending in the ubercart orders, is this as it should be ?
I do get a couple of security announcements ,( one to do with "mediaplex"; and one which fairly stridently points out that I will be leaving a secure page for an unsecure page and strongly recommends against such actions) when redirected back from paypal to the shop site, these might well put a customer off and I wonder if there is a way to suppress them.

Again , thanks for all the hard work on this great module

Brodie

longwave’s picture

Status: Needs review » Active

Committed the patch from #10. Seems there are still problems with PayPal IPN processing, so setting this back to active until I or someone else has time to track this down.

longwave’s picture

A quick Google search for "mediaplex paypal" suggests it is something to do with ad serving at PayPal's end, so not sure what can be done about that, and I have not seen the security warning when redirecting back from PayPal before now.

RikiB’s picture

Hi, I am having this same problem but in the latest Dev on Ubercart 6. Could someone point me in the right direction?

The problem stated simply is: While using the WPS payment method, when clicking Submit Order on the checkout screen the customer is immediately taken to the Order Complete page without even attempting to go to PayPal.com. I checked the Log and there is nothing there. Everything was tripped checked and should be setup correctly.

If I get no response I will make a new issue I guess. Thanks!
- Riki

ibullock’s picture

My checkout was skipping paypal, applied the patch and now mine is doing the same thing as esbee described "Applying the patch now results in the submit button on /cart/checkout/review taking me back to /cart/checkout"

ibullock’s picture

Seems my problem, and possibly esbee's as well, was caused my a problem installing the patch. I reverted and installed again and now Paypal seems to be working properly.

RikiB’s picture

I just wanted to say that I fixed my problem in D6 (couple posts up), there was a conflict with the Optional Checkout Review module: http://drupal.org/project/uc_optional_checkout_review

I updated to the latest dev and it fixed my problem. Thanks for the hard work everyone!

MrPaulDriver’s picture

I just want to add that I too am finding that the IPN loop doesn't work for me either.

Payments are being processed by paypal, but remain as flagged as pending within Ubercart. No logging either.

Is the IPN issue being dealt with by any threads elsewhere?

ownage’s picture

I've marked this critical because Ubercart is useless when using PayPal. I'll do my best to help you understand the issue. I have the newest dev installed (updated yesterday-- Sept 25th). The issue is exactly as described in this topic:

0) I check my settings:
[See attachment: 0_payment_methods_checked.png]

1) I go to /cart and click Checkout:
[See attachment: 1_in_cart_click_checkout.png]

2) I then click Review Order:
[See attachment: 2_in_checkout_click_review_order.png]

3) I then click Submit Order:
[See attachment: 3_in_review_order_click_submit_order.png]

4) And it goes to Order Complete:
[See attachment: 4_order_complete_wtf.png]

Now, I have no clue what is going on here, but please help me get this working. I'll need this working in the next few days, so I won't mind donating to anyone who helps with this issue.

TR’s picture

Priority: Critical » Major
Status: Active » Postponed (maintainer needs more info)

@ownage: Three people (including yourself) have reported having this problem. Three people (including me) cannot reproduce it. (Some people also chimed in about IPN issues, which are not relevant to this discussion). Frankly, a lot of people are successfully using WPS and are not having any problems. It is evidently something having to do with site or server configurations, or perhaps with contributed modules interfering with checkout. I tested WPS with all the default options for PayPal WPS on the Ubercart side.

If you want to help out, you can start by providing detailed information about how you set up WPS (admin/store/settings/payment/method/paypal_wps) and how you set up Ubercart. A link to your site might help so we can try it out ourselves. Your image #2 doesn't show any shipping or billing address panes, or any shipping or payment panes. Did you just leave those out of the image or did you turn those panes off? You don't say whether you're testing as an authenticated or anonymous user, but there is no customer information pane either on your checkout screen. Also one of your images shows that you have CAPTCHA enabled - what other modules you have enabled that might affect the checkout process? Have you tried this with just the default Ubercart modules and tried to enable modules one at a time to determine what triggers the problem?

ownage’s picture

@TR:
Thank you for the reply. With my very limited knowledge of module development, I do not know where to start to pinpoint this issue so I hope you know how much I appreciate your help and will be glad to work with you to resolve this issue as quick as possible. Following your advice, I've attached an image of my WPS settings (see paypal_wps.png). I also attached a large image that lists all of my installed modules (see my_modules.gif).

To answer your question about enabling modules one at a time to find the trigger, you will find that I only have the Attributes and PayPal modules activated outside of core.

I have tried using both Sandbox & Live PayPal server settings.
I have also flushed all of my caches on my Drupal site and cleared my local cache in Firefox.

Link to store:
http://tinyurl.com/store-redirect

To answer your question about the address-- I photoshopped the shipping address out; it is there-- you can see if you check out as a guest (also enabled, see checkout_anonymous.png). I have it to send the shipping address out as you see in the wps settings. I also attached my basic settings for the checkout options (see checkout_basic_settings.png).

p.s. if you are lost and find it would be easier, we can arrange a chat session where I can give you appropriate access to look into this; just PM me if you'd like to arrange something.

TR’s picture

Don't use the sandbox.

You have to enable the payment pane on checkout.

ownage’s picture

Status: Postponed (maintainer needs more info) » Fixed

You have to enable the payment pane on checkout.

DOH!!!!*@^#&@%*^&@'

Hopefully no one else looks over this stupid error-- I sometimes surprise myself about how human I am.

All is working, thank you to the Ubercart developers!

Status: Fixed » Closed (fixed)

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