0

I am adapting a Unity project to run in the web player, for integration with Facebook's Canvas, and specifically the FB In-App Purchase system. The conversion is nearly finished and as recent as a couple weeks ago I had verified that every possible choice under the IAP options worked perfectly and would resolve transactions correctly. However, the asynchronous payment option has suddenly begun failing with a strange error message that seems unconnected to any Unity code or the web server that was set up to host the game.

When a player selects the asynchronous payment option and clicks on confirm in the FB Pay dialog, the dialog does not close and an error is output to the debug console:

TypeError: undefined is not an object (evaluating 'window.parent.require("GamePaymentProviderIFrameFlow").processIFrame')

redirect.php

This is the error output for Safari and the other browsers give similar messages indicating that "processIFrame" is not recognized because "window.parent.require(...)" is returning an undefined reference.

Now I'm not sure where "redirect.php" actually is, but from what I've been able to gather, it looks like it's looking for and failing to find a module called "GamePaymentProviderIFrameFlow". I can't find any information on whether this is something that happens as part of the Facebook Unity SDK or something on Facebook's servers. I did find that the "require" call is most likely a part of Node.js and would therefore not be run in the player's browser, but rather on a server.

I am using Unity version 4.3.0f4 and Facebook Unity SDK version 6.2.2. I haven't touched anything with regards to the payment system in the time since it worked correctly and although I know this is no guarantee, the error doesn't seem to be happening within Unity at all. The only possibility I can think of is that some FB communication with the FB Unity SDK has begun failing due to some change in the Facebook API. If that's true, however, I don't know if there's any reasonable way to fix this other than to wait for a patch from FB.

Has anyone else encountered this or something similar or could provide any other advice on this topic?

d4Rk
  • 6,622
  • 5
  • 46
  • 60
  • I would suggest upgrading unity to version 4.6 or above if using a newer version of the facebook for unity sdk. If you must use Unity 4.3.0f4 you may be better off trying facebook sdk 4.3.6 or possibly earlier. I would suggest the latter since I am not sure if the older versions are compatible with the most recent facebook API 2.3 Edit: your redirect.php should be in the project you use to host your game. – Justin Markwell Jul 06 '15 at 21:45
  • @JustinMarkwell Thank you for your feedback. I had figured it might have something to do with software versions, but the strange thing is that is worked perfectly fine up until a few days ago, so I had been wondering if maybe Facebook had changed something on their end. – Alec Dixon Jul 06 '15 at 23:05
  • Still looking for a solution to this problem. Rolled back the game with version control to a point where the async purchases worked correctly. Still giving the same error. Versioning doesn't appear to be an issue in this case. Problem appears to be either with Facebook's server or settings or something in the web server setup. Any other suggestions or advice would be much appreciated. – Alec Dixon Jul 07 '15 at 18:33
  • @JustinMarkwell Not entirely sure what you mean about redirect.php being in the project used to host the game. Facebook only takes the .unity3d file from your hosting web server when loading the game for the FB Canvas. Would it be something inside of that file? Facebook also appears to put quite a bit of their own code around the game to frame it in place of the .html file that usually exports with the .unity3d file. Would redirect.php be one of those files? – Alec Dixon Jul 07 '15 at 18:41
  • Yes for example I created a website project to host a game from azure. My redirect.php is within the files of that website project along with the .unity3d file. – Justin Markwell Jul 07 '15 at 22:20

1 Answers1

0

Found a bug report on Facebook's dev site that details the exact problem I'm having. Apparently this is a known UI issue and is in the process of being addressed.

https://developers.facebook.com/bugs/145796563404096/

Guess i'll just have to wait.