mirror of
https://github.com/crmeb/CRMEB.git
synced 2025-12-10 17:42:50 +00:00
【程序目录】优化支付宝
This commit is contained in:
parent
2415bb7b7d
commit
389ffd2b2d
@ -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'));
|
||||
}
|
||||
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
@ -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],
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user