As I explained it here https://www.drupal.org/node/2036149#comment-9876161
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.
If you don't set it, or even if you DO set it to auto return, this still doesn't ensure that user will go back to your site. Some users will just pay and close the auto redirect to your site. What will happen is.
1. Order stays in Checkout:Confirm order
2. All the rules trigers you have set are not triggered as Checkout complete never happens
So you get missing data and problematic orders. What I did is just made solution/hack on base of IPN from PP
https://www.drupal.org/node/2036149#comment-9887487
But this is a patch and changes the way module works a bit, also duplicate rules can/will be fired because of this as I triger them in code without checking for an event.
Further discussion is needed on this....
Comment | File | Size | Author |
---|---|---|---|
#13 | commerce_paypal-pp_wps_no_redirect_no_data-2485507-13-7.x.2.3.patch | 936 bytes | themic8 |
Comments
Comment #1
themic8 CreditAttribution: themic8 at O8 commentedI am also having this issue.
The patch you mention or https://www.drupal.org/node/2036149#comment-9887487 works for me also.
I also have IPN and the Payment Data Transfer disabled in Paypal.
I did set up auto redirects to my domain in Paypal but that doesn't seem to work.
Comment #2
scotwith1tWe are having this problem a LOT on a new Drupal Commerce site and the client is being very understanding. Luckily, you can click the "Simulate Checkout Completion" link on an order's edit page and fully trigger checkout_complete hooks, but this is not ideal for a site that has 100s of orders a day. We definitely DO have auto-return set up, it works and still about 1/4 to 1/3 of orders end up stuck in Checkout: Confirm Order anyway. Please advise. I have the exact same setup as @themic8 described above and did NOT try the patch/hack to the WPS module and would like to avoid it. Help us Ryan, you're our only hope ;)
Comment #3
rszrama CreditAttribution: rszrama commentedIt sounds to me like you aren't getting your IPNs. Even if the customer doesn't redirect back to the merchant's site, the IPN should still come through. That's what the PayPal WPS module uses to create payment transactions and trigger checkout completion rules. Whether or not the customer returns doesn't matter.
Check the logs to see what's happening to IPNs - whether they're coming in at all. If not, that'll be the next step for you to research. : )
Comment #4
MrPeanut CreditAttribution: MrPeanut commentedIf it helps at all, I just ran into this a week ago. The issue was that I had put myclientsbusiness@gmail.com as the PayPal recipient as that's what they use to log in to PayPal. However, the primary email address on the PayPal account was actually ownersname@gmail.com.
Because I had put in an email address that wasn't the primary email address, I was not getting the IPN. I did still get the payment, just not the IPN. Something to maybe check!
Comment #5
scotwith1tI am getting IPNs and they are still periodically getting stuck in Checkout: Confirm Order. Here is a recent one. Please look over it and advise if you see anything weird or if I can provide other info that may be helpful?!
Comment #6
scotwith1tComment #7
rszrama CreditAttribution: rszrama commentedLooks like a different issue than the OP to me. You have any rules changing the order status when an IPN is received?
Comment #8
scotwith1tAlthough the default rule for Commerce sets an order to Pending on Checkout Complete, we have modified that rule to move it all the way to Complete as we have no other processing needed. This works on 9 out of 10 orders just fine and all we're using is WPS. The one above was stuck in Checkout: Confirm Order, which to me means Checkout Complete was never triggered. I can open a separate issue if needed, but as you can see we are definitely getting the IPNs.
Comment #9
rszrama CreditAttribution: rszrama commentedWait, Chekcout: Confirm Order? That's a status related to a PayPal Express Checkout checkout page we define in Drupal Commerce. If you aren't using EC, consider disabling that submodule.
Comment #10
scotwith1tYep. Disabled EC and will keep an eye on it from here. Is there a good reason that a module that's simply enabled but the payment method is not should interfere with one that is actually in use? I can't imagine that this should be the case...
Comment #11
rszrama CreditAttribution: rszrama commentedNope, no clue why it would've ended up stuck on that checkout page. It should've been passed over, but maybe something interrupted the 301 redirect that would've moved it on to complete.
Comment #12
Carlitus CreditAttribution: Carlitus commentedI have a very similar issue but i haven't active the PayPal Express Checkout module.
Sometimes orders with paypal payment stucks in pending state. When i look in watchdog i can see the IPN messages (processed and validated) of the all orders (pending and completed)
In my PayPal payment settings page i have disabled everything.
I've tested and the customer doesn't need to return to my page to complete the orders.
But sometimes, maybe 1 of 10 stucks in pending.
¿Any clue?
Comment #13
themic8 CreditAttribution: themic8 at O8 commentedDepends on the action taken by the user. "if user anyway closes page and doesn't go back to your site with redirect, rules to change status of order and create users if you have it etc wont fire." Marko B
Marko B made a post on: https://www.drupal.org/node/2036149#comment-9887487
I have also made an adjustment according to his "hack" and made a patch that has been attached.
The patch updates the order status, invokes a rule for commerce_checkout_complete. I have also pulled over the "pending reason" form IPN if there is an issue into the transaction messages.
Comment #14
Agiss CreditAttribution: Agiss commentedIn my case I am using Commerce Node Checkout to Allows users to pay to publish nodes. The nodes should be published when the website receives payment confirmation however, despite that the website receives and validates the IPNs as well as the the order status is updated to completed, the nodes are published only when users are directed back to website.
I have applied the patch on #13 but didn't work for me.
To Recap:
Case one (users pay and come back to website)
1. User creates a pay to publish node
2. Node added to shopping cart
3. User goes to Paypal and makes payment
4. User redicted back to website
5. Website receives IPN notice, updates order status to completed
6. Node is published
Case two (users pay and do not come back to website)
1. User creates a pay to publish node
2. Node added to shopping cart
3. User goes to Paypal and makes payment
4. User closes browser or leaves paypal and doesn't come back to website
5. Website receives IPN notice, updates order status to completed
6. Node is not published
log screenshot
Comment #15
themic8 CreditAttribution: themic8 at O8 commented@agiss,
This sounds like it is a rule related to the node publishing not for the IPN update from Paypal. IPN update looks like it is working on your site.
What triggers the node to be published?
Comment #16
Agiss CreditAttribution: Agiss commentedHi Themic8,
Thanks for you reply. This is the rule
{ "commerce_node_checkout_publish_node" : {
"LABEL" : "Publish the nodes that were purchased",
"PLUGIN" : "reaction rule",
"WEIGHT" : "10",
"OWNER" : "rules",
"TAGS" : [ "Commerce Node Checkout" ],
"REQUIRES" : [ "commerce_node_checkout", "rules", "commerce_checkout" ],
"ON" : { "commerce_checkout_complete" : [] },
"DO" : [
{ "commerce_node_checkout_rules_nodes_from_order" : {
"USING" : { "order" : [ "commerce-order" ] },
"PROVIDE" : {
"line_items" : { "line_items" : "Associated Line items" },
"nodes" : { "nodes" : "Associated Nodes" }
}
}
},
{ "LOOP" : {
"USING" : { "list" : [ "nodes" ] },
"ITEM" : { "node" : "Nodes" },
"DO" : [
{ "data_set" : { "data" : [ "node:author" ], "value" : [ "commerce-order:owner" ] } },
{ "node_publish" : { "node" : [ "node" ] } }
]
}
}
]
}
}