ZnoteAAC
ZnoteAAC copied to clipboard
Rewrite the paypal system
The current IPN script is bad, and probably not working. I want to rewrite the paypal script in favor of their API. Useful resource: https://github.com/paypal/PayPal-PHP-SDK
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Any news? what should be done to achieve it? If this is not so hard, i can try doing it but i'm not very good with PHP xD @Znote
We dont really need the PHP-SDK
Heres what I got so far (need some more time to finish it)
https://gist.github.com/Raggaer/4e30b481a481d11eff07
https://gist.github.com/Raggaer/560eae49787c22bf4dcf
You can get started there. Using cURL and looking to this should help you achieve it
https://developer.paypal.com/docs/api/
I may need some more hours to finish this but my time is limited these days. So if someone wants to finish it before I do here are the gists
Hey, what exactly got out of sync and is not working?
It's working here. ;0
The IPN is working but paypal is moving to REST API so why not start using it?
im stuck here i have verified my paypal account have enable ipn system with the url on it in my account configured the config.php znote added the znoteshop.lua in talkactions
but when players buy points i get the money and he never recieve the points
You should open a new issue. This is not related to IPN not working.
However this opens the case again... IPN is very outdated. I have used REST API on several projects working fine. Far superior with better testing (sandbox) and 0 problems.
Maybe its time to move out of IPN
@Raggaer I'll have a look at your gist code, I think you may be on to something. (anyting to avoid big messy sdk libs). Cornex has sponsored me with a VPS, so I may actually be able to test it out during development the upcoming weekends.
I have been working with the REST API these days. There are many things we can do with it.
We can for example make a blacklist with paypal users payer ID to exclude scammers. Subscriptions and all that stuff.
I am not into the PHP world but I know the API very good. The gist code shows how to create a payment, let the user approve it and the second gist code shows how to execute that payment.
I would be good to not request the OAuth token on each request tho. Maybe store the token and refresh when needed.
Got a working prototype now: https://gist.github.com/Znote/515e96a0de55ba44998fe88053033964 Gotta do some more testing, add/update some of th admin pages, and create a payment history page for users, so they can view their transaction activity on the AAC, as well as re-process requests if they are not directly approved. Based on the sample gist from @Raggaer 👍
@Znote If you want to test with player we would be glad to give the information to you.
Shop history for the logged in account:
I hope this will also help new owners discover issues and reduce amount of debugging.
Gist testing files updated: https://gist.github.com/Znote/515e96a0de55ba44998fe88053033964
Also want to create this in a similar fashion for when purchasing stuff from the store, with status on if it is retrieved in-game etc.
It seems to be working fine in sandbox but I receive an error using live credentials:
https://gist.githubusercontent.com/Cepeen/7e44c001a08dac994b270b1f7a3af78d/raw/7ae7283fa759ebce30ce8b0f107b9cbde7386291/gistfile1.txt
I'm just getting started with this topic. Could you help me please?