This commit is contained in:
2020-09-29 16:56:10 +08:00
parent 3a8093bb57
commit 8db6bc92c6
3 changed files with 13 additions and 7 deletions

View File

@@ -13,7 +13,7 @@ class UnionPay extends Init
public function __construct($params, $sign = '')
{
$this->params = collect($params);
$this->params = $params;
$this->sign = $sign;
$this->msg_txn_code = $params['msg_txn_code'];
$this->msg_sender = config('unionpay.msg_sender');
@@ -21,8 +21,8 @@ class UnionPay extends Init
public function start()
{
$out = $this->out();
$out = $this->out_data();
dump($out);
}
public function out_data()
@@ -30,11 +30,11 @@ class UnionPay extends Init
$basics = [
"msg_type" => "00",
"msg_txn_code" => $this->msg_txn_code,
"msg_crrltn_id" => $this->params->msg_crrltn_id,
"msg_crrltn_id" => $this->params['msg_crrltn_id'],
"msg_flg" => 1,
"msg_sender" => $this->msg_sender,
"msg_time" => now()->format('YmdHis'),
"msg_sys_sn" => $this->params->msg_sys_sn,
"msg_sys_sn" => $this->params['msg_sys_sn']??,
"msg_rsp_code" => "0000",
"msg_rsp_desc" => "成功",
];