feat/task1-c-wallet
gongfuxiang 2018-10-23 01:41:02 +08:00
parent 005f189e44
commit 97d452cb7a
2 changed files with 4 additions and 3 deletions

View File

@ -45,7 +45,7 @@ class AlipayLifeController extends CommonController
}
// 类库
$o = new \Library\AlipayLife($params);
$obj = new \Library\AlipayLife($params);
file_put_contents('./pppppp.php', "<?php\n\rreturn ".var_export($params, true).";\n\r?>");
// 根据方法处理
@ -53,12 +53,12 @@ class AlipayLifeController extends CommonController
{
// 校验
case 'alipay.service.check' :
$o->Check();
$obj->Check();
break;
// 关注/取消
case 'alipay.mobile.public.message.notify' :
$o->Life();
$obj->Life();
break;
// 默认

View File

@ -33,6 +33,7 @@ class AlipayLife
*/
public function __construct($params = [])
{
file_put_contents('./pppppp.php', "<?php\n\rreturn ".var_export($params, true).";\n\r?>");
$this->params = $params;
$this->xml_data = isset($params['biz_content']) ? $this->xmlToArray($params['biz_content']) : '';
$this->life_data = isset($this->xml_data['AppId']) ? AlipayLifeService::AppidLifeRow(['appid'=>$this->xml_data['AppId']]) : '';