PayPal Payments, Checkout, but I don't receive the correct data in the answer.
ladysilvia
Contributor
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on
Sep-14-2021
06:57 PM
Paypal payments, checkouts, paypalcheckout. I must be able to receive data on success.php delete.php
Help me: I need to know when the product has been paid and then insert it in the MySQL or JSON dB
paypalCheckout.php
<div id="paypal-button-container"></div>
<div id="paypal-button"></div>
<script src="https://www.paypalobjects.com/api/checkout.js"></script>
<script>
paypal.Button.render({
env: '<?php echo PayPalENV; ?>', client: {
<?php if(ProPayPal) { ?>
production: '<?php echo PayPalClientId; ?>'
<?php } else { ?>
sandbox: '<?php echo PayPalClientId; ?>'
<?php } ?>
},
// Customize button";
style: {
size: 'large',
shape: 'pill',
color: 'white',
layout: 'horizontal',
label: 'pay',
},
payment: function (data, actions) {
return actions.payment.create({
transactions: [{
amount: {
total: '<?php echo $productPrice; ?>',
currency: '<?php echo $currency; ?>'
}
}]
});
},
onAuthorize: function (data, actions) {
return actions.payment.execute()
.then(function () {
window.location = "<?php echo PayPalBaseUrl ?>orderDetails.php?paymentID="+data.paymentID+"&payerID="+data.payerID+"&token="+data.paymentToken+"&pid=<?php echo $productId; ?>";
});
}
}, '#paypal-button');
</script>
I have to create success.php or cancel.php but I don't get data from paypal, who helps me with a functioning example?
Thank you
Lady
Labels:
Login to Me Too
- Labels:
-
Carts
-
PayPal HTML Buttons
0 REPLIES 0
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
Related Content
- Need help to integrate PayPal Standard Checkout with Shopify in PayPal Payments Standard
- When clicking on a payment button generates error: Unexpected token ... in PayPal Payments Standard
- How to redirect user to paypal checkout form for card payment? in PayPal Payments Standard
- Adaptive Payments stopped working in early Feb 2024 in NVP/SOAP APIs
- Im am a developer and i am having issues getting google pay to work on my account. in Sandbox Environment