Paypal REST API error: Duplicate Transaction and Duplicate Invoice ID

☆樱花仙子☆ 提交于 2019-12-13 06:16:51

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!