403Webshell
Server IP : 66.29.132.124  /  Your IP : 18.119.166.34
Web Server : LiteSpeed
System : Linux business141.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : wavevlvu ( 1524)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /proc/thread-self/root/proc/thread-self/cwd/module/booking/gateways/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/thread-self/root/proc/thread-self/cwd/module/booking/gateways/stripe.js
jQuery(document).ready(function ($) {
    'use strict';
    var stripePublishKey = bookingCore_gateways_stripe.stripe_publishable_key;
    if (bookingCore_gateways_stripe.stripe_enable_sandbox === "1") {
        stripePublishKey = bookingCore_gateways_stripe.stripe_test_publishable_key;
    }
    if (stripePublishKey === '') {
        return false;
    }

    var stripe = Stripe(stripePublishKey);
    var elements = stripe.elements();
    var elementStyles = {
        base: {
            fontWeight: 500,
            fontSize: '14px',
        },
    };
    var elementClasses = {
        focus: 'is-focused',
        empty: 'is-empty',
        invalid: 'invalid',
    };

    var cardNumber = elements.create('cardNumber', {
        style: elementStyles,
        classes: elementClasses,
    });
    cardNumber.mount('#bravo_card_number');

    var cardExpiry = elements.create('cardExpiry', {
        style: elementStyles,
        classes: elementClasses,
    });
    cardExpiry.mount('#bravo_stripe_card_expiry');

    var cardCvc = elements.create('cardCvc', {
        style: elementStyles,
        classes: elementClasses,
    });
    cardCvc.mount('#bravo_stripe_card_cvc');

    cardNumber.on('change', function (event) {
        tokenRequest();
    });
    cardExpiry.on('change', function (event) {
        tokenRequest();
    });
    cardCvc.on('change', function (event) {
        tokenRequest();
    });

    var tokenRequest = function () {
        var name = $('#bravo_card_name').val();
        var address1 = $('#form-checkout input[name="address_line_1"]').val();
        var city = $('#form-checkout input[name="city"]').val();
        var state = $('#form-checkout input[name="state"]').val();
        var zip = $('#form-checkout input[name="zip_code"]').val();
        var extraDetails = {
            name: name ? name : undefined,
            address_line1: address1 ? address1 : undefined,
            address_city: city ? city : undefined,
            address_state: state ? state : undefined,
            address_zip: zip ? zip : undefined,
            account_holder_name: name ? name : undefined,
            account_holder_type: 'individual',
        };
        stripe.createToken(cardNumber, extraDetails).then(function (result) {
            if (result.token) {
                $("#bravo_stripe_token").val(result.token.id);
            }
        });
    };
});

Youez - 2016 - github.com/yon3zu
LinuXploit