Sign In Register

How can we help you today?

Start a new topic
Answered

Use Gamespark and own DB to verify if player paid

I am doing research for a subscription based game and I'm having a hard time finding how Gamespark can facilitate me in (automatically) checking whether a player has paid this month by checking an external DB.


Is this possible?


Best Answer

 I'm quite sure it can be done easily. 

You can add cloud code to teh built-in AccountDetailsRequest request. The code will call an external web service using:   

var httpSender = Spark.getHttp("https:\\yourWebService....");
var response = httpSender.postJson(customData); //or any other post/get methods offered by GS

    and send back the response to the client. You can also store the subscription data in you own MongoDB collection.


Answer

 I'm quite sure it can be done easily. 

You can add cloud code to teh built-in AccountDetailsRequest request. The code will call an external web service using:   

var httpSender = Spark.getHttp("https:\\yourWebService....");
var response = httpSender.postJson(customData); //or any other post/get methods offered by GS

    and send back the response to the client. You can also store the subscription data in you own MongoDB collection.

Sounds perfect, thanks!