Search code examples
phppaypalpaypal-sandbox

PayPal sandbox email notifications


I'm testing PayPal as a payment method for my website in sandbox mode. My requirement is, an email must be send to the merchant after each transaction. I am using the PHP SDK. How is this possible?

This is the configuration that I have seen for notifications in paypal.

enter image description here


Solution

  • PayPal already sends its own emails to the merchants after each transaction completes. In sandbox, you can see the notification methods in the "Notifications" tab of https://developer.paypal.com

    If you want to generate your own emails in addition to the PayPal emails, you should use a server-side integration. Here is the front-end UI: https://developer.paypal.com/demo/checkout/#/pattern/server

    You'll need two corresponding routes on your server, one for 'Set Up Transaction' and one for 'Capture Transaction', documented here: https://developer.paypal.com/docs/checkout/reference/server-integration/

    That last route of yours can send your email on success.