问题
About 2-3 weeks ago I added PayPal payment processing to my site and it worked like a charm with no problems. Now I've come back to the project to tweak the code. I haven't touched the Paypal code that I finished 2-3 weeks ago, and I tried to pay an invoice.
I am currently running this in sandbox. The error I am getting is a duplicate transaction, duplicate invoice id. However each invoice ID is unique to each invoice created so I don't see how that could even be an issue (let alone I didn't touch the code). Below is an image of the error I am getting while using Paypal Connection Exception.
So now I'm stuck and completely lost on what I should do to fix this issue. Any help is very appreciated. Thanks
回答1:
Solved. You cannot pass in your own unique invoice ID (idk why), I just used uniqid() and it works.
来源:https://stackoverflow.com/questions/39781454/paypal-rest-api-error-duplicate-transaction-and-duplicate-invoice-id