public function registerJqueryPaymentScripts() {
        $view = $this->getView();
        JqueryPaymentAsset::register($view);

        if ($this->applyJqueryPaymentFormat) {
            $js = "jQuery(function($) {
                $('input[data-stripe=" . self::NUMBER_ID . "]').payment('formatCardNumber');
                $('input[data-stripe=" . self::CVC_ID . "]').payment('formatCardCVC');
                $('input[data-stripe=" . self::MONTH_YEAR_ID . "]').payment('formatCardExpiry');
                $('input[data-stripe=" . self::MONTH_ID . "]').payment('restrictNumeric');
                $('input[data-stripe=" . self::YEAR_ID . "]').payment('restrictNumeric');
            });";
            $view->registerJs($js);
        }
        //Jquery client validation submit
        if ($this->applyJqueryPaymentValidation) {
            $js = 'jQuery(function($) {
                $.fn.toggleInputError = function(erred) {
                    this.closest(".form-group").toggleClass("' . $this->errorClass . '", erred);
                    return this;
                };

                $("#' . $this->options['id'] . ' :submit").on("click", function(e) {
                    var $form = $("#' . $this->options['id'] . '");
                    var $number = $("input[data-stripe=' . self::NUMBER_ID . ']");
                    var $cvc = $("input[data-stripe=' . self::CVC_ID . ']");
                    var $exp = $("input[data-stripe=' . self::MONTH_YEAR_ID . ']");
                    var $month = $("input[data-stripe=' . self::MONTH_ID . ']");
                    var $year = $("input[data-stripe=' . self::YEAR_ID . ']");

                    var cardType = $.payment.cardType($number.val());
                    (' . $this->brandIdentificationHandler .')(cardType);

                    var validCard = $.payment.validateCardNumber($number.val());
                    $number.toggleInputError(!validCard);
                    
                    var validCVC = $.payment.validateCardCVC($cvc.val(), cardType);
                    $cvc.toggleInputError(!validCVC);

                    if ($exp.length) {
                        var validExpiry = $.payment.validateCardExpiry($exp.payment("cardExpiryVal"));
                        $exp.toggleInputError(!validExpiry);
                        
                        var fullDate = $exp.val();
                        var res = fullDate.split(" / ", 2);
                        $month.val(res[0]);
                        $year.val(res[1]);
                    }else{
                        var validExpiry = $.payment.validateCardExpiry($month.val(), $year.val());
                        $month.toggleInputError(!validExpiry);
                        $year.toggleInputError(!validExpiry);
                    }

                    if(!validCard || !validCVC || !validExpiry){
                        e.preventDefault();
                        return false;
                    }else{
                        return true;
                    }
                });
            });';
            $view->registerJs($js);
        }
    }
public function registerJqueryPaymentScripts() {
        $view = $this->getView();
        JqueryPaymentAsset::register($view);

        if ($this->applyJqueryPaymentFormat) {
            $js = "jQuery(function($) {
                $('input[data-stripe=" . self::NUMBER_ID . "]').payment('formatCardNumber');
                $('input[data-stripe=" . self::CVC_ID . "]').payment('formatCardCVC');
                $('input[data-stripe=" . self::MONTH_YEAR_ID . "]').payment('formatCardExpiry');
                $('input[data-stripe=" . self::MONTH_ID . "]').payment('restrictNumeric');
                $('input[data-stripe=" . self::YEAR_ID . "]').payment('restrictNumeric');
            });";
            $view->registerJs($js);
        }
        //Jquery client validation submit
        if ($this->applyJqueryPaymentValidation) {
            $js = 'jQuery(function($) {
                $.fn.toggleInputError = function(erred) {
                    this.closest(".form-group").toggleClass("' . $this->errorClass . '", erred);
                    return this;
                };

                $("#' . $this->options['id'] . ' :submit").on("click", function(e) {
                    var $form = $("#' . $this->options['id'] . '");
                    var $number = $("input[data-stripe=' . self::NUMBER_ID . ']");
                    var $cvc = $("input[data-stripe=' . self::CVC_ID . ']");
                    var $exp = $("input[data-stripe=' . self::MONTH_YEAR_ID . ']");
                    var $month = $("input[data-stripe=' . self::MONTH_ID . ']");
                    var $year = $("input[data-stripe=' . self::YEAR_ID . ']");

                    var cardType = $.payment.cardType($number.val());
                    (' . $this->brandIdentificationHandler .')(cardType);

                    var validCard = $.payment.validateCardNumber($number.val());
                    $number.toggleInputError(!validCard);
                    
                    var validCVC = $.payment.validateCardCVC($cvc.val(), cardType);
                    $cvc.toggleInputError(!validCVC);

                    if ($exp.length) {
                        var validExpiry = $.payment.validateCardExpiry($exp.payment("cardExpiryVal"));
                        $exp.toggleInputError(!validExpiry);
                        
                        var fullDate = $exp.val();
                        var res = fullDate.split(" / ", 2);
                        $month.val(res[0]);
                        $year.val(res[1]);
                    }else{
                        var validExpiry = $.payment.validateCardExpiry($month.val(), $year.val());
                        $month.toggleInputError(!validExpiry);
                        $year.toggleInputError(!validExpiry);
                    }

                    if(!validCard || !validCVC || !validExpiry){
                        e.preventDefault();
                        return false;
                    }else{
                        return true;
                    }
                });
            });';
            $view->registerJs($js);
        }
    }
