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

              
                <!DOCTYPE html>
<html>
<head>
    <style>
      .hidden{
        display:none;
      }
      #pay-component-1{
        max-width: 510px;
      }
      iframe{
        border: solid 1px transparent;
      }

      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%;
        max-width: 510px;
      }
    </style>
</head>
<body>
  <p>When the form is valid, the action button will be shown.</p>
    <div id="pay-component-1"></div>
    <button id="btnx" class="hidden" onclick="executeAction()">Submit</button>
    <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 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=";
    var entryPoint = "bozeman-aikido";
    var payabliConfig0 = {
        type: "methodEmbedded",
        rootContainer: "pay-component-1",
        defaultOpen: 'card',  //offering only Card method - Embedded UI can only show a payment method  
        //customCssUrl: "your url to a custom css file",  
        token: token,
     
        showPopoverError : false,
        entryPoint: entryPoint,
        clearFormAfterSubmit: false,
        card: {
            enabled: true,
            amex: true,
            discover: true,
            visa: true,
            mastercard: true,
            inputs: { 
                //here we are customizing the input fields
                cardHolderName: {
                  label: "NAME ON CARD",
                  placeholder: "",
                  floating: true,
                  value: "John Doe",
                  size: 8,
                  row: 1,
                  order: 0
                },
                cardNumber: {
                  label: "CARD NUMBER",
                  placeholder: "1234 1234 1234 1234",
                  floating: true,
                  size: 6,
                  row: 0,
                  order: 0
                },
                cardExpirationDate: {
                  label: "EXP. DATE",
                  placeholder: "MM/YY",
                  floating: true,
                  size: 3,
                  row: 0,
                  order: 1
                },
                cardCvv: {
                  label: "CVV/CVC",
                  placeholder: "CVV/CVC",
                  floating: true,
                  size: 3,
                  row: 0,
                  order: 2
                }, //Fields can be removed from the UI by removing these input elements from this file altogether or commenting them out.
                cardZipcode: {
                  label: "ZIP Code",
				  placeholder: "ZIP",
				  floating: true,
				  row: 1,
				  order: 1,
				  size: 4
                }
            }
            
        },
        ach: {
            enabled: false,
            checking: true,
            savings: true
        },
        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/>");
        },
        //Callback function to capture the ready state of the component.
        //The callback receives an array of booleans with 2 positions: index 0 is for ach, index 1 is for card.
        //In our example we are offering card payment method so we need to verify the position 1 in array "data".
        //When the captured value is "true" we are showing the button to execute the action, when it is "false" we hide it.
        functionCallBackReady: function (data) {
            var btn = document.getElementById("btnx");
            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 paycomponent0 = new PayabliComponent(payabliConfig0);
    function executeAction()
    {
        paycomponent0.payabliExec('method');
    }
    </script>
</body>
</html>
              
            
!

CSS

              
                
              
            
!

JS

              
                
              
            
!
999px

Console