Purchase Android & Windows Server Side

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

Moderators: Lapo, Bax

Ber4ber43
Posts: 79
Joined: 30 Apr 2019, 14:35

Purchase Android & Windows Server Side

Postby Ber4ber43 » 26 Jan 2021, 11:02

Hello everyone,
I have a game created with Unity, the server is made with SFS2x, I have to shop in this game for Android and Windows, I have an idea of how to make payments by the user via client. But I don't understand how to update my server and database, any request I can send to the server could always be faked. So I was wondering if the server should be making purchases for users.

Thanks
User avatar
Lapo
Site Admin
Posts: 22999
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Purchase Android & Windows Server Side

Postby Lapo » 03 Feb 2021, 16:59

Hi,
sorry for the late reply.
Payment APIs such as PayPal and Stripe can invoke your server-side to tell you about a specific transaction that was complete. I think you should look into it.

Typically they will call a specific web-page that you configure in their API/control panel. Since SFS2X runs its own http server you could handle the payment API call with a servlet and update your DB from there.
If necessary you can also invoke an Extension running in SFS2X, from the servlet. We have an article here with more details:
https://smartfoxserver.com/blog/http-re ... tegration/

Hope it helps
Lapo
--
gotoAndPlay()
...addicted to flash games
Ber4ber43
Posts: 79
Joined: 30 Apr 2019, 14:35

Re: Purchase Android & Windows Server Side

Postby Ber4ber43 » 07 Feb 2021, 16:16

Thank you very much

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 41 guests