Hi! It was working fine, but then became broken with no reason. I don't know why. Payment thru Paypal WPS comes ok (PP gateway, money charged) and when return back to site, my order does not complete. It's stuck in pending state. Maybe it's other module bug? I failed to figure it out.
Any suggestions?
Thanks in advance.

Comments

rawthriver created an issue. See original summary.

torgospizza’s picture

You may need to create a Rule that sets the completed (and paid in full) orders to Complete. That's what we did.

{ "rules_update_pending_order_to_completed" : {
    "LABEL" : "Update Pending Order to Completed",
    "PLUGIN" : "reaction rule",
    "WEIGHT" : "8",
    "OWNER" : "rules",
    "TAGS" : [ "Commerce Checkout", "Commerce Payment" ],
    "REQUIRES" : [ "rules", "commerce_payment", "commerce_order", "entity" ],
    "ON" : { "commerce_order_update" : [] },
    "IF" : [
      { "data_is" : {
          "data" : [ "commerce_order:status" ],
          "op" : "IN",
          "value" : { "value" : { "pending" : "pending" } }
        }
      },
      { "commerce_payment_order_balance_comparison" : { "commerce_order" : [ "commerce_order" ], "value" : "0" } }
    ],
    "DO" : [
      { "commerce_order_update_status" : { "commerce_order" : [ "commerce_order" ], "order_status" : "completed" } }
    ]
  }
}
rawthriver’s picture

not working:( it seems like event does not fire when return from Paypal.

anybody’s picture

Please ensure that the following default rule is also active to set the order to pending after complete checkout:

{ "commerce_checkout_order_status_update" : {
    "LABEL" : "Den Bestellstatus nach dem Bestellvorgang aktualisieren.",
    "PLUGIN" : "reaction rule",
    "OWNER" : "rules",
    "TAGS" : [ "Commerce Checkout" ],
    "REQUIRES" : [ "commerce_order", "commerce_checkout" ],
    "ON" : { "commerce_checkout_complete" : [] },
    "DO" : [
      { "commerce_order_update_state" : { "commerce_order" : [ "commerce-order" ], "order_state" : "pending" } }
    ]
  }
}
anybody’s picture

marco.falconi’s picture

Hi,
I have the same problem.
The payment and the redirect to my site works correctly, and the buyer see the confirm message "Your order is number 10...".
But going into orders and viewing the order #10 the status is "suspended" and in tabs "Payment" i there isn't any payment.
If I try with example payment or bank tranfert the payment is set correctly.
I added the rule at #2 comment but nothing.

What i can try? Thanks

marco.falconi’s picture

I have solved.. In my drupal log there was an IPN error: "Attempt to validate IPN failed with error 400: Bad Request".
Then i search for this error and i solved installing the CURL module and setting his override as default.
Thanks

leramulina’s picture

tunning88

Which CURL module did you install?

https://www.drupal.org/project/curl - this has the version only for Drupal 6.

leramulina’s picture

torgosPizza I created the rule

{ "rules_update_pending_order_to_completed" : {
    "LABEL" : "Update Pending Order to Completed",
    "PLUGIN" : "reaction rule",
    "WEIGHT" : "8",
    "OWNER" : "rules",
    "TAGS" : [ "Commerce Checkout", "Commerce Payment" ],
    "REQUIRES" : [ "rules", "commerce_payment", "commerce_order", "entity" ],
    "ON" : { "commerce_order_update" : [] },
    "IF" : [
      { "data_is" : {
          "data" : [ "commerce_order:status" ],
          "op" : "IN",
          "value" : { "value" : { "pending" : "pending" } }
        }
      },
      { "commerce_payment_order_balance_comparison" : { "commerce_order" : [ "commerce_order" ], "value" : "0" } }
    ],
    "DO" : [
      { "commerce_order_update_status" : { "commerce_order" : [ "commerce_order" ], "order_status" : "completed" } }
    ]
  }
}

But it did not help at all. Still same problem.

dang42’s picture

@tunning88 -

Can you please expand on the following:

Then i search for this error and i solved installing the CURL module and setting his override as default.

I'm seeing the same error and I cannot for the life of me figure out what is going on. Any pointers would be much appreciated.

Thanks!

seancasey’s picture

@dang42, I'm guessing you're good now since this was 6 months ago, but in case anyone else is searching for this, I believe this is the "CURL module" fix (actually, it's the cURL HTTP Request module) referenced above:

https://www.drupal.org/node/2263585#comment-11291333

leramulina’s picture

It works!!! Honestly!!! It works!!!

The problem was in the following. First there was only one email - yahoo.com. But it was a private mail of the owner. Then he hired a manager and wanted the notifications to come to the manager and did not want to give the manager his private mail access. So, they created a mailbox in gmail com, changed the parameters in Paypal (made a primary mailbox the one in gmail.com) and did not tell me anything. And in my settings in drupal I still had a mail yahoo.com everywhere.
it was causing the error IPN rejected: invalid receiver e-mail specified (info1visaforbali@gmail.com); must match the primary e-mail address on the PayPal account.
I asked the guys to change the primary email to yahoo.com and it started to work!

Thanks God it finally works! Thank you, Erik, for your support!

anybody’s picture

Version: 7.x-2.3 » 7.x-2.x-dev

@leramulina: So what you wanted to say was, that the problem is fixed for you with which of the solutions above?
You than had two problems, the described issue and the wrong mail address?

anybody’s picture

Status: Active » Closed (duplicate)

Closing this as duplicate of #2036149: PayPal WPS not updating completing checkout to join forces, because I guess all these issues (see #2036149-33) are based on the same problem.

I you guess I'm wrong and this issue is not a duplicate, please feel free to reopen. Otherwise please help to finally fix that issue! :)