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

Il y a 3 mois
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
    }
  ]
}
Il y a 3 mois
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.
Il y a 3 mois
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
Il y a 3 mois
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.