public function registerJqueryPaymentScripts ( ) { $ view = $ this -> getView ( ) ; JqueryPaymentAsset :: register ( $ view ) ; if ( $ this -> applyJqueryPaymentFormat ) { $ js = "jQuery(function($) {
                $('input[data-stripe=" . self :: NUMBER_ID . "]').payment('formatCardNumber');
                $('input[data-stripe=" . self :: CVC_ID . "]').payment('formatCardCVC');
                $('input[data-stripe=" . self :: MONTH_YEAR_ID . "]').payment('formatCardExpiry');
                $('input[data-stripe=" . self :: MONTH_ID . "]').payment('restrictNumeric');
                $('input[data-stripe=" . self :: YEAR_ID . "]').payment('restrictNumeric');
            });" ; $ view -> registerJs ( $ js ) ; } //Jquery client validation submit if ( $ this -> applyJqueryPaymentValidation ) { $ js = 'jQuery(function($) {
                $.fn.toggleInputError = function(erred) {
                    this.closest(".form-group").toggleClass("' . $ this -> errorClass . '", erred);
                    return this;
                };

                $("#' . $ this -> options [ 'id' ] . ' :submit").on("click", function(e) {
                    var $form = $("#' . $ this -> options [ 'id' ] . '");
                    var $number = $("input[data-stripe=' . self :: NUMBER_ID . ']");
                    var $cvc = $("input[data-stripe=' . self :: CVC_ID . ']");
                    var $exp = $("input[data-stripe=' . self :: MONTH_YEAR_ID . ']");
                    var $month = $("input[data-stripe=' . self :: MONTH_ID . ']");
                    var $year = $("input[data-stripe=' . self :: YEAR_ID . ']");

                    var cardType = $.payment.cardType($number.val());
                    (' . $ this -> brandIdentificationHandler . ')(cardType);

                    var validCard = $.payment.validateCardNumber($number.val());
                    $number.toggleInputError(!validCard);
                    
                    var validCVC = $.payment.validateCardCVC($cvc.val(), cardType);
                    $cvc.toggleInputError(!validCVC);

                    if ($exp.length) {
                        var validExpiry = $.payment.validateCardExpiry($exp.payment("cardExpiryVal"));
                        $exp.toggleInputError(!validExpiry);
                        
                        var fullDate = $exp.val();
                        var res = fullDate.split(" / ", 2);
                        $month.val(res[0]);
                        $year.val(res[1]);
                    }else{
                        var validExpiry = $.payment.validateCardExpiry($month.val(), $year.val());
                        $month.toggleInputError(!validExpiry);
                        $year.toggleInputError(!validExpiry);
                    }

                    if(!validCard || !validCVC || !validExpiry){
                        e.preventDefault();
                        return false;
                    }else{
                        return true;
                    }
                });
            });' ; $ view -> registerJs ( $ js ) ; } }
Will register Jquery Payment scripts
Will register Jquery Payment scripts