问题1:混合支付(余额支付+在线支付)不跟更新订单状态问题。
解决方案:http://bbs.ecshop.com/viewthread.php?tid=156761&highlight=
includeslib_payment.php 行 109
function check_money($log_id, $money) { $sql = 'SELECT order_id FROM ' . $GLOBALS['ecs']->table('pay_log') . " WHERE log_id = '$log_id'"; $order_id = $GLOBALS['db']->getOne($sql); $sql = 'SELECT order_amount FROM ' . $GLOBALS['ecs']->table('order_info') . " WHERE order_id = '$order_id'"; $amount = $GLOBALS['db']->getOne($sql); if ($money == $amount) { return true; } else { return false; } }
问题2:php微信支付2.3等数字转变为2。29
解决方案:原因是在php语言中会无限等于2.299999999999999999。具体砸门个原理,小的不知道。
intval(substr(sprintf("%.10f", ($order['order_amount']*100)), 0, -7))