I have just set a web site with:

Drupal 7.31.
Commerce 7.x-1.9
PayPal WPS 7.x-2.3
...
Rules 7.x-2.7
...

and it rocks! People are happily ordering and paying for dancing courses through Paypal.

However, there is one order (that is paid - correct status in Drupal and received in Paypal), that is filling the logs:

IPN validated for Order 21 with ID [SAME ID].

Now 10 entries and counting. The last entry for that order currently is:

IPN processed for Order 21 with [SAME ID].

I'm not sure if it has stopped now or if it will continue.

Everyting works, it's just that my rule for the "When an order is first paid in full" event is triggered again and again.

Any clue about what is going on? (Maybe this is just a "PayPal WPS" issue? If so, feel free to send the issue there.)

Comments

hansfn’s picture

hansfn’s picture

Issue summary: View changes
hansfn’s picture

Looking carefully at the logs, I found:

[...]
Location: http://example.org/commerce_paypal/ipn/paypal_wps%7Ccommerce_payment_paypal_wps
[...]
Message: Recoverable fatal error: Object of class stdClass could not be converted to string i DatabaseStatementBase->execute() (line 2171 of /var/www/example.org/includes/database/database.inc).
rszrama’s picture

Project: Commerce Core » Commerce PayPal
Version: 7.x-1.9 » 7.x-2.x-dev
Component: Payment » PayPal WPS

Hmm, even if it's being validated multiple times, it shouldn't be triggering the event multiple times... ahh, unless the error you're seeing in the logs occurs before the order is updated to indicate the event has already been triggered. Is this not resulting in multiple payment transactions being saved to the order?

hansfn’s picture

You are correct that multiple payment transactions are saved to the order. At admin/commerce/orders/21/payment I see 11 "The payment has completed." statuses. I actually have one more order with these multiple payment transactions - 8 during 30 minutes. The other roughly 100 orders (since 18th of August) worked flawlessly.

Not sure if I can provide any more info to help resolve this issue.

BD3’s picture

Same exact issue here. Has happened twice in the past 3 weeks for me. One order had eight payments tied to the order, the other just two.

The multiple payment timestamps were a few minutes apart from each other, Remote ID the same, and the result message the same.

I should also mentioned that this happened to me with EC and WPS.

Were you able to find the issue with yours?

hansfn’s picture

Nope, I didn't get to the bottom of this.

stevieb’s picture

I'm seeing this issue when the customer has special characters in the name e.g. René

stevieb’s picture

this can be fixed by
1/ following the instructions here https://www.drupal.org/node/2263585#comment-11293927

2/ changing the IPN encoding in your PayPal account (see image here)
https://www.drupal.org/files/paypal_charsets.png