支付渠道优化

master
sunke 5 years ago
commit 56627b75be

@ -218,24 +218,28 @@ class PayChannelController extends ThinkController
} }
$testorderChannelArr = []; $testorderChannelArr = [];
foreach($channelData as $key=>$value) { foreach($channelData as $key=>$value) {
foreach($testOrderChannelDatas as $trkey => $testOrderChannelData) { if($testOrderChannelDatas) {
if(intval($value['pay_way']) == intval($testOrderChannelData['pay_way'])) { foreach($testOrderChannelDatas as $trkey => $testOrderChannelData) {
$channelData[$key]['pay_amount'] = number_format(($value['pay_amount'] + $testOrderChannelData['pay_amount']) ,2,'.',''); if(intval($value['pay_way']) == intval($testOrderChannelData['pay_way'])) {
$channelData[$key]['pay_way'] = get_pay_way($value['pay_way']); $channelData[$key]['pay_amount'] = number_format(($value['pay_amount'] + $testOrderChannelData['pay_amount']) ,2,'.','');
break; $channelData[$key]['pay_way'] = get_pay_way($value['pay_way']);
} break;
else if (!in_array(intval($testOrderChannelData['pay_way']),$pay_way_arr)) { }
// $channelData[$testOrderChannelData['pay_way']]['pay_amount'] = number_format($testOrderChannelData['pay_amount'],2,'.',''); else if (!in_array(intval($testOrderChannelData['pay_way']),$pay_way_arr)) {
$testorderChannelArr[$trkey]['pay_amount'] = number_format($testOrderChannelData['pay_amount'],2,'.',''); // $channelData[$testOrderChannelData['pay_way']]['pay_amount'] = number_format($testOrderChannelData['pay_amount'],2,'.','');
$testorderChannelArr[$trkey]['pay_way'] = get_pay_way($testOrderChannelData['pay_way']); $testorderChannelArr[$trkey]['pay_amount'] = number_format($testOrderChannelData['pay_amount'],2,'.','');
} $testorderChannelArr[$trkey]['pay_way'] = get_pay_way($testOrderChannelData['pay_way']);
else { }
$channelData[$key]['pay_amount'] = number_format($value['pay_amount'],2,'.',''); else {
$channelData[$key]['pay_way'] = get_pay_way($value['pay_way']); $channelData[$key]['pay_amount'] = number_format($value['pay_amount'],2,'.','');
$channelData[$key]['pay_way'] = get_pay_way($value['pay_way']);
}
} }
} else {
$channelData[$key]['pay_amount'] = number_format($value['pay_amount'],2,'.','');
$channelData[$key]['pay_way'] = get_pay_way($value['pay_way']);
} }
// $channelData[$key]['pay_way'] = get_pay_way($value['pay_way']);
if (!$value['pay_way']) { if (!$value['pay_way']) {
unset($channelData[$key]); unset($channelData[$key]);

Loading…
Cancel
Save