更新调试支付

This commit is contained in:
yaooo 2023-09-23 11:23:30 +08:00
parent 20cd612944
commit c72c7877b7
2 changed files with 23 additions and 3 deletions

View File

@ -139,7 +139,7 @@ class ServeOrderRepository extends BaseRepository
$res = $this->{$type}($merId, $data);
$key = $res['key'];
$param = $res['param'];
if(!$result = Cache::store('file')->get($key)){
$order_sn = app()->make(StoreOrderRepository::class)->getNewOrderId('cs');
$param['order_sn'] = $order_sn;

View File

@ -48,6 +48,10 @@ use think\facade\Log;
use think\facade\Queue;
use crmeb\jobs\SendSmsJob;
use crmeb\jobs\TestJob;
use crmeb\services\PayService;
use crmeb\services\CombinePayService;
use app\common\model\user\User;
use app\controller\api\Ceshi;
/**
@ -60,8 +64,24 @@ class Auth extends BaseController
{
public function dotest()
{
Queue::push(SendSmsJob::class, ['tempId' => 'ORDER_CREATE', 'id' => 101]);
return app('json')->success();
$repository = app()->make(StoreOrderRepository::class);
$param = [
"status" => 0,
"is_del" => 0,
"mer_id" => 5,
"type" => 10,
"meal_id" => 10,
"pay_type" => 1,
"attach" => "meal",
"order_info" => '{"type_id":10,"is_margin":1,"margin":"0.01"}',
"pay_price" => "0.01",
"order_sn" => "bzj" . date('YmdHis') . uniqid(),
"body" => uniqid(),
];
$payType = 'weixinApp';
$service = new PayService($payType, $param);
$payInfo = $service->pay(User::where(['uid'=>1])->find());
return app('json')->success($payInfo);
}
public function test()