Paypal bouton

Par Motel, il y a 7 ans


Bonjour,

j'ai un petit souci avec le bouton de paypal par default je cherche à le masquer pour afficher mon propre bouton :/

Voici mon code .js

$(document).ready(function(){ $.getScript("https://www.paypalobjects.com/api/checkout.js", function(){ paypal.Button.render({ env: 'sandbox', // Or 'sandbox', commit: true, // Show a 'Pay Now' button style: { color: 'gold', size: 'small' }, payment: function(data, actions) { var create_payment = 'config/app/API/paypal/payment.php'; return paypal.request.post(create_payment).then(function(data) { return data.id; }); }, onAuthorize: function(data, actions) { var execute_payment = 'config/app/API/paypal/pay.php'; return paypal.request.post(execute_payment, { paymentID: data.paymentID, payerID: data.payerID }).then(function(data) { // }); }); }, onCancel: function(data, actions) { /* * Buyer cancelled the payment */ }, onError: function(err) { alert('error', err); console.log(err); } }, '#btn-checkout'); }); });

code html

<div class="btn-paypal" id='btn-checkout'>Payer avec paypal</div>

le problème c'est que j'ai toujours le bouton jaune de paypal qui apparaît en bas de mon bouton je n'arrive pas à le masque.

1 réponse

jean-smaug, il y a 7 ans

Pourquoi ne pas le masquer en CSS ?
Avec un display none :)