[更新]修改异常基类及测试案例

This commit is contained in:
Anyon 2018-02-03 14:23:14 +08:00
parent dc73718c6b
commit f8d23d4c50
6 changed files with 9 additions and 7 deletions

View File

@ -26,6 +26,7 @@ try {
// 4. 组装参数,可以参考官方商户文档
$options = [
'transaction_id' => '1008450740201411110005820873',
'out_refund_no' => '商户退款单号',
'total_fee' => '1',
'refund_fee' => '1',
];

View File

@ -26,10 +26,11 @@ try {
// 4. 组装参数,可以参考官方商户文档
$options = [
'transaction_id' => '1008450740201411110005820873',
'total_fee' => '1',
'refund_fee' => '1',
// 'out_trade_no' => '商户订单号',
// 'out_refund_no' => '商户退款单号'
// 'refund_id' => '微信退款单号',
];
$result = $wechat->refund($options);
$result = $wechat->queryRefund($options);
var_export($result);

View File

@ -32,7 +32,7 @@ class InvalidArgumentException extends \InvalidArgumentException
* @param integer $code
* @param array $raw
*/
public function __construct($message, $code, $raw = [])
public function __construct($message, $code = 0, $raw = [])
{
parent::__construct($message, intval($code));
$this->raw = $raw;

View File

@ -32,7 +32,7 @@ class InvalidDecryptException extends \Exception
* @param integer $code
* @param array $raw
*/
public function __construct($message, $code, $raw = [])
public function __construct($message, $code = 0, $raw = [])
{
parent::__construct($message, intval($code));
$this->raw = $raw;

View File

@ -32,7 +32,7 @@ class InvalidResponseException extends \Exception
* @param integer $code
* @param array $raw
*/
public function __construct($message, $code, $raw = [])
public function __construct($message, $code = 0, $raw = [])
{
parent::__construct($message, intval($code));
$this->raw = $raw;

View File

@ -33,7 +33,7 @@ class LocalCacheException extends \Exception
* @param integer $code
* @param array $raw
*/
public function __construct($message, $code, $raw = [])
public function __construct($message, $code = 0, $raw = [])
{
parent::__construct($message, intval($code));
$this->raw = $raw;