user2959487
user2959487

Reputation: 21

Payments in our game stopped working, "object does not exist"

Our in-game transactions suddenly stopped working properly in one of our games. When a player tries to buy something, they are charged, but then an unknown error occurs and the player is not provided the items they tried to purchase.

Here is the screenshot: https://i.gyazo.com/e7beb162e9e94c9dd50008f1e0b6b78c.png

According to our investigation, the object ID coming to our payment callback cannot be found, even through the Graph API explorer.

Here's an example:

Our server receives the following data from payment callback:

{"object":"payments","entry":[{"id":"1005703272873733","time":1479471429,"changed_fields":["actions"]}]}

We then send a request:

https://graph.facebook.com/PAYMENT_ID?access_token=APP_ACCESS_TOKEN

and receive an error message. The same error occurs in Graph API Explorer

The app name is Butterfly Miracle App ID is 1186246188099014

This is a critical issue that cripples the game.

EDIT: The problem is still unresolved. We keep getting failed payments from the players. This is clearly a problem with Facebook servers that handle payment information. We need an answer from Facebook staff.

Upvotes: 0

Views: 92

Answers (1)

Victor Perov
Victor Perov

Reputation: 1764

There are not any hidden ways for payment validating. Facebook works with two alternative ways of validation:

  1. when you user clicks on "Buy" button - FB.ui({"method": "pay" ... should be fired and your callback will receive data about current payment
  2. in same time the Backend will receive request with payment data from Facebook Payment Service.

That error lies in how your Facebook app and server are configured.

You should check this:

  1. If you are using Dynamic Pricing - check URL in Canvas Payments chapter and be sure your backend is sending correct response.
  2. Check what Facebook knows about your product URL here: https://developers.facebook.com/tools/debug/ Sometimes facebook cache OLD product response - you can try to force cache clean by clicking Scrape again button. BTW: resolve all warnings here.
  3. Canvas Payments chapter in FB app settings page should be configured correctly - try to click Test Callback Url - response should be OK
  4. Try to make test payments and analyze client and backend logs. First of all catch client (js) response from FB.ui({"method": "pay"... and check it. Then analyze access_logs of the Backend (I don't know what are you using: it can be php-fpm, apache, nodejs, etc) - be sure the Backend correctly receives Payment Request from Facebook Payment Service and correctly process it - response status codes should be 200.
  5. Just review again FB app_id and FB secret you typed in the Backend configuration. They should be equal to FB app settings.

If nothing helps - try to debug step-by-step requests that you are receiving from Facebook on test payments.

Upvotes: 1

Related Questions