Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: twmz on April 09, 2013, 12:35:03 AM

Title: receive payments javascript buttons and IE
Post by: twmz on April 09, 2013, 12:35:03 AM
The payment buttons ( are pretty sweet.  I am using them to accept donations on a free web app ( I run, but I ran into the fact that the buttons, as written, don't work in IE 8 and IE 9.  Now, in theory, I could have just decided to not care, but I hate to turn away the rare person who wants to give me a donation just because they might happen to be on an old crappy browser.

The issue appears to be that the pay-now-button.js code is making a cross domain ajax call using jQuery, but jQuery does not support CORS in Internet Explorer.

I fixed this for my website by using the jQuery plugin below.  Note, it works for IE8+ only, which is good enough for my app.  Also note, this only fixes the problem for web apps using SSL because IE refuses to do CORS to an SSL endpoint unless the host page is also SSL.

SSL restriction:

You might want to either recommend this plugin, or better yet change the pay-now-button.js code and API to support/use JSONP instead of CORS.