This is not a duplicate of this post.
I quote from the linked post:
As of June 29, 2017 I see this not working. Paypal has again changed its rules, and I don't think it any longer accepts hidden HTML fields in the form submission: they must be set in the button editor at Paypal.
Paypal documentation is a mess. Half of the links are broken and the other half of the links point to the documentation index.
Does any brain out there know how to achieve a Paypal Payment Button where I can set the price dynamically?