-
Notifications
You must be signed in to change notification settings - Fork 485
added html and unicode email support to advanced example #118
base: master
Are you sure you want to change the base?
Conversation
added a send_email function to simplify sending html emails with added unicode support
sort the keys for $_POST alphabetically before printing out the values
sort the keys for $_POST alphabetically before printing out the values
Removed sort, because it should be added to PaypalIPN.php
Added option to use verified decoded data from a return on the verifyIPN function in PaypalIPN.php
sort the keys in the $DATA array
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should have examples this complex in the repo, which are for a pretty specific use case. We should be providing something that others can extend, but I think this is of little use to most people as most frameworks provide a lot of this functionality already.
In addition, the code in this PR (and the file being edited) is not compliant with modern PHP standards.
I'd be interested in your thoughts on this kind of example @pp-randy
I mostly wanted to add an example of unicode support for the email. Honestly, I am not sure what parts are not compliant with modern PHP standards. I would be interested to know. I removed the option for raw data logging. Other than a few functions for email that have been added for unicode and html support, this isn't any more complex than what is already in this file. Other than making the case to remove this file entirely, I see no reason not to add these changes, to at least correct its lack of unicode support when sending emails. |
php/example_usage_advanced.php
Outdated
@@ -4,12 +4,14 @@ | |||
$enable_sandbox = true; | |||
|
|||
// Use this to specify all of the email addresses that you have attached to paypal: | |||
$my_email_addresses = array("my_email_address@gmail.com", "my_email_address2@gmail.com", "my_email_address3@gmail.com"); | |||
$my_email_addresses = array("seller@paypalsandbox.com", "seller2@paypalsandbox.com", "seller3@paypalsandbox.com"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can emails be @example.com
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so.
I have changed it to use: example.com
removed duplicate "To:" field to prevent sending duplicate emails
renamed mail functions to be simpler
Added a send_email function to simplify sending html emails with added unicode support.