Any way of interacting sfs2x using php?

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

trueicecold
Posts: 84
Joined: 11 Oct 2009, 11:46
Contact:

Any way of interacting sfs2x using php?

Postby trueicecold » 29 Oct 2014, 20:42

Hey all,

I was looking at Facebook payments methodology, and saw it has some server side code to validate the purchase, when successful, but suppose the game uses sfs, and the php validates everything is ok,
basically I COULD just send a client request saying "all is ok, give me 10,000 coins" to the sfs and be done with it, a thing that is subject to fraud.

I'm trying to find a way of letting the user get his coins/gold/whatever from sfs without sending him a "all is ok" message.

Any ideas?
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Any way of interacting sfs2x using php?

Postby Lapo » 29 Oct 2014, 20:49

The best way would be that SFS2X does the FB transaction on behalf of the user via the FB API.
If you do it from client side it's harder to be able to synchronize the two things (the server status and the FB transaction)
Lapo
--
gotoAndPlay()
...addicted to flash games
trueicecold
Posts: 84
Joined: 11 Oct 2009, 11:46
Contact:

Re: Any way of interacting sfs2x using php?

Postby trueicecold » 29 Oct 2014, 20:54

so I get an encrypted token from Facebook, send it to sfs, and sfs decodes it and checks against facebook api?
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Any way of interacting sfs2x using php?

Postby Lapo » 29 Oct 2014, 20:57

If that's the way FB works (sorry, I am not familiar) then yes, sounds like a good way to validate the transaction.
Lapo

--

gotoAndPlay()

...addicted to flash games
trueicecold
Posts: 84
Joined: 11 Oct 2009, 11:46
Contact:

Re: Any way of interacting sfs2x using php?

Postby trueicecold » 29 Oct 2014, 21:03

Cool, that saves a php call, syncs the data and the sfs could update the db :)

Thanks!
User avatar
Carl Lydon
Posts: 298
Joined: 12 Nov 2007, 16:15
Location: NYC
Contact:

Re: Any way of interacting sfs2x using php?

Postby Carl Lydon » 27 Jul 2016, 17:37

How does the extension communicate directly with fb? Or indirectly?
User avatar
Carl Lydon
Posts: 298
Joined: 12 Nov 2007, 16:15
Location: NYC
Contact:

Re: Any way of interacting sfs2x using php?

Postby Carl Lydon » 27 Jul 2016, 17:48

Also, has anything changed on this subject in the past 2 years?

Are there any recent tutorials or posts that you would recommend, that outline the best practice for doing secure transactions using the Facebook payment system communicating directly or indirectly with the SF extension or the database?

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 53 guests