202ecommerce / paypal

This repository is for developpers only. To install and upgrade the module in a production shop please install the package via PrestaShop Marketplace by following this link:
https://addons.prestashop.com/fr/paiement-carte-wallet/1748-paypal-officiel.html
Academic Free License v3.0
20 stars 31 forks source link

Tracking not updating #286

Open cruftex opened 10 months ago

cruftex commented 10 months ago

Describe the bug and add screenshots

The tracking / shipment number is not updated in Paypal.

I use DHL Delivery Labels DHL Deutschepost v.1.1.4 for the shipment process.

The tracking configuration is: image

When I generate the label with the DHL module it updates the shipment number in the order. In this step the Paypal module seems also to get active and to the tracking update in Paypal. I see an error in the Paypal tab of the order, saying:

Adding tracking info is failed. Error message: {"errors":[{"name":"NOT_AUTHORIZED","message":"Authorization failed due to insufficient permissions","debug_id":"aa440bf1d488f","details":[{"location":"body"}]}]}

No update happens when I switch to state Shipped.

Have a multi shop setup. I tried this in the All Shops context and in the context of the respective shop.

Expected behavior

Tracking info is updated If label is reprint and shipping carrier changed, tracking number in Paypal will reflect the final result Rename "Paypal checkout" with "Order is shipping state".

Steps to reproduce

  1. Go to order
  2. Generate label
  3. See error message

PrestaShop version(s) where the bug happened

8.0.4

PHP version(s) where the bug happened

8.0

HartLarsson commented 10 months ago

I've exactly the same problem too:

image

Adding tracking info is failed. Error message: {"errors":[{"name":"NOT_AUTHORIZED","message":"Authorization failed due to insufficient permissions","debug_id":"b89d836be9d73","details":[{"location":"body"}]}]}

I add the trackign code by the normal way (no extra modules): 1) change status to shipped 2) add tracking code

Single shop setup PS: 1.7.8.9 Paypal 6.1.0 PHP 7.4

cruftex commented 9 months ago

ping! any updates?

bogdan202 commented 9 months ago

According to the error message, the cause is a lack of permissions. I assume that corresponding permissions were not received during the module 'connection' configuration. Please, reset the connection (log out and then log in again). It will make the module to generate the new access token.

Selection_808

If the problem persists, then address to our support, please https://addons.prestashop.com/en/contact-us?id_product=1748

cruftex commented 7 months ago

I just upgraded to the latest version of the Paypal module (2.6.1) and did a logout and connected again. The problem is still there.

Adding tracking info is failed. Error message: {"errors":[{"name":"NOT_AUTHORIZED","message":"Authorization failed due to insufficient permissions","debug_id":"acbb58a4401fc","details":[{"location":"body"}]}]}

Also this message shows when I generate the shipment label with the DHL module. I did not switch the state to "Shipped" yet, as it is configured in the module.

It is also important that the update is happening on the state change as configured, since a label might be reissued.

vrassociati commented 6 months ago

Any news on this problem? I confirm the problem and add that even before inserting the tracjing there are errors. capture1

marksull commented 4 months ago

FYI, I was experiencing this exact issue. After trying everything that you have tried above (latest version, uninstalled/reinstalled module, disconnected/reconnected, set up a new API key) continued to have the issue. I opened a case with PayPal Technical Support (https://www.paypal-support.com/) and gave them the payload that included the debug ID, and 24 hours later they came back to me indicating they fixed the issue from their side (their support was very quick on this). Their response was:

""" ...got an update from the Product development team that, the error message occured because necessary scopes were not added to your account. Now the scopes are added and it will take about 8 hours to reflect in live. """

After they made the change, the problem went away and has been reliable since. Suggest you open a case with PayPal