无
This commit is contained in:
@@ -26,6 +26,7 @@ return [
|
||||
'public' => storage_path('cert/unionpay/public_rsa.pem'),
|
||||
],
|
||||
],
|
||||
//基础数据
|
||||
'regular' => [
|
||||
'002025' => [
|
||||
"msg_type",
|
||||
|
||||
@@ -13,6 +13,11 @@ use XuanChen\Coupon\Coupon;
|
||||
class UnionPay extends Init
|
||||
{
|
||||
|
||||
/**
|
||||
* UnionPay constructor.
|
||||
* @param $params
|
||||
* @param string $sign
|
||||
*/
|
||||
public function __construct($params, $sign = '')
|
||||
{
|
||||
$this->params = $params;
|
||||
@@ -22,6 +27,11 @@ class UnionPay extends Init
|
||||
$this->outlet_id = config('unionpay.outlet_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Notes: 入口
|
||||
* @Author: 玄尘
|
||||
* @Date : 2020/10/9 9:33
|
||||
*/
|
||||
public function start()
|
||||
{
|
||||
$this->updateInputData();
|
||||
@@ -49,13 +59,15 @@ class UnionPay extends Init
|
||||
break;
|
||||
//销账交易接口
|
||||
case '002100':
|
||||
//查询聚合信息
|
||||
$info = UnionpayLog::where('msg_crrltn_id', $this->params['msg_crrltn_id'])
|
||||
->where('msg_txn_code', '002025')
|
||||
->latest()
|
||||
->first();
|
||||
|
||||
//获取配置数据
|
||||
$conf_unionpay = config('unionpay');
|
||||
|
||||
//获取银联渠道
|
||||
$user = User::find($conf_unionpay['agent_id']);
|
||||
|
||||
if ($info) {
|
||||
@@ -144,6 +156,7 @@ class UnionPay extends Init
|
||||
$this->params['msg_sys_sn'] = date('ymdHis') . sprintf('%06d', rand(1, 99999999));
|
||||
}
|
||||
|
||||
//获取基础数据
|
||||
$base = config('unionpay.regular')[$this->msg_txn_code];
|
||||
$data = [];
|
||||
foreach ($this->params as $key => $param) {
|
||||
|
||||
Reference in New Issue
Block a user