Examples

Detect Unsupported Browsers with isSupportedBrowser()

Detect an unsupported browser before instantiating the `SqPaymentForm` library.

Unsupported browsers may be detected before instantiating SqPaymentForm with the SqPaymentForm.isSupportedBrowser(). Single-page web application integrations should use this recipe when SqPaymentForm is initialized after the page DOM is loaded.

Before you start

Detect Unsupported Browsers early

Unsupported browsers may be detected before instantiating SqPaymentForm with the SqPaymentForm.isSupportedBrowser() method:

if (SqPaymentForm.isSupportedBrowser()) {
  var paymentForm = new SqPaymentForm({ ... });
} else {
  // browser not supported
}
Next
API Development 101 >

Contact Developer Support, join our Slack channel, or ask for help on Stack Overflow