When using Facebook as a payment platform, you need to check if mobile payments are completed ok using Realtime Updates for Payments. That is: Facebook will notify you when the payment is ok or not to an URL you provide.
It will be great to have this covered by GameSparks.
I got some issues following the final instructions of that tutorial, In case someone gets some parsing errors try getting the accessToken this way:
var accessToken = tokenResp.getResponseJson()["access_token"].split('|');
The page linked above by Hjupter should be what you need. If you feel this doesn't fit your requirements please let us know what you require and we can look into it some more for you.
isn't this what you guys need? https://docs.gamesparks.com/tutorials/cloud-code-and-the-test-harness/facebook-webhooks-and-gamesparks-integration.html
As I understand Gamesparks currently NOT support Webhooks for Payments (formerly Realtime Updates). So no In-App-Purchase on web Canvas. When you plan to implement this? 3 years and no answers((
I am also looking for a possible answer to this problem.
Is there any update on Gamesparks supporting Facebook Payments Realtime Update Subscriptions?
As you know, for Facebook payments "the subscription and processing of Realtime Updates for the payments object is a mandatory requirement of accepting payments on Canvas".
We need to implement this.
While you develop this feature, the only way we found to implement this feature, is the following:
+ We will need an extra server to get the requests from facebook.
+ From this server we will perform a request to the CallbackURL of GameSparks, in that event in GameSparks we will perform all the actions to validate the purchase.
+ After that, we will response to our extra server using the setScriptData function to send the required data.
+ Finally from the extra server we will parse the response in the way Facebook need it.
All this turnaround is because we can't find any way to response Facebook the way he needs, for example, Facebook to suscribe the server as a realtime update subscription server, needs a simple answer, which consists in a simple string and we only can answer with a json object via setScriptData function.
Do you see any problems with this implentation? even better... Could you provide us any better solution which does not involve any extra server?
Thank you very much.