|
|
@@ -46,7 +46,7 @@ class WiwiPayLogic extends BaseApiLogic
|
|
|
|
|
|
// 生成订单信息
|
|
|
$logic = new OrderLogic();
|
|
|
- $amount = $pay_amount * NumConfig::NUM_VALUE;
|
|
|
+ $amount = (int) round($pay_amount * NumConfig::NUM_VALUE) ;
|
|
|
$logic->orderCreate($order_sn, $amount, 'WiwiPay', $userId, '', $GiftsID, $AdId, $eventType);
|
|
|
|
|
|
// 构建支付请求参数
|
|
|
@@ -78,10 +78,10 @@ class WiwiPayLogic extends BaseApiLogic
|
|
|
$url = $service->apiUrl;
|
|
|
|
|
|
$result = $service->curlPost($url, $signedParams);
|
|
|
- $this->result = compact('result', 'signedParams', 'url');
|
|
|
+ $rresult = compact('result', 'signedParams', 'url');
|
|
|
|
|
|
Util::WriteLog('WiwiPay', 'WiwiPay支付请求' . $url . " | " . $request_extra);
|
|
|
- Util::WriteLog('WiwiPay', 'WiwiPay支付结果' . $result);
|
|
|
+ Util::WriteLog('WiwiPay', 'WiwiPay支付结果' . json_encode($rresult));
|
|
|
|
|
|
try {
|
|
|
$data = \GuzzleHttp\json_decode($result, true);
|
|
|
@@ -140,19 +140,16 @@ class WiwiPayLogic extends BaseApiLogic
|
|
|
$body['pay_status'] = 1;
|
|
|
$body['pay_at'] = date('Y-m-d H:i:s');
|
|
|
$body['finished_at'] = date('Y-m-d H:i:s');
|
|
|
- $body['amount'] = $payAmt * NumConfig::NUM_VALUE;
|
|
|
+ $body['amount'] = (int) round($payAmt * NumConfig::NUM_VALUE);
|
|
|
$config = (new PayConfig())->getConfig('WiwiPay');
|
|
|
$body['payment_fee']=$body['amount']*$config['payin_fee'];
|
|
|
try {
|
|
|
// 获取金额
|
|
|
$service = new OrderServices();
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
if (intval($order->amount) != $body['amount']) {
|
|
|
$body['GiftsID'] = 0;
|
|
|
- $body['amount'] = $payAmt * NumConfig::NUM_VALUE;
|
|
|
+ $body['amount'] = (int) round($payAmt * NumConfig::NUM_VALUE);
|
|
|
$Recharge = $payAmt;
|
|
|
$give = 0;
|
|
|
$favorable_price = $Recharge + $give;
|