Payment Form: Cookbook

Detect Unsupported Browsers

Use the isSupportedBrowser() function to detect unsupported browsers before instantiating the `SqPaymentForm` library.

Payment Form

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
}

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