Showing results for 
Search instead for 
Did you mean: 

PayPal Payments, Checkout, but I don't receive the correct data in the answer.

Posted on

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



  <div id="paypal-button-container"></div>
  <div id="paypal-button"></div>
  <script src=""></script>

      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');





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

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.