banco-alimentar / alimentestaideia.pt

Site doações alimente esta ideia
http://alimentestaideia.pt
Other
10 stars 0 forks source link

Paypal payments are not working due to unsupported version #769

Open tiagonmas opened 6 months ago

tiagonmas commented 6 months ago

Describe the bug We're getting an exception when trying to make a paypal payment

An unhandled exception occurred while processing the request.
HttpException: {"name":"UNPROCESSABLE_ENTITY","details":[{"field":"/purchase_units/@reference_id=='default'/payee","location":"body","issue":"PAYEE_ACCOUNT_RESTRICTED","description":"The merchant account is restricted."}],"message":"The requested action could not be performed, semantically incorrect, or failed business validation.","debug_id":"b137fd445a3fa","links":[{"href":"https://developer.paypal.com/docs/api/orders/v2/#error-PAYEE_ACCOUNT_RESTRICTED","rel":"information_link","method":"GET"}]}

When checking Facebook for business we see that the account is restricted. This is because Paypal SDK was not updated Instructions to update: https://www.facebook.com/events_manager2/list/app/760472741305084/overview?act=254379401963151 https://www.facebook.com/events_manager2/list/app/760472741305084/sdk_upgrade?act=254379401963151

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Add some items to donate and try to pay with Paypal.
tiagonmas commented 6 months ago

image

we're using the latest https://www.nuget.org/packages/PayPalHttp/1.0.1 ...

tiagonmas commented 6 months ago

@guerrerotook could you take a look too ?

guerrerotook commented 6 months ago

@tiagonmas looking at the error it's look like the PayPal account for the prod is restricted. The error code is PAYEE_ACCOUNT_RESTRICTED and here is a stack overflow article, https://stackoverflow.com/questions/67313024/payee-account-restricted-the-merchant-account-is-restricted. I tried to do a payment in the dev environment, and it works, meaning that there is no issue with the API but rather with the account itself. Try to log into your PayPal account and see what you found.

tiagonmas commented 6 months ago

Correct! But when I go to account, it tells me the account is restricted and the reason (image above) is that the SKD needs to be updated. But it's strange since it refers to the IoS SDK that we are not using ... I'll follow the article you sent.

tiagonmas commented 6 months ago

I opened a paypal support incident ... let's see what they say