Authored by 周少峰

Merge branch 'feature/cartEvent' into release/5.3.1

... ... @@ -718,7 +718,8 @@ class Helpers
$oneGoods['productSubtotal'] = self::transPrice( floatval($value['last_vip_price']) * intval($value['buy_number']) );
$oneGoods['promotionId'] = empty($value['promotion_id']) ? '0' : $value['promotion_id'];
$oneGoods['isLimitSkn'] = $value['is_limit_skn'] === 'Y'; //is_limit_skn=Y 不支持7天无理由退货
$oneGoods['productSkn'] = $value['product_skn'];
$oneGoods['productSku'] = $value['product_sku'];
// 已下架
if ($isOffShelves) {
$oneGoods['isTipNoStore'] = true;
... ...
... ... @@ -274,7 +274,7 @@
{{/isVipPrice}}
</td>
<td>{{yohoIcon}}个</td>
<td class="product-num">{{productNum}}</td>
<td class="product-num" data-skn ="{{productSkn}}" data-sku="{{productSku}}">{{productNum}}</td>
<td class="cart-sub-total {{#xForOne}}xforone{{/xForOne}}">
{{#if xForOne}}
<del>{{productSubtotal}}</del>
... ...
... ... @@ -57,4 +57,5 @@
{{/ payNotice}}
</div>
{{> pay/pay-analysis}}
{{> layout/footer}}
\ No newline at end of file
{{> layout/footer}}
{{> pay/point}}
... ...
... ... @@ -35,4 +35,5 @@
</div>
{{/ payData}}
</div>
{{> layout/footer}}
\ No newline at end of file
{{> layout/footer}}
{{> pay/point}}
... ...
{{# point}}
<script type="text/javascript">
window.onload = function () {
// 埋点
window.addPoint('YB_SC_PAYMENT_TOPAY_CLICK', {ORDER_CODE: "{{orderCode}}", PAY_RES: "{{result}}", ORDER_AMOUNT: "{{amount}}", PAY_STYLE: "{{payWayId}}", PRD_SKN: "{{proSkn}}", PRD_SKU: "{{proSku}}"});
}
</script>
{{/ point}}
\ No newline at end of file
... ...
... ... @@ -778,8 +778,10 @@ $('.to-play input.submit').click(function() {
redEnvelopes = $('.use-envelopes input:checked').attr('data-use'),
$juangroupInput = $('.play-juan.is-select input[name="juangroup"]:checked'),
codeVal = $juangroupInput.val(),
juanCode = !!codeVal ? codeVal : $juangroupInput.closest('li').find('#juancode').val();
subTip = '';
juanCode = !!codeVal ? codeVal : $juangroupInput.closest('li').find('#juancode').val(),
subTip = '',
productSkn = [],
productSku = [];
if ($invoiceCheck.hasClass('active')) {
invoiceType = $('.invoice-upload-type').html();
... ... @@ -794,7 +796,7 @@ $('.to-play input.submit').click(function() {
return;
}
$this.attr('disabled', 'disabled');
$this.attr('disabled', 'disabled');
$.ajax({
type: 'POST',
... ... @@ -861,10 +863,10 @@ $('.to-play input.submit').click(function() {
// 去付款按钮埋点
$('.product-num').each(function() {
productNum += parseInt($(this).html());
productSkn.push($(this).attr('data-skn'));
productSku.push($(this).attr('data-sku'));
});
window.addPoint('YB_SC_TOPAY_CLICK', {ORDER_CODE: d.data.order_code, PRD_NUM: productNum, ORDER_AMOUNT: d.data.order_amount, UNIONCOOKIE: d.data.unionKey});
window.addPoint('YB_SC_TOPAY_CLICK', {ORDER_CODE: d.data.order_code, PRD_NUM: productNum, ORDER_AMOUNT: d.data.order_amount, PRO_SKN: productSkn.join(','), PRO_SKU:productSku.join(','), UNIONCOOKIE: d.data.unionKey});
window.location.href = d.data.payUrl;
}
} else {
... ...
... ... @@ -40,7 +40,7 @@ class NoticeController extends WebAction
$res = $this->getParseResponse($_GET, 2);
UdpLog::info("【支付宝同步】,function:alipayreturnAction,参数", array('pars' => $_GET, 'res' => $res));
$dealResult = $this->payResultProc($res, 2);
$dealResult['payData'] = array('payWay' => '支付宝');
$dealResult['payData'] = array('payWay' => '支付宝', 'payWayId' => 2);
$this->commonShowResult($dealResult);
}
... ... @@ -66,7 +66,7 @@ class NoticeController extends WebAction
$res = $this->getParseResponse($_GET, 17);
UdpLog::info("【支付宝二维码支付同步】,function:alibarcodereturnAction,参数", array('pars' => $_GET, 'res' => $res));
$dealResult = $this->payResultProc($res, 17);
$dealResult['payData'] = array('payWay' => '支付宝');
$dealResult['payData'] = array('payWay' => '支付宝', 'payWayId' => 17);
$this->commonShowResult($dealResult);
}
... ... @@ -90,7 +90,7 @@ class NoticeController extends WebAction
{
$res = $this->getParseResponse($_POST, 16);
$dealResult = $this->payResultProc($res, 16);
$dealResult['payData'] = array('payWay' => '通联支付');
$dealResult['payData'] = array('payWay' => '通联支付', 'payWayId' => 16);
$this->commonShowResult($dealResult);
}
... ... @@ -101,7 +101,7 @@ class NoticeController extends WebAction
{
$res = $this->getParseResponse($_GET, 13);
$dealResult = $this->payResultProc($res, 13);
$dealResult['payData'] = array('payWay' => '支付宝');
$dealResult['payData'] = array('payWay' => '支付宝', 'payWayId' => 13);
$this->commonShowResult($dealResult);
}
... ... @@ -139,7 +139,7 @@ class NoticeController extends WebAction
{
$res = $this->getParseResponse($_GET, 12);
$dealResult = $this->payResultProc($res, 12);
$dealResult['payData'] = array('payWay' => '银行卡');
$dealResult['payData'] = array('payWay' => '银行卡', 'payWayId' => 12);
$this->commonShowResult($dealResult);
}
... ... @@ -150,7 +150,7 @@ class NoticeController extends WebAction
{
$res = $this->getParseResponse($_POST, 4);
$dealResult = $this->payResultProc($res, 4);
$dealResult['payData'] = array('payWay' => '网银在线');
$dealResult['payData'] = array('payWay' => '网银在线', 'payWayId' => 4);
$this->commonShowResult($dealResult);
}
... ... @@ -176,7 +176,7 @@ class NoticeController extends WebAction
{
$res = $this->getParseResponse($_GET, 1);
$dealResult = $this->payResultProc($res, 1);
$dealResult['payData'] = array('payWay' => '财付通');
$dealResult['payData'] = array('payWay' => '财付通', 'payWayId' => 1);
$this->commonShowResult($dealResult);
}
... ... @@ -188,7 +188,7 @@ class NoticeController extends WebAction
{
$res = $this->getParseResponse($_POST, 11);
$dealResult = $this->payResultProc($res, 11);
$dealResult['payData'] = array('payWay' => '盛付通');
$dealResult['payData'] = array('payWay' => '盛付通', 'payWayId' => 11);
$this->commonShowResult($dealResult);
}
... ... @@ -255,7 +255,7 @@ class NoticeController extends WebAction
$res = $payService->parseResponse(array('orderCode' => $orderCode));
UdpLog::info("【微信扫码支付返回】,function:wechatqrcodereturnAction,参数", array('pars' => $_GET, 'res' => $res));
$dealResult = $this->payResultProc($res, 21);
$dealResult['payData'] = array('payWay' => '微信扫码支付');
$dealResult['payData'] = array('payWay' => '微信扫码支付', 'payWayId' => 21);
} while (false);
$this->commonShowResult($dealResult);
... ... @@ -269,7 +269,7 @@ class NoticeController extends WebAction
UdpLog::info("【银联web支付同步返回】,function:unionpaywebreturn,json参数", json_encode($_REQUEST));
$res = $this->getParseResponse($_REQUEST, 25);
$dealResult = $this->payResultProc($res, 25);
$dealResult['payData'] = array('payWay' => '银联在线支付');
$dealResult['payData'] = array('payWay' => '银联在线支付', 'payWayId' => 25);
$this->commonShowResult($dealResult);
}
... ... @@ -334,19 +334,43 @@ class NoticeController extends WebAction
{
$code = $dealResult['code'];
$view = 'wechatqrcodereturn';
$sknArr = array();
$skuArr = array();
if ($dealResult['data']['items']) {
foreach($dealResult['data']['items'] as $val) {
$sknArr[] = $val['product_skn'];
$skuArr[] = $val['product_sku'];
}
}
// 埋点数据
$point = array(
'orderCode' => $dealResult['data']['orderNum'],
'payResult' => 2, // 1 支付成功/2 支付失败
'amount' => $dealResult['data']['pay'],
'payStyle' => $dealResult['payData']['payWayId'],
'proSkn' => implode($sknArr, ','),
'proSku' => implode($skuArr, ','),
);
$data = array(
'headerData' => true,
'payData' => $dealResult['payData']
'payData' => $dealResult['payData'],
'point' => $point
);
if ($code == 200) {
$view = 'index';
$point['payResult'] = 1;// 支付结果
$data = array(
'payNotice' => $dealResult['data'],
'criteo' => array(// 统计代码有关数据
'orderNum' => $dealResult['data']['orderNum'],
'items' => $dealResult['data']['items']
)
),
'point' => $point
);
}
... ...
... ... @@ -23,9 +23,9 @@ define('USE_INTER_FACE_SHUNT', false);//分流开关
#dev环境
define('API_URL', 'http://api-test3.yohops.com:9999');
define('SERVICE_URL', 'http://service-test3.yohops.com:9999/');
define('YOHOBUY_URL', 'http://www.yohobuy.com/');
define('SERVICE_NOTIFY', 'http://test2.open.yohobuy.com/');
define('API_OLD', 'http://devservice.yoho.cn:58077/');
define('YOHOBUY_URL', 'http://www.yohobuy.com/');
define('SERVICE_NOTIFY', 'http://test2.open.yohobuy.com/');
define('API_OLD', 'http://devservice.yoho.cn:58077/');
$application = new Application(APPLICATION_PATH . '/configs/application.developer.ini');
$application->bootstrap()->run();
\ No newline at end of file
... ...