0

I am running an audio processing service in which users upload their raw audio tracks and then purchase them after completion. After purchase, I would like an email to be sent to them a unique Dropbox link to download the respective files.

Given that each transaction on my website will contain different pricing information and will require a unique link, I do not know what to do.

Currently, I allow the users to select (via checkboxes) the files they would like to purchase. I then use some server-side logic to calculate the appropriate price, and then run it through a PayPal Express Checkout button.

payment: function(data, actions) {
            return actions.payment.create({
            payment: {
                transactions: [{
                    amount: { total: "<?php echo $totalPrice ?>", currency: 'USD' }
                }]
            }
            });
        },

The problem is that I have no way to manually send them their unique download links after purchase. Is this possible with PayPal IPN? Thank you

otonomi
  • 3
  • 1

1 Answers1

0

You should create a local order record in your database that contains the details about what they bought and any unique data for that order. Then you can pass that order ID in your payment request to PayPal, and it would come back in the IPN data. You could pull your unique data back out of your system using the order ID so that you can then include it in your custom emails.

Drew Angell
  • 25,968
  • 5
  • 32
  • 51
  • I'm not sure what you mean by "it would come back in the IPN data." Could you please expand upon your answer? I am very confused. – otonomi Dec 22 '17 at 21:37
  • If you include the "invoice" parameter in your payment request to PayPal then that same value you passed would be included in the "invoice" parameter within your IPN data. – Drew Angell Dec 23 '17 at 00:57