Skip to main content

Documentation Index

Fetch the complete documentation index at: https://bancofcalifornia-preview.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

HTML
<html>
    <head>
        <script src="https://gateway.bancedge.com/token/Collect.js" data-tokenization-key="your-token-key-here"></script>
        <script>
            document.addEventListener('DOMContentLoaded', function () {
                CollectJS.configure({
                    'paymentSelector' : '#customPayButton',
                    'theme': 'bootstrap',
                    'primaryColor': '#ff288d',
                    'secondaryColor': '#ffe200',
                    'buttonText': 'SUBMIT ME!',
                    'paymentType': 'cc',
                    'fields': {
                        'cvv': {
                            'display': 'hide'
                        },
                        'googlePay': {
                            'selector': '.googlePayButton',
                            'shippingAddressRequired': true,
                            'shippingAddressParameters': {
                                'phoneNumberRequired': true,
                                'allowedCountryCodes': ['US', 'CA']
                            },
                            'billingAddressRequired': true,
                            'billingAddressParameters': {
                                'phoneNumberRequired': true,
                                'format': 'MIN'
                            },
                            'emailRequired': true,
                            'buttonType': 'buy',
                            'buttonColor': 'white',
                            'buttonLocale': 'en'
                        },
                        'applePay' : {
                            'selector' : '.applePayButton',
                            'shippingMethods': [
                                {
                                    'label': 'Free Standard Shipping',
                                    'amount': '0.00',
                                    'detail': 'Arrives in 5-7 days',
                                    'identifier': 'standardShipping'
                                },
                                {
                                    'label': 'Express Shipping',
                                    'amount': '10.00',
                                    'detail': 'Arrives in 2-3 days',
                                    'identifier': 'expressShipping'
                                }
                            ],
                            'shippingType': 'delivery',
                            'requiredBillingContactFields': [
                                'postalAddress',
                                'name'
                            ],
                            'requiredShippingContactFields': [
                                'postalAddress',
                                'name'
                            ],
                            'contactFields': [
                                'phone',
                                'email'
                            ],
                            'contactFieldsMappedTo': 'shipping',
                            'lineItems': [
                                {
                                    'label': 'Foobar',
                                    'amount': '3.00'
                                },
                                {
                                    'label': 'Arbitrary Line Item #2',
                                    'amount': '1.00'
                                }
                            ],
                            'totalLabel': 'foobar',
                            'type': 'buy',
                            'style': {
                                'button-style': 'white-outline',
                                'height': '50px',
                                'border-radius': '0'
                            }
                        }
                    },
                    "price": "1.00",
                    "currency":"USD",
                    "country": "US",
                    'callback' : function(response) {
                        alert(response.token);
                        var input = document.createElement("input");
                        input.type = "hidden";
                        input.name = "payment_token";
                        input.value = response.token;
                        var form = document.getElementsByTagName("form")[0];
                        form.appendChild(input);
                        form.submit();
                    }
                });
            });
        </script>
    </head>
    <body>
        <h1>CollectJS Payment Form</h1>
        <form action="/your-page.php" method="post">
            <table>
                <tr>
                    <td>First Name</td>
                    <td><input size="30" type="text" name="fname" value="Test" /></td>
                </tr>
                <tr>
                    <td>Last Name</td>
                    <td><input size="30" type="text" name="lname" value="User" /></td>
                </tr>
                <tr>
                    <td>Address</td>
                    <td><input size="30" type="text" name="address" value="123 Main Street"></td>
                </tr>
                <tr>
                    <td>City</td>
                    <td><input size="30" type="text" name="city" value="Beverley Hills"></td>
                </tr>
                <tr>
                    <td>State</td>
                    <td><input size="30" type="text" name="state" value="CA"></td>
                </tr>
                <tr>
                    <td>Zip</td>
                    <td><input size="30" type="text" name="zip" value="90210"></td>
                </tr>
                <tr>
                    <td>Country</td>
                    <td><input size="30" type="text" name="country" value="US"></td>
                </tr>
                <tr>
                    <td>Phone</td>
                    <td><input size="30" type="text" name="phone" value="5555555555"></td>
                </tr>
                <tr>
                    <td></td>
                    <td>
                        <div class="googlePayButton">
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td>
                        <div class="applePayButton">
                    </td>
                </tr>

            </table>
            <br>
                    To show the ability to trigger the form without a click, it will appear automatically after 5 seconds and disappear after another 5.
            <script>
                setTimeout("CollectJS.startPaymentRequest()", 5000);
                setTimeout("CollectJS.closePaymentRequest()", 10000);
            </script>
        </form>
    </body>
</html>