1

Problem

I'm testing on a live website and the trigger "When an order is paid in full" is not triggered by Paypal. I'm receiving the IPN and the payments are successful. Is there some set-up I'm missing?

Set-Up

I have Drupal Commerce and Commerce Paypal installed, I've got the latest versions of both of them and rules.

I'm using Paypal Sandbox for my payments and it's the only payment method. It's set-up according to http://www.drupalcommerce.org/user-guide/paypal-standard.

The payments are being paid and received in the sandbox.

I'm receiving the IPN's (here's the latest one from admin/reports/dblog) so why is the trigger not firing?

[mc_gross] => 12.38
[invoice] => 21-1380584852
[protection_eligibility] => Ineligible
[item_number1] => 
[payer_id] => ARQWQ9YGG73F4
[tax] => 0.00
[payment_date] => 16:46:30 Sep 30, 2013 PDT
[option_selection1_1] => 1
[payment_status] => Completed
[charset] => windows-1252
[mc_shipping] => 0.00
[mc_handling] => 0.00
[first_name] => Dominic
[mc_fee] => 0.62
[notify_version] => 3.7
[custom] => 
[payer_status] => verified
[business] => captain12a@msn.com
[num_cart_items] => 1
[mc_handling1] => 0.00
[payer_email] => captain14a@hotmail.co.uk
[verify_sign] => AiPC9BjkCyDFQXbSkoZcgqH3hpacAQf5aelWDuTPmoMQ5vx5hMDCzulp
[mc_shipping1] => 0.00
[tax1] => 0.00
[option_name1_1] => Product count
[txn_id] => 7Y390707M1183591C
[payment_type] => instant
[last_name] => Woodman
[item_name1] => Order 21 at drupaltest2
[receiver_email] => captain12a@msn.com
[payment_fee] => 
[quantity1] => 1
[receiver_id] => 2FHV6QVKKQXY4
[txn_type] => cart
[mc_gross_1] => 12.38
[mc_currency] => GBP
[residence_country] => GB
[test_ipn] => 1
[transaction_subject] => 
[payment_gross] => 
[auth] => A41o8UNEox9bol5SH7hvw4jIMV-gR-9qubh3WKMZ9hmLr7oTiHMUATibYSUjrjlHHqDUlwDOlwNt10ZLGJt8xDw

(I checked the trigger using ZioBuddha's idea and it works fine for cheque's)

  • Is a transaction created on the order payment page when the IPN is received? – David Thomas Oct 1 '13 at 11:16
  • Well I didn't change anything and it randomly started working. I did resend a Paypal IPN but I doubt that did it. That's really unsatisfying. – Dominic Woodman Oct 1 '13 at 11:30
2

It randomly started working. Here's what I did to debug in-case it helps someone else:

  • IPN only works on a live server not a localhost. Paypal can't talk to localhost.

Debug on Drupal Side - In Payment Rules

Enable Log notifications with the full IPN during validation and processing (used for debugging).

It'll get stored at example.com/admin/reports/dblogs. You can see a sample IPN in my post.

I was originally getting the IPN in a log that looked like:

commerce_paypal_wps  |  1 Oct 2013 - 12:48am  | Customer returned from PayPal with the following POST...  |   username

That log contained the IPN in my original post.

Paypal Settings

You don't need to enable IPN notifications because the module does it automatically when it needs to. But if you do then you can view your history and see if they were getting sent. (I put example.com in the PayPal URL field.)

The only thing I did here was try re-sending an IPN.

What you should have

When it works your log should have something like this in it

commerce_paypal      |  1 Oct 2013 - 11:46am  |  Attempting to process IPN 7Y390707M1183591C. Array...   |  Anonymous (not verified)
commerce_paypal_wps  |  1 Oct 2013 - 11:46am  | IPN validated for Order 21 with ID 7Y390707M1183591C...  |  Anonymous (not verified)
commerce_paypal_wps  |  1 Oct 2013 - 11:46am  | IPN processed for Order 21 with ID 7Y390707M1183591C.    |  Anonymous (not verified)
0

Yes, you can trigger the event: go into orders admin page, view the order that you want to "trigger" and in the right side you can see "payment". Click that link and insert the exact amount of the order. Save and voilà: your order is paid in full.

I have no Commerce to test this for the exact url page, but in this way it works. I have test it more and more time for my clients web site.

M.

  • Because I'm only using Paypal for payment you can't pay in the orders tab. So it is only possible to a trigger "When an order is paid in full" with Paypal if you're live? – Dominic Woodman Sep 30 '13 at 14:33
  • Why do not add "bank transfer", "cash", "cheque" or other type of these payments only in the local site so that you can try the "trigger" ? M. – ZioBudda Sep 30 '13 at 18:24
  • Yep that worked, so the trigger is working without Paypal. But it's not working with it. I'm now working on a live environment, I'm getting the IPN's but it still won't trigger. – Dominic Woodman Oct 1 '13 at 10:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.