mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-28 21:40:50 +00:00
移除佣金/提现控制器与前端页面,订单与用户链路去掉分销佣金逻辑,安装 SQL 与文档同步。 Co-authored-by: Cursor <cursoragent@cursor.com>
47 lines
1.9 KiB
PHP
47 lines
1.9 KiB
PHP
<?php
|
||
// +----------------------------------------------------------------------
|
||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||
// +----------------------------------------------------------------------
|
||
// | Copyright (c) 2016~2026 https://www.crmeb.com All rights reserved.
|
||
// +----------------------------------------------------------------------
|
||
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||
// +----------------------------------------------------------------------
|
||
// | Author: CRMEB Team <admin@crmeb.com>
|
||
// +----------------------------------------------------------------------
|
||
namespace app\services\pay;
|
||
|
||
class PayTransferNotifyServices
|
||
{
|
||
/**
|
||
* 红包
|
||
* 提现转账通知(wechatTx/sync)已随佣金提现功能下线,由分销插件自行处理。
|
||
* @param string|null $order_id 订单id
|
||
* @return bool
|
||
*/
|
||
public function wechatHb(?string $order_id = null, ?string $trade_no = null, ?string $state = null, ?string $fail_reason = null, array $other = [])
|
||
{
|
||
try {
|
||
// 通过 MarketingServiceProxy 事件代理查询抽奖红包转账记录(避免直接引用 modules 层)
|
||
$_results = event('MarketingServiceProxy', [
|
||
'module' => 'lottery',
|
||
'service' => 'LuckLotteryRecordServices',
|
||
'action' => 'getOne',
|
||
'args' => [['transfer_bill_no' => $trade_no]],
|
||
]);
|
||
$info = proxy_event_result($_results, null);
|
||
if (!$info) {
|
||
return false;
|
||
}
|
||
if (($info['state'] ?? '') === 'SUCCESS') return $state === 'SUCCESS';
|
||
$info->state = $state;
|
||
if ($fail_reason) {
|
||
$info->fail_reason = $fail_reason;
|
||
}
|
||
$info->save();
|
||
} catch (\Exception $e) {
|
||
return false;
|
||
}
|
||
return true;
|
||
}
|
||
}
|