Comments

apmsooner’s picture

Yes, it appears I have the same problem. Customer profile created but order is not. Customer received receipt from paypal however so not sure whats broken here.

kingandy’s picture

We seem to be encountering this on live, too. Payments are being successfully processed, but the order is staying in "Checkout: Checkout" and is not getting a payment assigned to it.

We do have WPP enabled as well, but it seems to have been happening since before we enabled that so I don't think it's some kind of conflict...

apmsooner’s picture

Priority: Major » Critical

For me, the payment went through to paypal (using WPS) but an order was never completed nor a user account. All the permissions are enabled correctly I believe and paypal rule is enabled as payment method. The transaction was stuck with status of checkout:payment. When clicking on the payment tab for that, I get a message saying "No payment methods available to add payments."

Again, everything is setup correctly on my end and the weird thing is that the transaction actually shows up with an order number in paypal. Nothing at all shows up as an order on the site though so there is certainly a critical bug.

kingandy’s picture

The normal process for a WPS order is:

  1. Customer checks out
  2. Transaction data is transmitted to Paypal - including order ID, value, Confirmation URL etc.
  3. Customer forwarded to PayPal checkout page.
  4. Customer confirms payment
  5. Paypal communicates success to Drupal via Confirmation URL; Drupal adds payment to order and updates status accordingly
  6. Customer is returned to Drupal site.

It seems to me that step 5 is the point of failure. This could be a problem with an earlier step (eg building the Confirmation URL in step 2) but if Paypal WPS is not appearing in the back end as a payment method perhaps this is causing problems with Drupal adding the payment to the order? That would potentially disrupt the "mark order as complete" step too

kingandy’s picture

I have to wonder if this is something that's fixed in 7.x-2.0.

apmsooner’s picture

@kingandy, I have version 7.x-2.0 installed now however the transaction took place prior to me doing the update I believe. I'll have to see if I can duplicate the issue. Right now it appears not much is being sent to paypal either in terms of the order details. Not sure if Ubercart handles that differently but I'm considering testing that out too and possibly making the switch as an order with 4 items for example and no details about what those items are in paypal is not real helpful. I know commerce is still getting there on the payment parts in comparison to ubercart...

rszrama’s picture

Category: bug » support
Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)

Check your site log to see if IPNs are coming in. That should take care of the order status update. This hasn't changed in 2.x.

apmsooner’s picture

No IPNS showing up in my logs.
I didn't have this checked: "Require a payment method at all times, preventing checkout if none is available."

Not sure if that may be why the transaction went through but didn't create an order? I can't see anything else that would prevent the order from being created.

apmsooner’s picture

Thing is though that only paypal is available as a payment method so not sure the setting above should make a difference. The default setup is used throughout the rest of the store config pretty much so not sure why the transaction could ever get through without an order and user account being created. Weird...

rszrama’s picture

Yeah, that wouldn't matter if PayPal is showing up. It sounds to me like you're testing on a site that is inaccessible to PayPal - have you reviewed the FAQ about this? https://drupal.org/node/1902660#3

apmsooner’s picture

I double checked the IPN settings in the paypal profile and it was set to an old url prior to us migrating. Per your note in the comments, I turned IPN completely off. That is still the recommendation? I really didn't know what to put in there for the url otherwise...

Anyhow, does that sound like what might have been causing the issues?

kingandy’s picture

My understanding is that the integration module should pass through a custom IPN URL (specific to that order), which would override any IPN set at the PayPal account end?

Our site is live and internet-visible.

rszrama’s picture

Yes, it should ignore your account settings when we pass a notify_url in via the payment request. If the IPN isn't coming in even if you're online, that'd be a fancy problem... I suppose you can check with PayPal to ensure it's actually getting sent out. : ?

kingandy’s picture

We think we've found our problem - "Instant Payment Notifications" was set to "Disabled" (From within PayPal: "My Account" > "Profile" > "Instant Payment Notification preferences"). That'll teach us to assume clients set things up correctly at their end ... they haven't had a WPS checkout since but for now I'll assume it's working and step out of this ticket. If we find it is still not working I'll come back and let you know.

@apmsooner - I don't think turning IPNs off is what you want here, that'll stop PayPal even trying to communicate success.

apmsooner’s picture

I'm really confused because Ryan suggested disabling IPN completely in this post https://drupal.org/node/1055390#comment-6445212

