use wcf\system\exception\SystemException;
use wcf\system\payment\type\IPaymentType;
use wcf\util\HTTPRequest;
+use wcf\util\StringUtil;
/**
* Handles Paypal callbacks.
throw new SystemException('request not validated');
}
+ // fix encoding
+ if (!empty($_POST['charset']) && strtoupper($_POST['charset']) != 'UTF-8') {
+ foreach ($_POST as &$value) {
+ $value = StringUtil::convertEncoding(strtoupper($_POST['charset']), 'UTF-8', $value);
+ }
+ }
+
// Check that receiver_email is your Primary PayPal email
if (strtolower($_POST['business']) != strtolower(PAYPAL_EMAIL_ADDRESS) && (strtolower($_POST['receiver_email']) != strtolower(PAYPAL_EMAIL_ADDRESS))) {
throw new SystemException('invalid business or receiver_email');