 document.getElementById('checkout-button');
    var introPanel = document.getElementById('intro');
    var successPanel = document.getElementById('success');
    var legacyPanel = document.getElementById('legacy');

    // Feature detection
    if (window.PaymentRequest) {

      // Payment Request is supported in this browser, so we can proceed to use it

      var shouldCallPaymentRequest = true;

      // Make a dummy payment request to check if user can make payment
      new PaymentRequest(buildSuppor