Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <html>

<head>
</head>

<body>
  <div>
    <div id="embeddedComponentStyle">
      <h4>Add Payment Method</h4>
      <div class="tabs">
        <a class="active">Payment Card</a>
        <a>Bank Debit</a>
      </div>
      <div class="payment-form">
        <div id="pay-component"></div>
      </div>
      <div class="mt-20 text-center payment-info">
        <label class="text-blue">$1085.00 will be charged now</label>
      </div>
      <div class="text-center mt-20">
        <button onclick="btnPayx()" class="hidden btn" id="btnxx">
          <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAPxJREFUSEvtldGNwjAMhr9/AnQTAJNwbMAG9CZATAC3ARvABjACN8mVDW4DI6Mg9VqStEWVeMAvjSrb3x8ndsTApoHz0wpgZgtgBXwGQWfgW5J/k5YFmNkBWEayOGSbIiQBQfkxJFgDp7AugE1Yz1M7yQG8BDNgLWlXVWpmrtwhP5LupWtsJgewEPEh6a8GmAC//k9SNE8rQCyBmd0EDAbI3aAbPOXURmEO0gCYmR/YHvAad7ES+KrfqEcAdxx3yVzxLSVNq7GPAPeb04tRP/A3oNm5taZ7l+g1S+RTc9SrCeAi6d8EiI0Kf8W6dvMFKLKjoqfyaFj2TX4WeAX0MmsZ8nx06AAAAABJRU5ErkJggg==" />
          Save Payment Card
        </button>
      </div>

    </div>

  </div>
  <script src="https://embedded-component-sandbox.payabli.com/component.js"></script>
<script src="https://code.jquery.com/jquery-1.9.1.min.js"></script>
  <script>
    var payabliConfig = {
      type: "methodEmbedded",
      rootContainer: "pay-component",
      entryPoint: "bozeman-aikido",
      defaultOpen: 'card',
      token: "o.z8j8aaztW9tUtUg4dlVeYAx+L2MazOFGr0DY8yuK3u79MCYlGK4/q0t5AD1UgLAjXOohnxN8VTZfPswyZcwtChGNn1a8jFMmYWHmLN2cPDW9IrBt1RtrSuu+85HJI+4kML5sIk9SYvULDAU2k0X0E1KFYcPwjmmkUjktrEGtz48XCUM70aKUupkrTh8nL7CXpAXATzVUZ2gEld9jGINwECPPLWmu+cZ4CJb7QMJxnzKFD073+nq/eL+pMth7+u/SkmAWC0+jn8y+Lf6T5Q5PqB6wN7Mvosp8g7U7lbEW2wC0DA92pjblfDHVJOQUkjgT7B1GvryMokLvBjoiaLhKa55iKZE1YDlyqruILkoNF+zGSPS9r17qU6w4ziKhoMdSPzPBJBlLhQhz3MVANXbjfEfJwmtr/JJ1uStUfBFJ710cS1x7goxMJO/cl+q+LVtPy788EKFkgMc5OjfBNCsNL+dBDVbK5CiIJUSbOFzdqdjY/VJ14MEodsHYOwMAjuF4.KRFMeEj0SOur8MLZ362c/UZ/U/Az3CSUkr3/8EVDE6Y=",
      customCssUrl: "https://embedded-component-sandbox.payabli.com/customForm.css",
      card: {
        enabled: true,
        amex: true,
        discover: true,
        visa: true,
        mastercard: true,
        inputs: {
          cardHolderName: {
            label: "NAME ON CARD",
            placeholder: "",
            floating: false,
            size: 12,
            row: 0,
            order: 0
          },
          cardNumber: {
            label: "CARD NUMBER",
            placeholder: "1234 1234 1234 1234",
            floating: false,
            size: 6,
            row: 1,
            order: 0
          },
          cardExpirationDate: {
            label: "EXPIRATION DATE",
            placeholder: "MM/YY",
            floating: false,
            size: 6,
            row: 1,
            order: 1
          },
          cardCvv: {
            label: "CVV/CVC",
            placeholder: "CVV/CVC",
            floating: false,
            size: 6,
            row: 2,
            order: 0
          },
          cardZipcode: {
            label: "ZIP/POSTAL CODE",
            placeholder: "ZIP/POSTAL CODE",
            floating: false,
            size: 6,
            row: 2,
            order: 1
          }
        }
      },
      ach: {
        enabled: true,
        checking: true,
        savings: false,
        inputs: {
          achAccountHolderName: {
            label: "Holder Name",
            size: 2,
            row: 0,
            order: 0
          },
          achAccountType: {
            label: "Type",
            size: 1,
            row: 0,
            order: 2
          },
          achRouting: {
            label: "ABA",
            size: 1,
            row: 0,
            order: 0
          },
          achAccount: {
            label: "Bank Account",
            size: 2,
            row: 0,
            order: 0
          }
        }
      },
      customerData: {
        customerNumber: "00001",
        firstName: "John",
        lastName: "Doe",
        billingEmail: "johndoe@email.com"
      },
      functionCallBackSuccess: function(response) {
        alert(response.responseText);
        		   $('#pay-component-1').append("<hr/>");
           $('#pay-component-1').append("<p><b>Embedded Component Response:</b></p>");
		   $('#pay-component-1').append("<p>"+JSON.stringify(response.responseText)+"</p>");
		   $('#pay-component-1').append("<p>"+JSON.stringify(response.responseData)+"</p>");
		   $('#pay-component-1').append("<hr/>");
      },
      functionCallBackReady: function(data) {
        var btn = document.getElementById("btnxx");
        if (data[1] === true) {
          btn.classList.remove("hidden");
        } else {
          if (!btn.classList.contains("hidden")) btn.classList.add("hidden");
        }
      },
      functionCallBackError: function(errors) {
        alert('Error!');
        console.log(errors);
      }
    }
    var paycomponent = new PayabliComponent(payabliConfig);

    function btnPayx() {
      alert("to call payabliExec method");
    }
  </script>
