|
@@ -19,7 +19,7 @@ require_once env('root_path').'application/common/library/llp/src/client/LLianPa
|
|
|
class CloudWallet extends Base
|
|
|
{
|
|
|
|
|
|
- protected $env = 0; // 0 测试环境 1正式环境
|
|
|
+ protected $env = 1; // 0 测试环境 1正式环境
|
|
|
protected $prefix = 'xl_';
|
|
|
protected static $domain_name = 'test';
|
|
|
protected $cloud_url = [
|
|
@@ -67,6 +67,7 @@ class CloudWallet extends Base
|
|
|
public function initialize(){
|
|
|
parent::initialize();
|
|
|
parent::check_login();
|
|
|
+ if(!checkAuth($this->uid))$this->error('暂未开放.....');
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -110,7 +111,7 @@ class CloudWallet extends Base
|
|
|
'occupation' =>18,
|
|
|
],
|
|
|
'accountInfo' => [
|
|
|
- //'account_type' => 'PERSONAL_PAYMENT_ACCOUNT'
|
|
|
+ 'account_type' => 'PERSONAL_PAYMENT_ACCOUNT'
|
|
|
],
|
|
|
'linkedAcctInfo'=>[
|
|
|
//'linked_accttype'=> 'LEGALREPT_BANK_CARD',
|
|
@@ -162,7 +163,7 @@ class CloudWallet extends Base
|
|
|
'password' => $password,
|
|
|
'random_key' => $rand_arr['random_key'],
|
|
|
'accountInfo'=>[
|
|
|
- //'account_type' => 'PERSONAL_PAYMENT_ACCOUNT'
|
|
|
+ 'account_type' => 'PERSONAL_PAYMENT_ACCOUNT'
|
|
|
]
|
|
|
];
|
|
|
$url = $this->cloud_url['activate'][$this->env];
|
|
@@ -241,6 +242,8 @@ class CloudWallet extends Base
|
|
|
];
|
|
|
$url = $url = $this->cloud_url['userinfo'][$this->env];
|
|
|
$result = LLianPayClient::sendRequest($url, json_encode($params,JSON_UNESCAPED_UNICODE));
|
|
|
+ $res = LianLianPay::userLevel($this->uid);
|
|
|
+ // var_dump($res);
|
|
|
$this->success('ok',json_decode($result,true));
|
|
|
}
|
|
|
|
|
@@ -265,6 +268,9 @@ class CloudWallet extends Base
|
|
|
* @return name:acctinfo_list.amt_lastbal type:float default:0 desc:昨日资金余额[单位:元]
|
|
|
* @return name:acctinfo_list.amt_lastaval type:float default:0 desc:昨日可用余额[单位:元]
|
|
|
* @return name:acctinfo_list.amt_lastfrz type:float default:0 desc:昨日冻结金额[单位:元]
|
|
|
+ * @return name:total_money type:float default:0 desc:总资产
|
|
|
+ * @return name:total_balaval type:float default:0 desc:可用余额
|
|
|
+ * @return name:total_balfrz type:float default:0 desc:总资产
|
|
|
*
|
|
|
*/
|
|
|
public function getAcctInfo()
|
|
@@ -279,7 +285,16 @@ class CloudWallet extends Base
|
|
|
];
|
|
|
$url = $url = $this->cloud_url['acctinfo'][$this->env];
|
|
|
$result = LLianPayClient::sendRequest($url, json_encode($params,JSON_UNESCAPED_UNICODE));
|
|
|
- $this->success('ok',json_decode($result,true));
|
|
|
+ $res = json_decode($result,true);
|
|
|
+ if(isset($res['acctinfo_list'])) {
|
|
|
+ $total_money = bcadd($res['acctinfo_list'][0]['amt_balcur'],$res['acctinfo_list'][1]['amt_balcur'],2);
|
|
|
+ $total_balaval = bcadd($res['acctinfo_list'][0]['amt_balaval'],$res['acctinfo_list'][1]['amt_balaval'],2);
|
|
|
+ $total_balfrz = bcadd($res['acctinfo_list'][0]['amt_balfrz'],$res['acctinfo_list'][1]['amt_balfrz'],2);
|
|
|
+ }
|
|
|
+ $res['total_money'] = !empty($total_money) ? $total_money : 0;
|
|
|
+ $res['total_balaval'] = !empty($total_balaval) ? $total_balaval : 0;
|
|
|
+ $res['total_balfrz'] = !empty($total_balfrz) ? $total_balfrz : 0;
|
|
|
+ $this->success('ok',$res);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -413,7 +428,7 @@ class CloudWallet extends Base
|
|
|
$header = '{"accept-encoding":"gzip,deflate","host":"xianglian-api.hdlkeji.com","content-length":"458","signature-type":"RSA","signature-data":"a5BMrkODcWl6FJ2vOEMG\/dnDbHfsBp34yY9ls9KmaWv5zYYO2EoK+DwL9PAFWTFzb0sKKYaOgrO8mFjl4CclTEd5UWvDFTAhv+EijImHTm4rGwbv1k2fpiw5MCSci1JTAE3ROsocgDWbLSsuFbTQ\/d97oR9KJbrjIInlVPEjO04=","correlationid":"2b9369df-ca95-49df-8f25-10fca9854c02","user-agent":"httpcomponents","connection":"Close","content-type":"text\/json;charset=UTF-8"}';
|
|
|
$result = json_decode($result,true);
|
|
|
$header = json_decode($header,true);
|
|
|
- // var_dump($result,$header);
|
|
|
+ // var_dump($result,$header);
|
|
|
$check_sign = LLianPayAccpSignature::checkSign(json_encode($result,JSON_UNESCAPED_UNICODE),$header['signature-data']);
|
|
|
var_dump($check_sign);
|
|
|
$orderNo = $result['orderInfo']['txn_seqno'];
|