mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
修改支付参数
This commit is contained in:
parent
0a57431907
commit
66a94c8f4e
@ -261,8 +261,8 @@ abstract class PaymentService extends Service
|
||||
* @param string $paymentAmount 交易订单金额(元)
|
||||
* @param string $paymentTitle 交易订单名称
|
||||
* @param string $paymentRemark 交易订单描述
|
||||
* @param string $returnLocation 支付回跳地址
|
||||
* @param string $paymentReturn 支付回跳地址
|
||||
* @return array
|
||||
*/
|
||||
abstract public function create(string $openid, string $orderNo, string $paymentAmount, string $paymentTitle, string $paymentRemark, string $returnLocation = ''): array;
|
||||
abstract public function create(string $openid, string $orderNo, string $paymentAmount, string $paymentTitle, string $paymentRemark, string $paymentReturn = ''): array;
|
||||
}
|
@ -99,11 +99,11 @@ class AlipayPaymentService extends PaymentService
|
||||
* @param string $paymentAmount 交易订单金额(元)
|
||||
* @param string $paymentTitle 交易订单名称
|
||||
* @param string $paymentRemark 订单订单描述
|
||||
* @param string $returnLocation 完成回跳地址
|
||||
* @param string $paymentReturn 完成回跳地址
|
||||
* @return array
|
||||
* @throws \think\Exception
|
||||
*/
|
||||
public function create(string $openid, string $orderNo, string $paymentAmount, string $paymentTitle, string $paymentRemark, string $returnLocation = ''): array
|
||||
public function create(string $openid, string $orderNo, string $paymentAmount, string $paymentTitle, string $paymentRemark, string $paymentReturn = ''): array
|
||||
{
|
||||
try {
|
||||
if (isset(static::TYPES[static::$type])) {
|
||||
@ -114,10 +114,10 @@ class AlipayPaymentService extends PaymentService
|
||||
}
|
||||
$this->params['notify_url'] = sysuri("@data/api.notify/alipay/scene/order/param/{$tradeParam}", [], false, true);
|
||||
if (in_array($tradeType, [static::PAYMENT_ALIPAY_WAP, static::PAYMENT_ALIPAY_WEB])) {
|
||||
if (empty($returnLocation)) {
|
||||
if (empty($paymentReturn)) {
|
||||
throw new \think\Exception('支付回跳地址不能为空!');
|
||||
} else {
|
||||
$this->params['return_url'] = $returnLocation;
|
||||
$this->params['return_url'] = $paymentReturn;
|
||||
}
|
||||
}
|
||||
if ($tradeType === static::PAYMENT_WECHAT_APP) {
|
||||
|
@ -62,11 +62,11 @@ class JoinPaymentService extends PaymentService
|
||||
* @param string $paymentAmount 交易订单金额(元)
|
||||
* @param string $paymentTitle 交易订单名称
|
||||
* @param string $paymentRemark 订单订单描述
|
||||
* @param string $returnLocation 支付回跳地址
|
||||
* @param string $paymentReturn 支付回跳地址
|
||||
* @return array
|
||||
* @throws \think\Exception
|
||||
*/
|
||||
public function create(string $openid, string $orderNo, string $paymentAmount, string $paymentTitle, string $paymentRemark, string $returnLocation = ''): array
|
||||
public function create(string $openid, string $orderNo, string $paymentAmount, string $paymentTitle, string $paymentRemark, string $paymentReturn = ''): array
|
||||
{
|
||||
try {
|
||||
if (isset(static::TYPES[static::$type])) {
|
||||
|
@ -40,11 +40,11 @@ class WechatPaymentService extends PaymentService
|
||||
* @param string $paymentAmount 交易订单金额(元)
|
||||
* @param string $paymentTitle 交易订单名称
|
||||
* @param string $paymentRemark 订单订单描述
|
||||
* @param string $returnLocation 支付回跳地址
|
||||
* @param string $paymentReturn 支付回跳地址
|
||||
* @return array
|
||||
* @throws \think\Exception
|
||||
*/
|
||||
public function create(string $openid, string $orderNo, string $paymentAmount, string $paymentTitle, string $paymentRemark, string $returnLocation = ''): array
|
||||
public function create(string $openid, string $orderNo, string $paymentAmount, string $paymentTitle, string $paymentRemark, string $paymentReturn = ''): array
|
||||
{
|
||||
try {
|
||||
if (isset(static::TYPES[static::$type])) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user