mirror of
https://gitee.com/zoujingli/WeChatDeveloper.git
synced 2025-12-07 01:26:59 +08:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c901adfb29 | ||
|
|
15622a4009 | ||
|
|
8dd0601357 | ||
|
|
cdf88da1a9 |
@ -152,6 +152,22 @@ abstract class BasicAliPay
|
|||||||
return $this->getResult($options);
|
return $this->getResult($options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支付宝订单退款查询
|
||||||
|
* @param array|string $options 退款参数或退款商户订单号
|
||||||
|
* @param array|null $queryOptions 查询选项
|
||||||
|
* @return array|bool
|
||||||
|
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||||
|
* @throws \WeChat\Exceptions\LocalCacheException
|
||||||
|
*/
|
||||||
|
public function refundQuery($options, $queryOptions = null)
|
||||||
|
{
|
||||||
|
if (!is_array($options)) $options = ['out_trade_no' => $options];
|
||||||
|
empty($queryOptions) || $options['query_options'] = $queryOptions;
|
||||||
|
$this->options->set('method', 'alipay.trade.fastpay.refund.query');
|
||||||
|
return $this->getResult($options);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 关闭支付宝进行中的订单
|
* 关闭支付宝进行中的订单
|
||||||
* @param array|string $options
|
* @param array|string $options
|
||||||
|
|||||||
@ -66,7 +66,7 @@ class Order extends BasicWePay
|
|||||||
$nonceStr = Tools::createNoncestr();
|
$nonceStr = Tools::createNoncestr();
|
||||||
if ($type === self::WXPAY_APP) {
|
if ($type === self::WXPAY_APP) {
|
||||||
$sign = $this->signBuild(join("\n", [$appid, $time, $nonceStr, $result['prepay_id'], '']));
|
$sign = $this->signBuild(join("\n", [$appid, $time, $nonceStr, $result['prepay_id'], '']));
|
||||||
return ['partnerId' => $this->config['mch_id'], 'prepayId' => $result['prepay_id'], 'package' => 'Sign=WXPay', 'nonceStr' => $nonceStr, 'timeStamp' => $time, 'sign' => $sign];
|
return ['appId' => $appid, 'partnerId' => $this->config['mch_id'], 'prepayId' => $result['prepay_id'], 'package' => 'Sign=WXPay', 'nonceStr' => $nonceStr, 'timeStamp' => $time, 'sign' => $sign];
|
||||||
} elseif ($type === self::WXPAY_JSAPI) {
|
} elseif ($type === self::WXPAY_JSAPI) {
|
||||||
$sign = $this->signBuild(join("\n", [$appid, $time, $nonceStr, "prepay_id={$result['prepay_id']}", '']));
|
$sign = $this->signBuild(join("\n", [$appid, $time, $nonceStr, "prepay_id={$result['prepay_id']}", '']));
|
||||||
return ['appId' => $appid, 'timestamp' => $time, 'timeStamp' => $time, 'nonceStr' => $nonceStr, 'package' => "prepay_id={$result['prepay_id']}", 'signType' => 'RSA', 'paySign' => $sign];
|
return ['appId' => $appid, 'timestamp' => $time, 'timeStamp' => $time, 'nonceStr' => $nonceStr, 'package' => "prepay_id={$result['prepay_id']}", 'signType' => 'RSA', 'paySign' => $sign];
|
||||||
|
|||||||
@ -30,6 +30,7 @@ class Transfers extends BasicWePay
|
|||||||
* 新版商家转换到零钱
|
* 新版商家转换到零钱
|
||||||
* @param $body
|
* @param $body
|
||||||
* @return array|string
|
* @return array|string
|
||||||
|
* @throws \WeChat\Exceptions\InvalidDecryptException
|
||||||
* @throws \WeChat\Exceptions\InvalidResponseException
|
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||||
* @link https://pay.weixin.qq.com/doc/v3/merchant/4012716434
|
* @link https://pay.weixin.qq.com/doc/v3/merchant/4012716434
|
||||||
*/
|
*/
|
||||||
@ -44,6 +45,17 @@ class Transfers extends BasicWePay
|
|||||||
return $this->doRequest('POST', '/v3/fund-app/mch-transfer/transfer-bills', json_encode($body, JSON_UNESCAPED_UNICODE), true);
|
return $this->doRequest('POST', '/v3/fund-app/mch-transfer/transfer-bills', json_encode($body, JSON_UNESCAPED_UNICODE), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询转账结果
|
||||||
|
* @param $out_bill_no
|
||||||
|
* @return array|string
|
||||||
|
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||||
|
*/
|
||||||
|
public function billsQuery($out_bill_no)
|
||||||
|
{
|
||||||
|
return $this->doRequest('GET', "/v3/fund-app/mch-transfer/transfer-bills/out-bill-no/{$out_bill_no}", '', true);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发起商家批量转账
|
* 发起商家批量转账
|
||||||
* @param array $body
|
* @param array $body
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
# WeChatDeveloper for PHP
|
# WeChatDeveloper for PHP
|
||||||
|
[](https://gitcode.com/ThinkAdmin/ThinkAdmin)
|
||||||
|
[](https://gitee.com/zoujingli/ThinkAdmin)
|
||||||
[](https://packagist.org/packages/zoujingli/wechat-developer)
|
[](https://packagist.org/packages/zoujingli/wechat-developer)
|
||||||
[](https://packagist.org/packages/zoujingli/wechat-developer)
|
[](https://packagist.org/packages/zoujingli/wechat-developer)
|
||||||
[](https://packagist.org/packages/zoujingli/wechat-developer)
|
[](https://packagist.org/packages/zoujingli/wechat-developer)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user