Payments.PayPalCommerce error: Failed request

6 месяцев назад
We are getting the error below in Nop 4.80.1 in the Payments.PayPalCommerce plug-in when a customer tries to place an order using 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": "6b47a35b0441f",
  "details": [
    {
      "field": "/purchase_units/@reference_id=='default'/supplementary_data/card/level3/line_items/0/image_url",
      "value": "/images/thumbs/0000034_flipscript-membership.png",
      "location": "body",
      "issue": "INVALID_PARAMETER_SYNTAX",
      "description": "The value of a field does not conform to the expected format."
    },
    {
      "field": "/purchase_units/@reference_id=='default'/items/0/image_url",
      "value": "/images/thumbs/0000034_flipscript-membership.png",
      "location": "body",
      "issue": "INVALID_PARAMETER_SYNTAX",
      "description": "The value of a field does not conform to the expected format."
    }
  ],
  "links": [
    {
      "title": null,
      "href": "https://developer.paypal.com/docs/api/orders/v2/#error-INVALID_PARAMETER_SYNTAX",
      "method": null,
      "rel": "information_link",
      "encType": "application/json",
      "mediaType": null
    }
  ]
}


The png image exists on disk and is accessible, and everything else seems correct, so we are not sure what the "Failed request" error even means, much less how to fix it.  I believe that it happens 100% of the time for customers attempting to use Paypal.

Thank you in advance for any any help.
6 месяцев назад
There has been changes to the Payments.PayPalCommerce in the recent updates
You may want to try the latest version
- I dont mean you need to update the complete website to 4.80.4
- You can just get the Plugin Payments.PayPalCommerce from the marketplace and update it to v 4.80.14

6 месяцев назад
Look at this post.
6 месяцев назад
Unlike the error in that other post, your URL is
"value": "/images/thumbs/0000034_flipscript-membership.png",

- yours is .png, which is a valid type
- I think you are missing the leading "https://yourdomain.com"
6 месяцев назад
How do I fix that?

Under Configuration / Stores / Store Url, the domain is properly set to the https:// domain.  I even set directly it under each language we support, which didn't help.

I will try updating the plugin to version 4.80.4, and see if that helps.
6 месяцев назад
Set MediaSettings.UseAbsoluteImagePath to True
6 месяцев назад
That fixed it!  Thank you so much!