|
@@ -397,12 +397,27 @@ class PaymentOrderService extends BaseService
|
|
|
if (NoPayService::getDepositMerchantId() !== '' && ($params['appId'] ?? '') === NoPayService::getDepositMerchantId()) {
|
|
if (NoPayService::getDepositMerchantId() !== '' && ($params['appId'] ?? '') === NoPayService::getDepositMerchantId()) {
|
|
|
$info = self::findOne(['order_no' => $params['merchantOrderNo'] ?? '']);
|
|
$info = self::findOne(['order_no' => $params['merchantOrderNo'] ?? '']);
|
|
|
if (!$info || $info->type != self::TYPE_PAY || !NoPayService::isRechargeChannel($info->channel)) {
|
|
if (!$info || $info->type != self::TYPE_PAY || !NoPayService::isRechargeChannel($info->channel)) {
|
|
|
|
|
+ Log::error('NO钱包充值回调订单不存在或类型不匹配', [
|
|
|
|
|
+ 'merchant_order_no' => $params['merchantOrderNo'] ?? '',
|
|
|
|
|
+ 'order_id' => $info->id ?? null,
|
|
|
|
|
+ 'order_type' => $info->type ?? null,
|
|
|
|
|
+ 'channel' => $info->channel ?? null,
|
|
|
|
|
+ ]);
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
if (!NoPayService::verifyDepositNotify($params)) {
|
|
if (!NoPayService::verifyDepositNotify($params)) {
|
|
|
|
|
+ Log::error('NO钱包充值回调验签失败', [
|
|
|
|
|
+ 'merchant_order_no' => $params['merchantOrderNo'] ?? '',
|
|
|
|
|
+ 'app_id' => $params['appId'] ?? '',
|
|
|
|
|
+ ]);
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
if (bccomp(NoPayService::amount($info->amount), NoPayService::amount($params['amount'] ?? 0), 2) !== 0) {
|
|
if (bccomp(NoPayService::amount($info->amount), NoPayService::amount($params['amount'] ?? 0), 2) !== 0) {
|
|
|
|
|
+ Log::error('NO钱包充值回调金额不一致', [
|
|
|
|
|
+ 'merchant_order_no' => $params['merchantOrderNo'] ?? '',
|
|
|
|
|
+ 'order_amount' => $info->amount,
|
|
|
|
|
+ 'callback_amount' => $params['amount'] ?? null,
|
|
|
|
|
+ ]);
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
if ($info->status != self::STATUS_PROCESS) {
|
|
if ($info->status != self::STATUS_PROCESS) {
|
|
@@ -936,12 +951,27 @@ class PaymentOrderService extends BaseService
|
|
|
if (NoPayService::getWithdrawMerchantId() !== '' && ($params['appId'] ?? '') === NoPayService::getWithdrawMerchantId()) {
|
|
if (NoPayService::getWithdrawMerchantId() !== '' && ($params['appId'] ?? '') === NoPayService::getWithdrawMerchantId()) {
|
|
|
$info = self::findOne(['order_no' => $params['merchantOrderNo'] ?? '']);
|
|
$info = self::findOne(['order_no' => $params['merchantOrderNo'] ?? '']);
|
|
|
if (!$info || $info->type != self::TYPE_PAYOUT || !NoPayService::isWithdrawChannel($info->channel)) {
|
|
if (!$info || $info->type != self::TYPE_PAYOUT || !NoPayService::isWithdrawChannel($info->channel)) {
|
|
|
|
|
+ Log::error('NO钱包提现回调订单不存在或类型不匹配', [
|
|
|
|
|
+ 'merchant_order_no' => $params['merchantOrderNo'] ?? '',
|
|
|
|
|
+ 'order_id' => $info->id ?? null,
|
|
|
|
|
+ 'order_type' => $info->type ?? null,
|
|
|
|
|
+ 'channel' => $info->channel ?? null,
|
|
|
|
|
+ ]);
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
if (!NoPayService::verifyWithdrawNotify($params)) {
|
|
if (!NoPayService::verifyWithdrawNotify($params)) {
|
|
|
|
|
+ Log::error('NO钱包提现回调验签失败', [
|
|
|
|
|
+ 'merchant_order_no' => $params['merchantOrderNo'] ?? '',
|
|
|
|
|
+ 'app_id' => $params['appId'] ?? '',
|
|
|
|
|
+ ]);
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
if (bccomp(NoPayService::amount($info->amount), NoPayService::amount($params['amount'] ?? 0), 2) !== 0) {
|
|
if (bccomp(NoPayService::amount($info->amount), NoPayService::amount($params['amount'] ?? 0), 2) !== 0) {
|
|
|
|
|
+ Log::error('NO钱包提现回调金额不一致', [
|
|
|
|
|
+ 'merchant_order_no' => $params['merchantOrderNo'] ?? '',
|
|
|
|
|
+ 'order_amount' => $info->amount,
|
|
|
|
|
+ 'callback_amount' => $params['amount'] ?? null,
|
|
|
|
|
+ ]);
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
self::onSubmitNoPayout($params, $info);
|
|
self::onSubmitNoPayout($params, $info);
|