Azuriom / Plugin-Shop

A shop plugin to sell in-game items on your website.
https://market.azuriom.com/resources/1
MIT License
18 stars 30 forks source link

Error with Paypal Checkout #215

Closed CharlieCoppaHead closed 2 months ago

CharlieCoppaHead commented 2 months ago
[2024-08-12 03:30:16] production.ERROR: Attempt to read property "value" on null {"userId":1,"exception":"[object] (ErrorException(code: 0): Attempt to read property "value" on null at /home/weeniemo/public_html/plugins/shop/src/Payment/Method/PayPalCheckoutMethod.php:232)
CharlieCoppaHead commented 2 months ago

Apologies if adding to this is the wrong thing but thought I'd continue issue in here?

After the line of code you suggested to try if ($metadata?->value === null) {

It worked once then doesn't after that. It gives 500 Server Error and spits out this in logs

production.ERROR: HTTP request returned status code 404:
{"name":"RESOURCE_NOT_FOUND","message":"The specified resource does not exist.","debug_id":"f36f626ad1a14","details":[{" (truncated...)
 {"userId":1,"exception":"[object] (Illuminate\\Http\\Client\\RequestException(code: 404): HTTP request returned status code 404:
{\"name\":\"RESOURCE_NOT_FOUND\",\"message\":\"The specified resource does not exist.\",\"debug_id\":\"f36f626ad1a14\",\"details\":[{\" (truncated...)
 at /home/weeniemo/public_html/vendor/laravel/framework/src/Illuminate/Http/Client/Response.php:272)
MrMicky-FR commented 2 months ago

Hi, sorry for the wait, can you try replacing the file plugins/shop/src/Payment/Method/PayPalCheckoutMethod.php with this one https://gist.github.com/MrMicky-FR/feb7899d22d9cff32e2ecac324bb8000 and tell me if it solves the issue?

MrMicky-FR commented 2 months ago

Thanks for your patience, this issue has been fixed in v1.2.7 of the shop.