|
@@ -19,7 +19,7 @@ class PayreturnController extends WebAction |
|
@@ -19,7 +19,7 @@ class PayreturnController extends WebAction |
19
|
{
|
19
|
{
|
20
|
$res = $this->getParseResponse($_GET, 2);
|
20
|
$res = $this->getParseResponse($_GET, 2);
|
21
|
$dealResult = $this->payResultProc($res, 2);
|
21
|
$dealResult = $this->payResultProc($res, 2);
|
22
|
- $dealResult['payData'] = array('payWay' => '支付宝');
|
22
|
+ $dealResult['payData'] = array('payWay' => '支付宝', 'payWayId' => 2);
|
23
|
$this->commonShowResult($dealResult);
|
23
|
$this->commonShowResult($dealResult);
|
24
|
}
|
24
|
}
|
25
|
|
25
|
|
|
@@ -56,7 +56,7 @@ class PayreturnController extends WebAction |
|
@@ -56,7 +56,7 @@ class PayreturnController extends WebAction |
56
|
$payService = PayFactory::factory($payment);
|
56
|
$payService = PayFactory::factory($payment);
|
57
|
$res = $payService->parseResponse(array('orderCode' => $orderCode));
|
57
|
$res = $payService->parseResponse(array('orderCode' => $orderCode));
|
58
|
$dealResult = $this->payResultProc($res, 21);
|
58
|
$dealResult = $this->payResultProc($res, 21);
|
59
|
- $dealResult['payData'] = array('payWay' => '微信扫码支付');
|
59
|
+ $dealResult['payData'] = array('payWay' => '微信扫码支付', 'payWayId' => 21);
|
60
|
} while (false);
|
60
|
} while (false);
|
61
|
|
61
|
|
62
|
$this->commonShowResult($dealResult);
|
62
|
$this->commonShowResult($dealResult);
|
|
@@ -69,7 +69,7 @@ class PayreturnController extends WebAction |
|
@@ -69,7 +69,7 @@ class PayreturnController extends WebAction |
69
|
UdpLog::info("【银联web支付同步返回】,function:unionpaywebreturn,json参数", json_encode($_REQUEST));
|
69
|
UdpLog::info("【银联web支付同步返回】,function:unionpaywebreturn,json参数", json_encode($_REQUEST));
|
70
|
$res = $this->getParseResponse($_REQUEST, 25);
|
70
|
$res = $this->getParseResponse($_REQUEST, 25);
|
71
|
$dealResult = $this->payResultProc($res, 25);
|
71
|
$dealResult = $this->payResultProc($res, 25);
|
72
|
- $dealResult['payData'] = array('payWay' => '银联在线支付');
|
72
|
+ $dealResult['payData'] = array('payWay' => '银联在线支付', 'payWayId' => 25);
|
73
|
$this->commonShowResult($dealResult);
|
73
|
$this->commonShowResult($dealResult);
|
74
|
}
|
74
|
}
|
75
|
/*
|
75
|
/*
|
|
@@ -79,7 +79,7 @@ class PayreturnController extends WebAction |
|
@@ -79,7 +79,7 @@ class PayreturnController extends WebAction |
79
|
{
|
79
|
{
|
80
|
$res = $this->getParseResponse($_GET, 12);
|
80
|
$res = $this->getParseResponse($_GET, 12);
|
81
|
$dealResult = $this->payResultProc($res, 12);
|
81
|
$dealResult = $this->payResultProc($res, 12);
|
82
|
- $dealResult['payData'] = array('payWay' => '支联支付');
|
82
|
+ $dealResult['payData'] = array('payWay' => '支联支付', 'payWayId' => 12);
|
83
|
$this->commonShowResult($dealResult);
|
83
|
$this->commonShowResult($dealResult);
|
84
|
}
|
84
|
}
|
85
|
/**
|
85
|
/**
|
|
@@ -112,16 +112,39 @@ class PayreturnController extends WebAction |
|
@@ -112,16 +112,39 @@ class PayreturnController extends WebAction |
112
|
{
|
112
|
{
|
113
|
$code = $dealResult['code'];
|
113
|
$code = $dealResult['code'];
|
114
|
$view = 'wechatqrcodereturn';
|
114
|
$view = 'wechatqrcodereturn';
|
|
|
115
|
+ $sknArr = array();
|
|
|
116
|
+ $skuArr = array();
|
|
|
117
|
+
|
|
|
118
|
+ if ($dealResult['data']['items']) {
|
|
|
119
|
+ foreach($dealResult['data']['items'] as $val) {
|
|
|
120
|
+ $sknArr[] = $val['product_skn'];
|
|
|
121
|
+ $skuArr[] = $val['product_sku'];
|
|
|
122
|
+ }
|
|
|
123
|
+ }
|
|
|
124
|
+
|
|
|
125
|
+ // 埋点数据
|
|
|
126
|
+ $point = array(
|
|
|
127
|
+ 'orderCode' => $dealResult['data']['orderNum'],
|
|
|
128
|
+ 'payResult' => 2, // 1 支付成功/2 支付失败
|
|
|
129
|
+ 'amount' => $dealResult['data']['pay'],
|
|
|
130
|
+ 'payStyle' => $dealResult['payData']['payWayId'],
|
|
|
131
|
+ 'proSkn' => implode($sknArr, ','),
|
|
|
132
|
+ 'proSku' => implode($skuArr, ','),
|
|
|
133
|
+ );
|
|
|
134
|
+
|
115
|
$data = array(
|
135
|
$data = array(
|
116
|
'headerData' => true,
|
136
|
'headerData' => true,
|
117
|
- 'payData' => $dealResult['payData']
|
137
|
+ 'payData' => $dealResult['payData'],
|
|
|
138
|
+ 'point' => $point
|
118
|
);
|
139
|
);
|
119
|
|
140
|
|
120
|
if ($code == 200) {
|
141
|
if ($code == 200) {
|
121
|
$view = 'index';
|
142
|
$view = 'index';
|
122
|
- $data = array('payNotice' => $dealResult['data']);
|
|
|
123
|
- }
|
143
|
+ $point['payResult'] = 1;// 支付结果
|
124
|
|
144
|
|
|
|
145
|
+ $data = array('payNotice' => $dealResult['data'], 'point' => $point);
|
|
|
146
|
+
|
|
|
147
|
+ }
|
125
|
//头部导航
|
148
|
//头部导航
|
126
|
$this->setSimpleHeader();
|
149
|
$this->setSimpleHeader();
|
127
|
$this->_view->display($view, $data);
|
150
|
$this->_view->display($view, $data);
|