Paypal express checkout
- Marquer comme nouveau
- Ajouter en favori
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Bonjour,
Je développe une boutique en ligne pour une amie et je ne parviens pas à faire fonctionner Express Checkout en mode production.
le code ci-dessous fonctionne parfaitement en sandbox, mais n'affiche pas la fenêtre paypal en production en mettant en production l'email du compte ou l'identifiant du compte marchand. Où puis-je trouver le "production client id" qui fonctionne ?
Cordialement
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://www.paypalobjects.com/api/checkout.js"></script>
</head>
<body>
<div id="paypal-button-container"></div>
<script>
paypal.Button.render({
env: 'production', // sandbox | production
// PayPal Client IDs - replace with your own
// Create a PayPal app: https://developer.paypal.com/developer/applications/create
client: {
sandbox: 'AZDxjDScFpQtjWTOUtWKbyN_bDt4OgqaF4eYXlewfBP4-8aqX3PiV8e1GWU6liB2CUXlkA59kJXE7M6R',
production: 'mpmarotte37.gmail.com'
},
// Show the buyer a 'Pay Now' button in the checkout flow
commit: true,
// payment() is called when the button is clicked
payment: function(data, actions) {
// Make a call to the REST api to create the payment
return actions.payment.create({
payment: {
transactions: [
{
amount: { total: '0.01', currency: 'USD' }
}
]
}
});
},
// onAuthorize() is called when the buyer approves the payment
onAuthorize: function(data, actions) {
// Make a call to the REST api to execute the payment
return actions.payment.execute().then(function() {
window.alert('Payment Complete!');
});
}
}, '#paypal-button-container');
</script>
</body>
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Prb avec l'intégration bouton dans Intégrer PayPal
- Authentification sandbox Paypal dans Intégrer PayPal
- Holding money avec paypal dans Intégrer PayPal
- Paiement en attente (produits numériques) dans Intégrer PayPal
- Erreur "La page de cette organisation en fonctionne pas" due à Paypal checkout dans Intégrer PayPal