diff --git a/webapp/controller/KefuController.class.php b/webapp/controller/KefuController.class.php index 0205825..d0310ae 100644 --- a/webapp/controller/KefuController.class.php +++ b/webapp/controller/KefuController.class.php @@ -73,23 +73,26 @@ class KefuController { $attachments .= $attachment['item_id'] . ':' . $attachment['count'] . ';'; } + $params = array( + 'to' => $accountid, + 'game_id' => phpcommon\extractGameId($accountid), + 'from' => '客服', + 'mail_type' => '1', + 'mail_subtype' => '0', + 'subject' => '领奖', + 'content' => '领取奖励', + 'sendtime' => time(), + 'ext' => '', + 'expire_time' => time() + 3600 * 24, + 'attachments' => $this->translateAttachments($config) + ); + $params['c'] = 'Mail'; + $params['a'] = 'sendMail'; + $params['timestamp'] = time(); + $params['sign'] = phpcommon\md5Sign($params, '14e1b600b1fd579f47433b88e8d85291', $params['timestamp']); $response = ''; if (!phpcommon\HttpClient::get($url, - array( - 'c' => 'Mail', - 'a' => 'sendMail', - 'to' => $accountid, - 'game_id' => phpcommon\extractGameId($accountid), - 'from' => '客服', - 'mail_type' => '1', - 'mail_subtype' => '0', - 'subject' => '领奖', - 'content' => '领取奖励', - 'sendtime' => time(), - 'ext' => '', - 'expire_time' => time() + 3600 * 24, - 'attachments' => $this->translateAttachments($config) - ), + $params, $response)) { return false; }