Skip to content

Commit

Permalink
Merge pull request #10 from thejoshualewis/master
Browse files Browse the repository at this point in the history
graceful fallback of blocked javascript
  • Loading branch information
thejoshualewis authored Jun 27, 2019
2 parents b780801 + 9acda02 commit 881f884
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
* Plugin Name: BitPay QuickPay
* Description: Create BitPay payment buttons with a shortcode. <a href ="admin.php?page=bitpay-quickpay">Configure</a>
* Version: 1.0.1.4
* Version: 1.0.1.5
* Author: BitPay
* Author URI: mailto:[email protected]?subject=BitPay QuickPay
*/
Expand Down
8 changes: 1 addition & 7 deletions js/bitpayquickpay_js.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,13 @@ function showBpQp(env, api, btnId) {
alert(response.error)
return;
}
console.log('response',response.data)
bitpay.showInvoice(response.data.id)
monitorJs(response.data.url)





},
error: function (errorData){
// console.log('errorData',errorData)
}

});
Expand Down Expand Up @@ -102,14 +98,12 @@ function BPQPhideMessage() {
function monitorJs(url){
var iFrame = false
window.onmessage = function(event) {
console.log('event',event)
iFrame = true
}
setTimeout(function(){
if(!iFrame){
window.location.href = url
}
}, 1500);
}, 2500);


}
3 changes: 3 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ You can contact our support team via the following form https://bitpay.com/reque

== Changelog ==

= 1.0.1.5 =
* Added fallback support for blocked javascript

= 1.0.1.4 =
* cUrl updates

Expand Down

0 comments on commit 881f884

Please sign in to comment.