Skip to content

Commit

Permalink
feat(wechat): change out_xxx to xxx
Browse files Browse the repository at this point in the history
  • Loading branch information
helei112g committed Feb 1, 2020
1 parent 2a6fd75 commit d391d7d
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion examples/wx/closeTrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

// 订单信息
$params = [
'out_trade_no' => '15546387228443',
'trade_no' => '15546387228443',
'transaction_id' => '',
];

Expand Down
2 changes: 1 addition & 1 deletion examples/wx/queryOrder.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
$wxConfig = require_once __DIR__ . '/../wxconfig.php';

$data = [
'out_trade_no' => '15805490027722',
'trade_no' => '15805490027722',
//'transaction_id' => '4557984565220190407200528457633',
];

Expand Down
2 changes: 1 addition & 1 deletion examples/wx/queryRefund.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
$wxConfig = require_once __DIR__ . '/../wxconfig.php';

$data = [
'out_trade_no' => '15805490027722',
'trade_no' => '15805490027722',
//'refund_no' => '15805498596435',
//'transaction_id' => '4988319909620200201172451651106',
//'refund_id' => '4196711984120200201173913842',
Expand Down
2 changes: 1 addition & 1 deletion examples/wx/refund.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

$refundNo = time() . rand(1000, 9999);
$data = [
'out_trade_no' => '15805490027722',
'trade_no' => '15805490027722',
'transaction_id' => '4988319909620200201172451651106',
'total_fee' => '5.52',
'refund_fee' => '5.52',
Expand Down
2 changes: 1 addition & 1 deletion examples/wx/transfer.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
'payer_real_name' => 'dayu',
'amount' => '1',
'desc' => '测试转账',
'spbill_create_ip' => '127.0.0.1',
'client_ip' => '127.0.0.1',

// bank 的参数
/*'trans_no' => time(),
Expand Down
2 changes: 1 addition & 1 deletion src/Gateways/Wechat/Bill.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ protected function getSelfParams(array $requestParams)
$selfParams = [
'bill_date' => $requestParams['bill_date'] ?? '',
'bill_type' => $requestParams['bill_type'] ?? 'ALL',
'tar_type' => $requestParams['tar_type'] ?? '',
//'tar_type' => $requestParams['tar_type'] ?? '',
];

return $selfParams;
Expand Down
4 changes: 2 additions & 2 deletions src/Gateways/Wechat/CloseTrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* @email : [email protected]
* @date : 2019/4/1 8:27 PM
* @version : 1.0.0
* @desc :
* @desc : 关闭交易
**/
class CloseTrade extends WechatBaseObject implements IGatewayRequest
{
Expand Down Expand Up @@ -49,7 +49,7 @@ public function request(array $requestParams)
protected function getSelfParams(array $requestParams)
{
$selfParams = [
'out_trade_no' => $requestParams['out_trade_no'] ?? '',
'out_trade_no' => $requestParams['trade_no'] ?? '',
];

return $selfParams;
Expand Down
4 changes: 2 additions & 2 deletions src/Gateways/Wechat/Refund.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ protected function getSelfParams(array $requestParams)
$refundFee = bcmul($requestParams['refund_fee'], 100, 0);
$selfParams = [
'transaction_id' => $requestParams['transaction_id'] ?? '',
'out_trade_no' => $requestParams['out_trade_no'] ?? '',
'out_refund_no' => $requestParams['out_refund_no'] ?? '',
'out_trade_no' => $requestParams['trade_no'] ?? '',
'out_refund_no' => $requestParams['refund_no'] ?? '',
'total_fee' => $totalFee,
'refund_fee' => $refundFee,
'refund_fee_type' => self::$config->get('fee_type', 'CNY'),
Expand Down
4 changes: 2 additions & 2 deletions src/Gateways/Wechat/RefundQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ protected function getSelfParams(array $requestParams)
{
$selfParams = [
'transaction_id' => $requestParams['transaction_id'] ?? '',
'out_trade_no' => $requestParams['out_trade_no'] ?? '',
'out_refund_no' => $requestParams['out_refund_no'] ?? '',
'out_trade_no' => $requestParams['trade_no'] ?? '',
'out_refund_no' => $requestParams['refund_no'] ?? '',
'refund_id' => $requestParams['refund_id'] ?? '',
'offset' => $requestParams['offset'] ?? '',
];
Expand Down
2 changes: 1 addition & 1 deletion src/Gateways/Wechat/Settlement.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ protected function getSelfParams(array $requestParams)
$selfParams = [
'bill_date' => $requestParams['bill_date'] ?? '',
'account_type' => $requestParams['bill_type'] ?? 'Operation',
'tar_type' => $requestParams['tar_type'] ?? '',
//'tar_type' => $requestParams['tar_type'] ?? '',
];

return $selfParams;
Expand Down
2 changes: 1 addition & 1 deletion src/Gateways/Wechat/TradeQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ protected function getSelfParams(array $requestParams)
{
$selfParams = [
'transaction_id' => $requestParams['transaction_id'] ?? '',
'out_trade_no' => $requestParams['out_trade_no'] ?? '',
'out_trade_no' => $requestParams['trade_no'] ?? '',
];

return $selfParams;
Expand Down
2 changes: 1 addition & 1 deletion src/Gateways/Wechat/Transfer.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ protected function getSelfParams(array $requestParams)
're_user_name' => $requestParams['re_user_name'] ?? '',
'amount' => $totalFee,
'desc' => $requestParams['desc'] ?? '',
'spbill_create_ip' => $requestParams['spbill_create_ip'] ?? '',
'spbill_create_ip' => $requestParams['client_ip'] ?? '',
];

return $selfParams;
Expand Down

0 comments on commit d391d7d

Please sign in to comment.