【程序目录】优化支付宝

This commit is contained in:
吴昊天 2024-06-28 14:25:39 +08:00
parent 2415bb7b7d
commit 389ffd2b2d
6 changed files with 13 additions and 8 deletions

View File

@ -183,7 +183,7 @@ class StoreBargain extends AuthController
{
/** @var StoreBargainUserHelpServices $bargainUserHelpService */
$bargainUserHelpService = app()->make(StoreBargainUserHelpServices::class);
$list = $bargainUserHelpService->getHelpList($id);
$list = $bargainUserHelpService->getHelpList((int)$id);
return app('json')->success(compact('list'));
}

View File

@ -118,7 +118,7 @@ class StoreBargainController
['bargainId', 0],
['bargainUserUid', 0]
], true);
return app('json')->success($this->services->setHelpBargain($request->uid(), $bargainId, $bargainUserUid));
return app('json')->success($this->services->setHelpBargain($request->uid(), (int)$bargainId, (int)$bargainUserUid));
}
/**
@ -139,7 +139,7 @@ class StoreBargainController
/** @var StoreBargainUserHelpServices $bargainUserHelp */
$bargainUserHelp = app()->make(StoreBargainUserHelpServices::class);
[$page, $limit] = $this->services->getPageValue();
$storeBargainUserHelp = $bargainUserHelp->getHelpList($bargainUserTableId, $page, $limit);
$storeBargainUserHelp = $bargainUserHelp->getHelpList((int)$bargainUserTableId, $page, $limit);
return app('json')->success($storeBargainUserHelp);
}

View File

@ -55,7 +55,7 @@ class StoreProductController
['priceOrder', ''],
['salesOrder', ''],
[['news', 'd'], 0, '', 'is_new'],
[['type', 0], 0],
[['type', 'd'], 0],
['ids', ''],
[['selectId', 'd'], 0],
[['productId', 'd'], 0],

View File

@ -140,6 +140,11 @@ class OrderPayServices
$options['wechat'] = $wechat;
}
break;
case PayServices::ALIAPY_PAY:
if ($wechat) {
$options['returnUrl'] = sys_config('site_url') . '/pages/goods/order_pay_status/index?order_id=' . $orderInfo['order_id'];
}
break;
}

View File

@ -123,11 +123,11 @@ class AliPayService
* @param string $totalAmount 支付金额
* @param string $passbackParams 备注
* @param string $quitUrl 同步跳转地址
* @param string $siteUrl
* @param string $returnUrl
* @param bool $isCode
* @return AlipayTradeWapPayResponse
*/
public function create(string $title, string $orderId, string $totalAmount, string $passbackParams, string $quitUrl = '', string $siteUrl = '', bool $isCode = false)
public function create(string $title, string $orderId, string $totalAmount, string $passbackParams, string $quitUrl = '', string $returnUrl = '', bool $isCode = false)
{
$title = trim($title);
try {
@ -139,7 +139,7 @@ class AliPayService
$result = Factory::payment()->app()->optional('passback_params', $passbackParams)->pay($title, $orderId, $totalAmount);
} else {
//h5支付
$result = Factory::payment()->wap()->optional('passback_params', $passbackParams)->pay($title, $orderId, $totalAmount, $quitUrl, $siteUrl);
$result = Factory::payment()->wap()->optional('passback_params', $passbackParams)->pay($title, $orderId, $totalAmount, $quitUrl, $returnUrl);
}
if ($this->response->success($result)) {
return $result->body ?? $result;

View File

@ -50,7 +50,7 @@ class AliPay extends BasePay implements PayInterface
$code = true;
}
return AliPayService::instance()->create($body, $orderId, $totalFee, $attach, $options['quitUrl'] ?? '', $options['siteUrl'] ?? '', $code);
return AliPayService::instance()->create($body, $orderId, $totalFee, $attach, $options['quitUrl'] ?? '', $options['returnUrl'] ?? '', $code);
}
/**