|
|
@@ -3,7 +3,7 @@
|
|
|
namespace ThirdParty\Urs\Webhook;
|
|
|
|
|
|
use App\Module\ThirdParty\Models\ThirdPartyService as ServiceModel;
|
|
|
-use App\Module\ThirdParty\Services\WebhookReceiver;
|
|
|
+
|
|
|
use Illuminate\Http\Request;
|
|
|
use Illuminate\Support\Facades\Log;
|
|
|
|
|
|
@@ -12,7 +12,7 @@ use Illuminate\Support\Facades\Log;
|
|
|
*
|
|
|
* 专门处理充值相关的Webhook通知
|
|
|
*/
|
|
|
-class UrsDepositWebhook extends WebhookReceiver
|
|
|
+class UrsDepositWebhook extends \ThirdParty\Urs\Webhook\WebhookReceiver
|
|
|
{
|
|
|
|
|
|
/**
|
|
|
@@ -46,7 +46,7 @@ class UrsDepositWebhook extends WebhookReceiver
|
|
|
$this->validateDepositRequest($request);
|
|
|
|
|
|
// 处理充值通知
|
|
|
- return $this->processDepositNotification($request);
|
|
|
+ return $this->processDepositNotification($request->get('user_id'), $request->get('amount'), $request->get('order_id'));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -91,22 +91,19 @@ class UrsDepositWebhook extends WebhookReceiver
|
|
|
* @param Request $request 请求对象
|
|
|
* @return array
|
|
|
*/
|
|
|
- protected function processDepositNotification(Request $request): array
|
|
|
+ protected function processDepositNotification($user_id, $amount, $order_id): array
|
|
|
{
|
|
|
- $userId = $request->input('user_id');
|
|
|
- $amount = $request->input('amount');
|
|
|
- $orderId = $request->input('order_id');
|
|
|
-
|
|
|
+ $tid = $this->getConfigDto()->
|
|
|
|
|
|
// 记录处理日志
|
|
|
Log::info("URS充值通知处理", [
|
|
|
- 'user_id' => $userId,
|
|
|
- 'amount' => $amount,
|
|
|
- 'order_id' => $orderId,
|
|
|
+ 'user_id' => $user_id,
|
|
|
+ 'amount' => $amount,
|
|
|
+ 'order_id' => $order_id,
|
|
|
'request_id' => $this->getRequestId(),
|
|
|
]);
|
|
|
|
|
|
- // 进行重置钻石逻辑
|
|
|
+
|
|
|
// 先创建充值单,然后返回成功,通过会队列处理充值单
|
|
|
$rorder_id = time();
|
|
|
|