Paypal Commerce (sandbox)- expected order id to be passed - tried everything I can find on google

2 个月 前
Hi

When I click the paypal button on the checkout I get Expected Order Id to be passed.

When I check the log I have this:

Nop.Core.NopException: Failed request (UnprocessableEntity): The requested action could not be performed, semantically incorrect, or failed business validation.
{
  "name": "UNPROCESSABLE_ENTITY",
  "message": "The requested action could not be performed, semantically incorrect, or failed business validation.",
  "debug_id": "f346758552ba2",
  "details": [
    {
      "field": "/purchase_units/@reference_id=='default'/payee",
      "value": null,
      "location": "body",
      "issue": "PAYEE_ACCOUNT_INVALID",
      "description": "Payee account specified is invalid. Please check the `payee.email_address` or `payee.merchant_id` specified and try again. Ensure that either  `payee.merchant_id` or `payee.email_address` is specified."
    }
  ],
  "links": [
    {
      "title": null,
      "href": "https://developer.paypal.com/api/rest/reference/orders/v2/errors/#PAYEE_ACCOUNT_INVALID",
      "method": "GET",
      "rel": "information_link",
      "encType": null,
      "mediaType": null
    }
  ]
}

But when i entered all the sandbox info into nopCommerce I got a message stating credentials were correct, in fact until the credentials (client id, secret, merchant Id) were confirmed I could not even see the paypal checkout option. So I don't understand:

"issue": "PAYEE_ACCOUNT_INVALID",
      "description": "Payee account specified is invalid. Please check the `payee.email_address` or `payee.merchant_id` specified and try again. Ensure that either  `payee.merchant_id` or `payee.email_address` is specified."

The fact it already checked the credentials and confirmed them tells me there is nothing wrong with my credentials so why tell me the payee account is invalid?

Can anyone help with this as I have spent hours googling and trying different things, setting up new paypal accounts just in case there was something wrong in the original account and nothing has worked.

I have also upgraded paypal commerce to the latest version which I downloaded about an hour ago and installed, all for nothing as it is the same error I had prior to upgrading.

Any help appreciated, thanks.
Paul
2 个月 前
Oh My God. I spent hours on this and it turns out that the merchant ID needs to also be taken from the sandbox account, but in the sandbox account they don't call it merchant ID they call it Account ID. So when I was searching my Sandbox for the merchant ID and could not find it so used my main accounts merchant ID it turns out i was just going round in circles.

It would be extremely useful if the paypal commerce plugin mentioned this on their documentation, if someone has contact details for them I would be happy to vent my frustration at that lack of important detail. You can probably tell I am not happy about the wasted hours spent on this lol. :)
2 个月 前
Thanks, we'll adjust docs and the appropriate hint in the plugin.