question

Muhammad Hassan avatar image
Muhammad Hassan asked

Some In-Apps not working,

We are making a web-gl build with Unity for the facebook game and using Playfab services. In-Apps are set in the playfab console and playfab is used as a third party web payment method. Some of the in-apps are working fine but others are giving 500 status code (Internal Server error). It is not opening the pay popup for some In-Apps. All bundles are set up in the same way in console. Product ids are set correctly from both client end and playfab end. Same part of code is being used for all the bundle purchases except the bundleId itself. Struggling to find what could be causing the issue, if you can point me to how to resolve this, I would be really thankful

,

game manager
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Citrus Yan avatar image
Citrus Yan answered

Hi @Muhammad Hassan & @Chanda Yadav,

We made a fix on this, currently it's waiting for merging and deploying, we'll let you know once it's deployed.

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Citrus Yan avatar image Citrus Yan commented ·

Hi @Muhammad Hassan & @Chanda Yadav

Those product URLs should be working fine now.

0 Likes 0 ·
Muhammad Hassan avatar image Muhammad Hassan commented ·

Yes cross checked and it works now. Thanks!

0 Likes 0 ·
Citrus Yan avatar image
Citrus Yan answered

What's your title id? And, which In-Apps are not working? Can you specify them?

5 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Muhammad Hassan avatar image Muhammad Hassan commented ·

Thank you for replying. Title Id is "64f85". Bundles not working are

  • id= "bundle2" name="Playful Bundle"
  • id= "bundle3" name ="Bon A-pet-treat Bundle"
  • id="bundle6" name "Bone-ty bundle"
  • id="movesbundle" (this only appears to purchase when user loose the game (match3) but can purchase few moves to try and complete the task)

Whereas these are the bundle which are working

  • id="bundle1" name="Beginner Bundle"
  • id="bundle4" name="Paw-fect Bundle"
  • id="bundle5" name="Going Mutts Bundle"

These are the RM in-apps. I also tried to create a new in-app on server and client but that too gave me the same error (status code 500).

0 Likes 0 ·
Citrus Yan avatar image Citrus Yan Muhammad Hassan commented ·

Are you using facebook as the payment method? And if so, did you follow this tutorial:

https://docs.microsoft.com/en-us/gaming/playfab/features/commerce/economy/non-receipt-payment-processing

Moreover, which API you made to PlayFab was returning the "Internal Server error" ?

1 Like 1 ·
Muhammad Hassan avatar image Muhammad Hassan Citrus Yan commented ·

Yes that is the same tutorial followed and flow is same for all in-apps. Like I told earlier code from client side is same for all the in-apps. API call "StartPurchase" sends a successful callback but in that call back when we call "Facebook.Canvas.Pay" only at that statement it sends an error for some in-apps. I have put the debug logs before and after the statement to confirm. I have attached the snippet.

0 Likes 0 ·
code1.png (50.6 KiB)
code2.png (44.7 KiB)
Show more comments
Muhammad Hassan avatar image Muhammad Hassan commented ·

Citrus you're right, error is returned b Facebook.Canvas.Pay. I have already tried the thread you linked but it didnt work out. What else would you suggest?

0 Likes 0 ·
Muhammad Hassan avatar image
Muhammad Hassan answered

I have had a word with facebook support team and they asked the product urls for the in-apps so I shared these

https://64f85.playfabapi.com/OpenGraphProduct/64f85/0/1/bundle2 https://64f85.playfabapi.com/OpenGraphProduct/64f85/0/1/bundle3 https://64f85.playfabapi.com/OpenGraphProduct/64f85/0/1/bundle6 https://64f85.playfabapi.com/OpenGraphProduct/64f85/0/1/movesbundle

https://64f85.playfabapi.com/OpenGraphProduct/64f85/0/1/bundle1 https://64f85.playfabapi.com/OpenGraphProduct/64f85/0/1/bundle4 https://64f85.playfabapi.com/OpenGraphProduct/64f85/0/1/bundle5


And all of these are returning 404 error code when hit simply through browser. Should they not return (20x) valid status code? Facebook support team has recommended to reach out to playfab support team!

4 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Citrus Yan avatar image Citrus Yan commented ·

Hi, we're currently working with the engineer team to help investigate this issue, any updates on this will keep you informed.

1 Like 1 ·
Muhammad Hassan avatar image Muhammad Hassan Citrus Yan commented ·

I have attached the reply I have received from the facebook support team if it may help

0 Likes 0 ·
Citrus Yan avatar image Citrus Yan Muhammad Hassan commented ·

Thanks for the info:)

1 Like 1 ·
Show more comments
Muhammad Hassan avatar image
Muhammad Hassan answered

Any update Citrus?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Chanda Yadav avatar image
Chanda Yadav answered

Hi Citrus,

Could you please update us on the investigation. Looking forward to hear from you.

Thank you

Chanda

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Muhammad Hassan avatar image
Muhammad Hassan answered

Hi Citrus, there appears to be an issue with the purchases once again. Its showing the wrong price for in-apps now. I have also tested the in-apps URLS with the Graph API Explorer "https://developers.facebook.com/tools/explorer/" provided by facebook. Price shown for these bundles are incorrect and same, Also in the facebook canvas pay popup its showing wrong title names as well. But on Facebook's Graph API explorer it is showing correct title but wrong prices. I have tried doing the changes but it does not reflect the price at all. Title change only gets reflected in Graph API Explorer

https://64f85.playfabapi.com/OpenGraphProduct/64f85/0/1/bonesbundle1
https://64f85.playfabapi.com/OpenGraphProduct/64f85/0/1/bonesbundle2
https://64f85.playfabapi.com/OpenGraphProduct/64f85/0/1/bonesbundle3
https://64f85.playfabapi.com/OpenGraphProduct/64f85/0/1/bonesbundle4

While below ones are working fine.

https://64f85.playfabapi.com/OpenGraphProduct/64f85/0/1/bundle1
https://64f85.playfabapi.com/OpenGraphProduct/64f85/0/1/bundle2
https://64f85.playfabapi.com/OpenGraphProduct/64f85/0/1/bundle3
https://64f85.playfabapi.com/OpenGraphProduct/64f85/0/1/bundle4
https://64f85.playfabapi.com/OpenGraphProduct/64f85/0/1/bundle5
https://64f85.playfabapi.com/OpenGraphProduct/64f85/0/1/bundle6

Could you please check? It was working fine few days ago after the fix but just today this has started to happen.

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Citrus Yan avatar image Citrus Yan commented ·

I can see that you overrode the price in the Store:

That may be the reason why you were getting the wrong price.

And, about the wrong title name issue, I can see that it was returned correctly from the product's OpenGraphURL, maybe Facebook cached the old ones and you did some modifications on that item later on, in that case you may force Facebook to re-scrape that object to update Facebook's cache.

1 Like 1 ·
store.png (27.9 KiB)
Muhammad Hassan avatar image
Muhammad Hassan answered

Thanks Citrus. Yes, rescraping did work!

3 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Muhammad Hassan avatar image Muhammad Hassan commented ·

Hey @Citrus Yan we are facing the same issue once again, and this time with all the bundles listed in the in-apps. All in-apps are being scrapped as "websites" while they should have been "product". I have attached the screenshot of the console log. Tried with postman, facebook graph explorer and always getting type:website.

0 Likes 0 ·
Muhammad Hassan avatar image Muhammad Hassan Muhammad Hassan commented ·

Screenshot

0 Likes 0 ·
in-apps.png (6.5 KiB)
Citrus Yan avatar image Citrus Yan Muhammad Hassan commented ·
1 Like 1 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.