paypal / ipn-code-samples

Other
562 stars 486 forks source link

Fix for plus signs in data and verified array #119

Open BigRedBot opened 6 years ago

BigRedBot commented 6 years ago

$_POST can in some instances decode plus signs incorrectly, and can not in all possible instances be trusted to have decoded the data correctly.

With this change, you may instead use an array that has had its contents completely verified for accuracy.

Using the function urlencode with an email address that contains plus signs, may cause the plus signs to encode as a space instead of a plus. This would prevent the data from being validated with email addresses with plus signs. It is safer to use rawurlencode instead.

BigRedBot commented 6 years ago

Using the function urlencode with an email address that contains plus signs, may cause the plus signs to encode as a space instead of a plus. This would prevent the data from being validated with email addresses with plus signs. It is safer to use rawurlencode instead.