1

What has happened to the Google jsapi for inapp purchases? This code worked 2 days ago and stopped working yesterday.

I load the script from here

and then load the payments:

 google.load('payments', '1.0', {
        'packages': ['sandbox_config']

    });

Then when I call the purchase:

goog.payments.inapp.buy({ etc ...

I get is a script error 'goog' is undefined.

Jordan.J.D
  • 7,999
  • 11
  • 48
  • 78
MBC
  • 21
  • 1
  • The plot thickens ... Do I have to include jQuery before I call in-app? Anyway -- I have traced thru the google code and find that goog should be "window.parent.google". What has changed?? – MBC Nov 18 '12 at 13:22
  • jQuery isn't needed for in-app. Could just have been a **sandbox** "hiccup"(?). Seems all's well in [my sandbox](http://code.edchavez.com/simple_demo) – EdSF Nov 19 '12 at 02:43
  • OK -- WORKS IN CHROME. FAILS IN Internet Explorer 9!!! – MBC Nov 19 '12 at 12:42
  • Interesting - I don't recall the reason I'm forcing IE8 via `X-UA-Compatible` but it seems things work if I debug using IE9 on IE9 browser and document modes... – EdSF Nov 19 '12 at 15:40
  • I just removed the `X-UA-Compatible` directive I had forcing the page to ie8 so things should work as expected on ie9. [MSDN reference on document modes is here](http://msdn.microsoft.com/en-us/library/cc288325(v=vs.85).aspx) – EdSF Nov 20 '12 at 07:27
  • Thanks Ed, but I made a mistake. This was Win 8 / IE 10 that I am running.. Still doesn't work on that! – MBC Nov 21 '12 at 17:24
  • I added a and got Line: 351 Error: Class$S1674: Must provide a target window – MBC Nov 21 '12 at 17:36
  • Can't provide input at this time - I don't have win8/ie10...sorry...where's your page (url)? – EdSF Nov 21 '12 at 18:42
  • I'm testing only -- do not have a deplyment – MBC Nov 22 '12 at 12:39
  • I apologize but I see this exact same error using Chrome. This is in production and it was working since Google IO 2012. I added support right after learning about the new google wallet api at IO. To see the error go to http://signup.runnyc.com/evententry/2929162 fill in all required fields (you can put "x" in the fields, email requires something that looks like an email address "x@x.com" works and you must check the accept waiver box. When you click on "pay with google wallet" you will see Uncaught ReferenceError: goog is not defined – Ralph Yozzo Dec 06 '12 at 20:31
  • i posted an answer to my issue here: http://stackoverflow.com/questions/13769248/google-wallet-inapp-payments-uncaught-referenceerror-goog-is-not-defined-goog/13769419#13769419 – Ralph Yozzo Dec 07 '12 at 19:10

0 Answers0