B
B
BonBon Slick2017-07-02 12:30:11
css
BonBon Slick, 2017-07-02 12:30:11

Remove text in Express Checkout button PayPal?

// css
  #gateway-logos {
                        display:none !important;
                    }
                    #gateway-logos img {
                        display:none;
                    }
                   body #paypal-button-container #paypal-button .paypal-button-content .text{
                        display: none!important;
                    }

//js
(function(fn){var d=document;(d.readyState=='loading')?d.addEventListener('DOMContentLoaded',fn):fn();})(function(){

                document.getElementsByClassName("text").style.visibility = "hidden";

                var hideBtn = document.getElementsByClassName('text'), i;
                for (var i = 0; i < hideBtn.length; i ++) {
                    hideBtn[i].style.display = 'none';
                }

            });

//button configs
  style: {
                    label: 'pay', // если оставить пустым, ставит текст "Оформить покупку сейчас!", что выглядит...
                    size: 'responsive',  
                    shape: 'rect',  
                    color: 'gold', 
                    fundingicons: false, 
                    branding: true 
                },
// еще вариант после конфигов
(function(){
 document.body.querySelector('.text').style.display = 'none';
                $('.text').css('display', 'none')
            })();

Any text other than pay/checkout/credit gives an error in the console. Tried  , regular space. I also wanted to hide the button, and make my own, where there ....
Uncaught Error: Invalid button label: &nbsp
$(document).on('click', '.container', $('#paypal-button').click());

Will return an error:
Uncaught TypeError: ((jQuery.event.special[handleObj.origType] || (intermediate value)).handle || 
handleObj.handler).apply is not a function


Nothing helps to remove the extra text, there is nothing for it, the user is already on the payment page and he only needs to choose how. I think the text "pay through" on the button is superfluous.

Docks:
https://developer.paypal.com/docs/integration/dire ...
Live example:
https://developer.paypal.com/demo/checkout/#/patte ...

Doesn't anyone have any ideas?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question