Google Wallet returning "unsupported user agent" error on iOS7, previously worked

StackOverflow https://stackoverflow.com/questions/20055904

  •  31-07-2022
  •  | 
  •  

Вопрос

Today we noticed that our “Google wallet” button is not loading in iOS 7 devices. After debugging we are getting an error “unsupported user agent“ from “google.wallet.online.createWalletButton” ready callback function. The code snippet is,

            google.wallet.online.createWalletButton({
                                            "jwt" : jwt,
                                            "success" : createWalletSuccess,
                                            "failure" : createWalletFailure,
                                             "ready" : createWalletReady
            });

In createWalletReady callback, we are getting the following message from wallet:

{"status":"FAILURE","error":"UNSUPPORTED_USER_AGENT","details":"Safari is not supported with http:// use https:// to support Safari"}

But in IOS lower versions (6.x & 5.x) it is loading successfully.

I have searched Google's docs and the web in general for information, but so far have been out of luck.

Это было полезно?

Решение

The solution for this is to make all Google Wallet Instant Buy calls from secure pages.

So in your example, the page where "Buy With Google" button is rendered (where you have the snippet) should also be a https page.

EDIT: And the documentation is also updated. refer to https://developers.google.com/commerce/wallet/instant-buy/web/tutorial#call_authorize_to_determine_checkout_page_behavior (see Important note).

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top