Reputation: 1294
I am trying to get my Google browser extension in-app purchase working, but I keep getting an error.
But when I try to get a list of the items within my extension by calling getSkuDetails method, I always get the INVALID_RESPONSE_ERROR
Here is the code I'm running:
google.payments.inapp.getSkuDetails(
{
'parameters': {'env':'prod'},
'success': function(response)
{
console.log('Success', response);
},
'failure': function(response)
{
console.log('Failure', response);
}
});
As you can see, I have included the necessary parameters according to https://developer.chrome.com/webstore/payments-iap
Furthermore, when I try the sample extension provided by google, I get the same error. https://github.com/GoogleChrome/chrome-app-samples/tree/master/samples/managed-in-app-payments
Can anyone explain why I cannot get my code or the sample code from Google to work?
The interesting thing is that getPurchases method works perfectly and returns an array of the user licenses, so Google servers are at least working.
Upvotes: 2
Views: 495
Reputation: 46
Our team has run into a similar problem. Google extension inapp purchases failure messages are not clear at all.
What it looks like to me is that you are not in a country supported by the store because you are able to see licenses, but cannot retrieve a list of licenses for purchase. Have you tried proxying your test environment to one of the supported regions and trying the script then?
Regions supported by Chrome Web Store Payments https://developer.chrome.com/webstore/pricing
Upvotes: 3