37 lines
569 B
PHP
37 lines
569 B
PHP
<?php
|
|
|
|
namespace App\Exceptions;
|
|
|
|
use Exception;
|
|
|
|
class WeChatPayException extends Exception
|
|
{
|
|
/**
|
|
* @var array
|
|
*/
|
|
protected $raw;
|
|
|
|
/**
|
|
* @param string|null $message
|
|
* @param array $raw
|
|
*/
|
|
public function __construct(?string $message = null, array $raw = [])
|
|
{
|
|
parent::__construct($message);
|
|
|
|
$this->raw = $raw;
|
|
}
|
|
|
|
/**
|
|
* 微信支付上下文
|
|
*
|
|
* @return array
|
|
*/
|
|
public function context()
|
|
{
|
|
return [
|
|
'wechat_pay_raw' => $this->raw,
|
|
];
|
|
}
|
|
}
|