New to the community? Welcome! Please read our Community Rules and Guidelines
If you want to report illegal content under the EU Digital Services Act, please do so here
Hi @rmillet
I tested your code and it worked on my first attempt, which you can confirm by reviewing the payment which I sent to your account.
The only thing I can imagine may be causing your "504" issue, is either a bad DNS entry for "www.sandbox.paypal.com" or a firewall blocking the access attempt.
"www.sandbox.paypal.com" currently resolves to IP "173.0.82.77", so if you attempt to resolve "www.sandbox.paypal.com" to an IP address, that is what should be returned. You should also be allowing all outbound access in your firewall to "173.0.82.77".
Sandbox IP's are listed at the following resouce : https://www.paypal-knowledge.com/infocenter/index?page=content&id=FAQ1157&expand=true&locale=en_US