I am currently integrating Stripe into a website and am encountering a problem with custom integration check.
I followed custom integration instructions on the Stripe website and it works great on the desktop, but unfortunately does nothing on the mobile device.
I have a jQuery handler that starts when my user button is clicked and it starts handler.open({…}) according to the docs, but the following JavaScript error is logged:
TypeError: 'undefined' is not an object (evaluating '(s=this.frame).focus') - checkout.js:2:21656
Any ideas?
Edit: After playing it multiple times, I found that it does not start in iOS 7 if the delay exceeds 1 second for a call.
For example, the following works:
setTimeout(function(){stripe_payment();}, 1000);
And the following:
setTimeout(function(){stripe_payment();}, 2000);
In the above examples, stripe_payment() sets and calls the handler. As mentioned earlier, the same effect can be caused when the handler is called after the AJAX call (which presumably takes too much time). It's also worth noting that even a 5 second delay on desktop browsers works great.
source share