6

I'm having a problem with the buy now button from the Google Checkout IPN.

I have a list of just over 10 products on my web page, each with it's own 'Buy Now' button. When I click the button, it gets stuck loading the pop-up box from which you would pay. It shows the following loading sign:

https://i.stack.imgur.com/vISR7.png

I know that this is not a problem for all users, or all browsers for that matter. If I load up a different browser (currently using Chrome), it pops up instantly and works. I also know that not all Chrome users have this issue, we have multiple buyers that are using Chrome. Users that have encountered this problem have reported that clearing their browser cache and temp files etc fixed the issue, however obviously this isn't a global fix, other user's further down the line will still encounter it.

I have looked at the console in chrome to see for any javascript errors etc and I have the following:

Failed to load resource: the server responded with a status of 404 (Not Found) https://www.gstatic.com/commerce/inapp/gwt/58c64d72842d0eb2730f88c578d11ca2/C2AD9188DA255956F0928EBDDB27ADE3.cache.js

So I figure this must be some issue with caching, but I have no idea how to go about solving this, the file stated is not linked from my end. I believe it is loaded via the inclusion on my end of:

<script src="https://wallet.google.com/inapp/lib/buy.js"></script>

The following code is in charge of initiating the purchase window:

function purchase(generatedJwt) {
    google.payments.inapp.buy({
        'jwt': generatedJwt,
        'success': successHandler,
        'failure': failureHandler
    });
}

Each product has its own purchase button which calls the above function as follows:

<button onClick="purchase(generatedJWTHere)">Purchase Product 1</button>

I'm fairly certain there's no issue with the JWT I am generating, as I said earlier there are many people that are able to purchase, however there are a select few who can not.

I have had a search around and have not come across anyone with a similar problem to this.

Felto
  • 61
  • 3
  • Can you add the code which is called when the "Buy now" button is clicked? – Ben Smith Aug 31 '14 at 23:01
  • 1
    The code called when a purchase button is clicked has been added. – Felto Sep 01 '14 at 13:41
  • 1
    Unfortunately, this sounds as though it's a bug with Google Wallet itself. If there's a problem with a script that you're not even calling on your page, then it's not something you're going to have any power to fix. I would say file a bug report with Google, but they rather unhelpfully just direct you here, to StackOverflow, for problems. They have a Google+ page here: https://plus.google.com/+GoogleWallet/posts. You can try posting a bug report there. – Chris Pratt Sep 05 '14 at 11:37
  • Chris, I have already tried contacting Google directly about the issue, but have had no response as of yet (2 weeks). It definitely seems like a bug to me, but I was hoping if it is an issue with caching as expected, there may be some way I'm unaware of to trick it into generating a new file or something along those lines. Thanks for the suggestion nonetheless. – Felto Sep 05 '14 at 21:22

1 Answers1

3

You might have an ad blocker installed on your installation of chrome which may be stopping you from loading the checkout page. Try loading the page on another version of chrome on another PC and see how that goes. If it does work on other browsers, then it must be an issue with add-ons you have installed, but I can't be too sure.

  • 1
    I have messed around a bit with the plugins and ensured that there are no ad-blockers active, however the problem still remains. I have yet to try chrome on another computer, but I believe this will fix the problem, but only because it is as far as I can tell a caching problem on the client's side; not because of add-on setup. I'll look in to it as soon as I get the chance though. – Felto Sep 04 '14 at 21:39
  • If you believe it is a caching error, then try to clear your browsers cache. – Hrach Ghapantsyan Sep 05 '14 at 22:26
  • I'm almost certain clearing my cache/temp files will fix it, but that will fix it only for me, not for the rest of my users encountering the problem. One of the other members of staff ran in to this problem and clearing the cache instantly fixed it. It seems to be more of just a temporary work-around though anyhow, he encountered the same problem again a few weeks later. – Felto Sep 06 '14 at 06:14