...
|
...
|
@@ -145,18 +145,20 @@ class PayModel |
|
|
// 记录支付方式
|
|
|
$bankRecord = PayData::getBankByOrder($orderCode);
|
|
|
if (isset($bankRecord['data']['bankCode']) && !empty($bankRecord['data']['bankCode'])) {
|
|
|
//银行的记录方式
|
|
|
$payRecord = $bankRecord['data']['bankCode'];
|
|
|
} elseif (isset($bankRecord['data']['payment']) && !empty($bankRecord['data']['payment'])) {
|
|
|
//支付宝等平台的记录方式
|
|
|
$payRecord = $bankRecord['data']['payment'];
|
|
|
} else {
|
|
|
$payCode = $order['payment'] ?: $defaultPayType;
|
|
|
//记录app上的支付方式
|
|
|
$payCode = empty($order['payment']) ? $defaultPayType : $order['payment'];
|
|
|
$changeCodes = array(
|
|
|
19 => 21,// app上微信支付
|
|
|
22 => 21,// h5微信支付
|
|
|
18 => $defaultPayType// h5支付宝支付
|
|
|
18 => 2// h5支付宝支付
|
|
|
);
|
|
|
$platformCode = isset($changeCodes[$payCode]) && $changeCodes[$payCode] ? $changeCodes[$payCode] : $payCode;
|
|
|
$platformCodeList = array_keys($types);
|
|
|
$payRecord = in_array($platformCode, $platformCodeList) ? $platformCode : $defaultPayType;
|
|
|
$payRecord = empty($changeCodes[$payCode]) ? $defaultPayType : $changeCodes[$payCode];
|
|
|
}
|
|
|
$result['payRecord'] = $payRecord;
|
|
|
|
...
|
...
|
@@ -198,16 +200,14 @@ class PayModel |
|
|
$onePay = array();
|
|
|
foreach ($pays as $code => $pay) {
|
|
|
$onePay = array();
|
|
|
$onePay['dataId'] = $code;
|
|
|
$onePay['dataId'] = $isBank ? 12 : $code;//支付宝支联为12
|
|
|
$onePay['dataVal'] = $isBank ? '12_' . $code : $code . '_platform';
|
|
|
$onePay['idNum'] = $code;
|
|
|
$onePay['ico'] = $pay['ico'];
|
|
|
$onePay['name'] = $pay['name'];
|
|
|
$onePay['imgId'] = $onePay['dataVal'];
|
|
|
|
|
|
$result[] = $onePay;
|
|
|
}
|
|
|
|
|
|
return $result;
|
|
|
}
|
|
|
|
...
|
...
|
|