ZnoteAAC icon indicating copy to clipboard operation
ZnoteAAC copied to clipboard

Rewrite the paypal system

Open Znote opened this issue 9 years ago • 13 comments

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.

Znote avatar Oct 27 '15 20:10 Znote

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

totolol123 avatar Dec 05 '15 20:12 totolol123

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

Raggaer avatar Dec 08 '15 02:12 Raggaer

Hey, what exactly got out of sync and is not working?

e00dan avatar Dec 09 '15 21:12 e00dan

It's working here. ;0

peonso avatar Dec 11 '15 19:12 peonso

The IPN is working but paypal is moving to REST API so why not start using it?

Raggaer avatar Dec 12 '15 14:12 Raggaer

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

Felipe1993 avatar Jan 09 '17 08:01 Felipe1993

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 avatar Jan 09 '17 12:01 Raggaer

@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.

Znote avatar Jan 09 '17 14:01 Znote

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.

Raggaer avatar Jan 10 '17 14:01 Raggaer

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 avatar Mar 20 '17 00:03 Znote

@Znote If you want to test with player we would be glad to give the information to you.

joseluis2g avatar Mar 20 '17 01:03 joseluis2g

Shop history for the logged in account:

image

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.

Znote avatar Apr 05 '17 21:04 Znote

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?

Cepeen avatar Nov 14 '17 08:11 Cepeen