diff --git a/Sample_Code/PHP/BluePayPayment_BP10Emu.php b/Sample_Code/PHP/BluePayPayment_BP10Emu.php index 569a00d..44cd2f0 100644 --- a/Sample_Code/PHP/BluePayPayment_BP10Emu.php +++ b/Sample_Code/PHP/BluePayPayment_BP10Emu.php @@ -83,7 +83,7 @@ class BluePayPayment_BP10Emu { // $accID : Merchant's Account ID // $secretKey : Merchant's Secret Key // $mode : Transaction mode of either LIVE or TEST (default) - public function BluePayPayment_BP10Emu($accID, $secretKey, $mode) { + public function __construct($accID, $secretKey, $mode) { $this->accountID = $accID; $this->secretKey = $secretKey; $this->mode = $mode; @@ -360,7 +360,9 @@ public function http_parse_headers($header) { $fields = explode("\r\n", preg_replace('/\x0D\x0A[\x09\x20]+/', ' ', $header)); foreach( $fields as $field ) { if( preg_match('/([^:]+): (.+)/m', $field, $match) ) { - $match[1] = preg_replace('/(?<=^|[\x09\x20\x2D])./e', 'strtoupper("\0")', strtolower(trim($match[1]))); + $match[1] = preg_replace_callback('/(?<=^|[\x09\x20\x2D])./', function ($match) { + return strtoupper($match[0]); + }, strtolower(trim($match[1]))); if( isset($retVal[$match[1]]) ) { if (!is_array($retVal[$match[1]])) { $retVal[$match[1]] = array($retVal[$match[1]]);