So is it supposed to be enabled or disabled? And if enabled.... what goes in the url field? Nothing?

I can't leave the field blank... i get this message in paypal: You must enter a properly formatted URL into the Notification URL field in order to activate Instant Payment Notification.

So what goes in there?

apmsooner’s picture

@kingandy

I read the read me and it clearly states this:

Do I need to configure the IPN settings in my PayPal profile?

Nothing. There's no reason to enable IPN through your PayPal profile. When transactions are submitted by this module, they include a "notify_url" parameter that tells PayPal where to send IPNs even if the general IPN settings in your PayPal account are disabled. The only reason you should be configuring the IPN settings in your PayPal account is if another module that adds functionality on top of this module tells you to.

Maybe Ryan can clear it up once and for all if something has changed...

rszrama’s picture

I don't believe anything has changed, but PayPal isn't the most stable system in the world. Next order I get on my site I'll be able to confirm at least how it's working for me.

micnap’s picture

I'm having the same problem. Possibly related to this? https://drupal.org/node/1460964

kingandy’s picture

I think that's kind of the opposite. That issue is "Successful IPN communication is setting the order complete before the checkout actions have all fired", whereas our issue is "The IPN communications are not succeeding".

Presumably, when we've resolved this issue, we'll be at risk of hitting that one...

Marko B’s picture

Issue summary: View changes

I have IPN and everything looks fine but, order is not going to Checkout: Complete

Order	04/23/2015 - 02:21	Anonymous (not verified)	Status has been set to Checkout: Confirm order (previously: Checkout: Checkout).
Payment	04/23/2015 - 02:21	Anonymous (not verified)	Payment of $327.90 submitted via PayPal WPS.

this is messages I get, and this is where is stays. What is interesting is that some payments get to Checkout: Complete for WPS and some dont. So there must be some problem why this is happening.

Marko B’s picture

To shed some light. Problem is beacuse WPS demands that you also set Auto-Return option in PayPal config.
https://www.paypal.com/cgi-bin/webscr?cmd=p/mer/express_return_summary-o...

If you dont have this set, then some are probably not going to return to your page, they will just leave at PayPal and Checkout will not be completed.

deggertsen’s picture

@Marko B. That would have been nice to know YEARS ago! Thank you! I believe that simple piece of information fixes this issue. It should really be in the documentation somewhere in big bold print though.

Marko B’s picture

What also happenes is, if user anyway closes page and doesnt go back to your site with redirect, rules to change status of order and create users if you have it etc wont fire.
What I made is this hack for now in WPS module

    case 'Completed':
      $transaction->status = COMMERCE_PAYMENT_STATUS_SUCCESS;
      $transaction->message = t('The payment has completed.');
      commerce_order_status_update($order, 'pending');
      rules_invoke_event("commerce_checkout_complete", $order);
      break;

where I added a status change on IPN for WPS an also invoked rules event. This also needs some configs in rules for cases of duplicate rule invokations.

I will open new topic to discuss on this, https://www.drupal.org/node/2485507

TechnoTim2010’s picture

Issue summary: View changes

I can confirm that #21 above is correct and works. The return url just has to be your domain name. There are also two checkboxes to turn on, one enables auto return and the other enables sending data back to Drupal Commerce.

One other caveat, if the paypal account has > 1 email address ensure they are set correctly in the Drupal Commerce Paypal rule.

Tim

Marko B’s picture

Tim,

Did you just set your domain name url? as PP is saying you need specific page to have
https://www.paypal.com/cgi-bin/webscr?cmd=p/pop/express_return_reqs-outside

so I made custom page just for them and added mydomain.com/paypal-page and it worked. Wondering if it also works if you only set domain name?

TechnoTim2010’s picture

It did work just with domain name.

freelylw’s picture

If I am using 2 business website for Paypal WPS, then I can't put the domain name in the auto return setting. so still a problam.

How come I don't have this problem when I used ubercart before. only in commerce.

t7’s picture

if order status not updated when payment is live, make sure your WPS setting has primary email of your Paypal account in "PayPal e-mail address" box.
However, whatever the problem maybe, it is best to check your "Recent Log Messages"

Anybody’s picture

sic’s picture

Is there any update on this? Random PayPal orders wont complete, there is not really an error message.

deggertsen’s picture

