I intend to sell a digital product so need to be able to verify that a payment has been completed; AFAIK, this is not possible using javascript code, but if there's a way I've missed, I'm happy to try it. As it is, I think I need to use the Add Payment buttons technique described here, but with some server-side code to allow me to write order details to my own MySQL database which I can then use to generate the digital content for the customer. The basic buttons work fine with my sandbox, with the payments happening OK (though they only seem to be in US dollars, despite me specifying currency=GBP!!). When I change the createOrder: function() line to use the server side PHP code (as detailed at https://developer.paypal.com/docs/checkout/reference/server-integration/set-up-transaction/), the code fails. The buttons still render, but when I click on one, the popup window appears then immediately disappears without letting me make the payment. I've spent hours staring at this and just can't get it to work - what am I missing please?
... View more