PayPal – Payment Data Transfer Sample Code

Update @ 2016-01-25: The following sample code may be outdated. please try the new sample code from paypal as stated in this comment.

PayPal Payment Data Transfer (PDT) provides a simple way for gathering the PayPal transaction details after the payment. You can even make use of it to trigger any post-transaction action. This article guide you how to test your PDT flow in PayPal Sandbox
Continue reading PayPal – Payment Data Transfer Sample Code

PHP – Send Attachment with PHP mail()

Update @ 2014-03-10: If the following piece of code doesn’t work, you could try the comment written by karmaprod.

Update @ 2014-01-17: You may need to change the PHP_EOL setting in Windows environment as suggested by Rene.

Update @ 2015-02-13: Replace all “/r/n” to PHP_EOL as suggested by Rene and Tomas for windows environment and sending image attachment.

By default, the PHP mail() does not support sending email with attachment. In order to send an attachment, u can either use the PEAR package or PHPMailer. But in reality, the hosting server may not provide these kinds of third party libraries.
Continue reading PHP – Send Attachment with PHP mail()

Dream BIG and go for it =)