Yeah, I simply had to disable PayPal WPS because of this problem. Even with #21 it still seems to happen from time to time so I simply had to just stop using Paypal. I like Stripe better anyway...

sic’s picture

is this paypal or module related? anyone knows?

Anybody’s picture

Ok guys, I think it's time to roll up this problem and fix it finally after years. I hope some of you in this issue are willing to help.

Since some weeks we're again running into these problems described above which lead me to some research through the 7.x-2.x issues for PayPal WPS and as you can see in the following list, there are several issues and I guess all have the same reason (which this oldest issue is based on):

I guess one of them would be reason enough to fix it, but that still looks like a heavy problem, doesn't it?
I'll close them as possible duplicates to merge all in this issue.

So how should we proceed here?
We have several possible solutions in this and the other issues through rules or in code... does anyone of you have a final solution for PayPal WPS?

I guess most of the problems appear because of the race condition with the IPN vs. checkout completed.

Anybody’s picture

Status: Active » Closed (duplicate)

After reading through the issues, I see three possible ways to fix this:

I'm not sure which is best and have no perect solution yet. Let's discuss these options.

Furthermore as first step if you encounter this problem you should perhaps activate the Return URL in your PayPal Website settings, as described in some issues: https://www.paypal.com/cgi-bin/webscr?cmd=p/mer/express_return_summary-o...

See FAQ:

What URL do I use for auto return from PayPal Payments Standard?

The way this feature typically works, it requires you to have a static page on the site that you can automatically redirect people back to. However, because we pass in a return URL with the initial API request, this URL that the customer would normally return to if they clicked a link to return to your site will be used in place of whatever static URL you entered in the PayPal Payment Standard preferences form. Therefore, in the settings form in your PayPal account, you can simply enable auto return and enter the main domain of your website, and PayPal will substitute the appropriate order specific return URL it received from the API request to setup the payment form.

https://www.drupal.org/node/1902660

Here we should please discuss, if that's just a lucky workaround or a final fix which should be better documented then!

Anybody’s picture

Status: Closed (duplicate) » Active
Anybody’s picture

Priority: Normal » Major

BTW I can confirm this major issue still exists! And there's still a race condition in Checkout UI vs. IPN ... updating priority to major. If the maintainer thinks this is not a PayPal Module but a Drupal Commerce problem, please see #2609176: Add an order setting to disable multiple checkout completion invocations per order and my results above.

Since some days this problem happens again for me without changing anything. I think the reason are "timing" changes at paypal.

joleenshook’s picture

This problem exists and is a real hangup for me on a project right now. In sandbox mode, everything works if I enable return to website in Paypal. In production mode, the problem persists 90% of the time, and appears to have something to do with caching. The very first order I put in from a paypal account works, all subsequent ones do not, although the payment is definitely processed. The IPN notification shows up in my drupal log.

RULES DO NOT FIRE. And yes, it's definitely a race condition.

Why is it that there is no event for the IPN receipt? Couldn't we just fire off that? It's being logged with the order number, so in theory we should be able to complete the order.

Does anyone have a hack for this? Apparently the commerce maintainers are just completely ignoring this, seeing as how this problem goes back 8 years. Simply enabling "return to website" in the paypal account isn't working for me, at least not outside of the sandbox.

The true annoyance for this is that we tested this like crazy with the paypal sandbox, and it never failed. Now that the customer has finally decided to put this into production, it randomly doesn't work.

Anybody’s picture

@joleenshook: Try the patch from #2609176: Add an order setting to disable multiple checkout completion invocations per order and provide feedback there, please. I guess to maintainers will not do anything here... sadly.

Anybody’s picture

Component: PayPal WPS » PayPal / IPN

I just ran into the same situation with PayPal Checkout now! So changing the component accordingly.

The reasons are the same as also described in #1460964: "When completing the checkout process" never fires if a rule sets order complete on IPN.

Anybody’s picture

Status: Active » Closed (duplicate)

As this is neither a PayPal WPS specific problem, but also affects other Off-site payment methods running into race-conditions with the IPN, let's close this as duplicate of #1460964: "When completing the checkout process" never fires if a rule sets order complete on IPN. Still it seems that this typically happens with PayPal, perhaps because it's very widely used or the IPN callback happens very fast at PayPal?

Feel free to reopen, if someone thinks this is PayPal-specific and should be fixed in the PayPal module.