Skip to content

Commit a7f6d43

Browse files
authored
add delay to allow verification
1 parent c466c12 commit a7f6d43

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/resources/views/scripts.blade.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,11 @@ function processBrainBlocks() {
3838
size: brainBlocksButtonSize
3939
},
4040
onPayment: function (data) {
41-
document.getElementById(brainBlocksButtonId+"-token").value = data.token;
42-
document.getElementById(brainBlocksButtonId+"-form").submit();
41+
//throw a short delay before verifying to make sure payment is fulfilled
42+
setTimeout(function(){
43+
document.getElementById(brainBlocksButtonId+"-token").value = data.token;
44+
document.getElementById(brainBlocksButtonId+"-form").submit();
45+
}, 5000);
4346
}
4447
}, '#'+brainBlocksButtonId+'-button');
4548
}

0 commit comments

Comments
 (0)