</body>

</html>
              
            
!

CSS

              
                body{
  font-family: Arial, Helvetica, sans-serif;
}

#payabliComponentsIframeContainerMethodEmbeded iframe {
  border: solid 1px rgba(255, 255, 255, 0);
  width: 90%;
}

#embeddedComponentStyle label {
  font-size: 13px;
  display: inline-block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #707070;
  text-transform: uppercase;
}

#embeddedComponentStyle button {
  background-image: -webkit-linear-gradient(0deg, #7121ff 0%, #21d4fd 100%);
  background-image: -moz-linear-gradient(0deg, #7121ff 0%, #21d4fd 100%);
  background-image: -ms-linear-gradient(0deg, #7121ff 0%, #21d4fd 100%);
  border: none;
  padding: 10px 20px;
  color: #ffffff;
  font-size: 13px;
  cursor: pointer;
  text-transform: uppercase;
  font-weight: bold;
  font-size: 12px;
  padding: 15px 30px;
  border-radius: 5px;
  width: 100%;
}

#embeddedComponentStyle {
  display: block;
  width: 500px;
  margin: 50px auto;
  border: solid 2px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 25px 25px;
  background-color: rgb(255, 255, 255);
}

#embeddedComponentStyle .payment-form {
  background-color: #f0f0f0;
  padding: 20px 25px;
  margin: 0 -25px;
}

#embeddedComponentStyle .text-center {
  text-align: center;
}

#embeddedComponentStyle h4 {
  color: #707070;
  font-size: 16px;
  margin-top: 0px;
}

#embeddedComponentStyle .mt-20 {
  margin-top: 20px;
}

#embeddedComponentStyle .text-blue {
  color: #008bce;
}

#embeddedComponentStyle button img {
  vertical-align: middle;
  width: 17px;
  height: 17px;
  opacity: 1;
  margin-right: 8px;
}

#embeddedComponentStyle .tabs {
  margin: 0 -25px;
}

#embeddedComponentStyle .tabs a {
  color: #707070;
  text-decoration: none;
  padding: 0 20px 14px 20px;
  font-size: 12px;
  display: inline-block;
  border-bottom: solid 3px transparent;
  width: 42%;
  text-align: center;
  cursor: pointer;
}

#embeddedComponentStyle .tabs a.active {
  color: #008bce;
  border-bottom: solid 3px #008bce;
}

#embeddedComponentStyle .input-checkbox {
  vertical-align: middle;
  width: 22px;
  height: 22px;
  color: rgb(12, 96, 188);
}

#embeddedComponentStyle .payment-info {
  border-bottom: solid 1px rgb(230, 230, 230);
  padding: 14px 0 10px 0;
  margin: 0 -25px;
}

iframe {
  border: solid 1px transparent;
}

              
            
!

JS

              
                
              
            
!
999px

Console