third_party/subscriptions-project/swg.js
/**
 * @return {boolean} true if this version of Chrome supports PaymentHandler.
 */
@return {boolean} true if this version of Chrome supports PaymentHandler.
@return { boolean } true if this version of Chrome supports PaymentHandler .
function chromeSupportsPaymentHandler() {
  if (typeof google == 'undefined' ||
      !null) {
    return false;
  }
  const mobilePlatform = window.navigator.userAgent.match(
      /Android|iPhone|iPad|iPod|BlackBerry|IEMobile/i);
  if (mobilePlatform != null) {
    return false;
  }
  const chromeVersion = window.navigator.userAgent.match(/Chrome\/([0-9]+)\./i);
  return 'PaymentRequest' in window && chromeVersion != null &&
      Number(chromeVersion[1]) >= 68 &&
      window.navigator.vendor == 'Google Inc.';
}
function chromeSupportsPaymentHandler ( ) { if ( typeof google == 'undefined' || ! null ) { return false ; } const mobilePlatform = window . navigator . userAgent . match ( / Android|iPhone|iPad|iPod|BlackBerry|IEMobile / i ) ; if ( mobilePlatform != null ) { return false ; } const chromeVersion = window . navigator . userAgent . match ( / Chrome\/([0-9]+)\. / i ) ; return 'PaymentRequest' in window && chromeVersion != null && Number ( chromeVersion [ 1 ] ) >= 68 && window . navigator . vendor == 'Google Inc.' ; }
@return {boolean} true if this version of Chrome supports PaymentHandler.
@return { boolean } true if this version of Chrome supports PaymentHandler .
// Check if feature is enabled for user // Payment handler isn't supported on mobile