PayPal Commerce Error

3 mesi tempo fa
I'm trying to figure out why I get the following error when trying to place an order using PayPal Commerce.


The requested action could not be performed, semantically incorrect, or failed business validation: The specified country requires a postal code(/purchase_units/@reference_id=='7f4c90d7-bf82-4c6c-8c89-3d06702c2a76'/shipping/address/postal_code)


I do provide a zip code when placing the order so not sure what the error means.
3 mesi tempo fa
What plugin version?
What country and postal code you try to set?
3 mesi tempo fa
RomanovM wrote:
What plugin version?
What country and postal code you try to set?


Plugin version is: 1.16.1

Is the country and postal code for the customer?
If so, it's United States and 89169

Or do I set country and postal code somewhere in the app?
3 mesi tempo fa
I just tried to make a purchase using this postal code during checkout and it works fine.

Update the plugin to the latest version (download it on our marketplace) and check again.
3 mesi tempo fa
RomanovM wrote:
I just tried to make a purchase using this postal code during checkout and it works fine.

Update the plugin to the latest version (download it on our marketplace) and check again.


Thanks!
Updated the plugin and I'm making some progress.

Having another issue, though.

When placing the order, I'm never asked to log in to PayPal.
I can still place the order but no money is withdrawn and the payment is stuck on 'Pending'.
3 mesi tempo fa
RomanovM wrote:
I just tried to make a purchase using this postal code during checkout and it works fine.


I still can't get it to work.

This is the error I'm getting:


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": "6b0098a2569b6",
  "details": [
    {
      "field": "/purchase_units/@reference_id=='default'/supplementary_data/card/level3/shipping_address/country_code",
      "value": "",
      "location": "body",
      "issue": "MISSING_REQUIRED_PARAMETER",
      "description": "A required field / parameter is missing."
    },
    {
      "field": "/purchase_units/@reference_id=='default'/shipping/address/country_code",
      "value": "",
      "location": "body",
      "issue": "MISSING_REQUIRED_PARAMETER",
      "description": "A required field / parameter is missing."
    }
  ],
  "links": [
    {
      "title": null,
      "href": "https://developer.paypal.com/docs/api/orders/v2/#error-MISSING_REQUIRED_PARAMETER",
      "method": null,
      "rel": "information_link",
      "encType": "application/json",
      "mediaType": null
    }
  ]
}
3 mesi tempo fa
Started over.
Deleted the REST API App and created a new one.
Followed the instructions and it still doesn't work.

Getting the same error and I just can't figure this out.

Don't think there's an issue on Paypal's end so it's got to be something I'm missing on our end.
3 mesi tempo fa
Could you please provide a full list of steps to reproduce this problem?
Actually, the error in logs is self-descriptive: "A required field / parameter is missing.". In your case it's country code, so, ensure customers fill in the country correctly during checkout, it should be a required field.
3 mesi tempo fa
RomanovM wrote:
Could you please provide a full list of steps to reproduce this problem?
Actually, the error in logs is self-descriptive: "A required field / parameter is missing.". In your case it's country code, so, ensure customers fill in the country correctly during checkout, it should be a required field.


That is what is odd.
I understand that the country code is missing but they do select country when checking out.
Besides - we only sell to the US so that's the only country activated.

Users can check out using Credit Cards or Klarna without problems.
It's only the Paypal Commerce option that doesn't work.

We are using the SevenSpikes One Page Checkout. Could that be the issue?
3 mesi tempo fa
It could. Try to disable third-party plugins and switch to the default theme then check purchase with PayPal again.