PayPal commerce error: "Expected an order id to be passed" showing in 4.70.5

7 месяцев назад
Hi

In the "Zip / postal code" field in Shipping Settings, we had an extra space after the postal code numbers. This caused the Paypal to throw the exception. "9524 " instead of "9524"

Maybe the plugin should do a TRIM on the fields that are sensitive to validation by PayPal?


Nop.Core.NopException: Failed request (BadRequest): Request is not well-formed, syntactically incorrect, or violates schema.
{
  "name": "INVALID_REQUEST",
  "message": "Request is not well-formed, syntactically incorrect, or violates schema.",
  "debug_id": "fe255adebac0a",
  "details": [
    {
      "field": "/purchase_units/@reference_id=='default'/supplementary_data/card/level3/ships_from_postal_code",
      "value": "9524 ",
      "location": "body",
      "issue": "must match \"^[a-zA-Z0-9_'.-]*$\"",
      "description": null
    }
  ],
  "links": [
    {
      "title": null,
      "href": "https://developer.paypal.com/docs/api/orders/v2/#error-must match \"^[a-zA-Z0-9_'.-]*$\"",
      "method": null,
      "rel": "information_link",
      "encType": "application/json",
      "mediaType": null
    }
  ]
}
7 месяцев назад
All settings in the admin area are trimming when saving, no need to trim it again in the plugin. Just try to save your shipping zip code again.
7 месяцев назад
Hi RomanovM, we get same issue in nopCommerce 4.50.2 version
Any specific solution please

Paypal commerce plugin : Version: 1.10.6
https://prnt.sc/T1_PVcnnwya7

https://github.com/nopSolutions/nopCommerce/issues/4427#issuecomment-2650619691
7 месяцев назад
nopCypher wrote:
we get same issue in nopCommerce 4.50.2 version


Check the log for error details. "Expected an order id to be passed" is the common error text returned by PayPal. And it's worth opening a new topic describing your problem.
один месяц назад
Hey, NopCommerce team!
Yesterday I faced the same Paypal API issue as described, but related to image_url. I use NopCommerce 4.80.4, and checkouts used to pass with PaypalCommerce plugin. Now any attempt to checkout gives "invalid request" error.
I verified Paypal documentation and it says that image_url should be absolute URL, not relative. However, the plugin provides relative image URLs. I patched the plugin to get absolute image URLs and tested - it solved the problem.
Is it possible that Paypal tightened their requirements for image_url recently?
один месяц назад
Actually, PayPal always required an absolute path for images and for the plugin to work correctly, it was necessary to enable setting MediaSettings.UseAbsoluteImagePath in the store. Maybe you changed it recently?
Also, check this forum topic.
одна минута назад
We're seeing the same issue in nopCommerce v 4.80.6. We've tried everything we can think of to resolve the problem but no having any luck.