2022-08-19 19:48:37 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
namespace Yansongda\Pay;
|
|
|
|
|
|
|
|
|
|
use JsonSerializable as JsonSerializableInterface;
|
|
|
|
|
use Yansongda\Supports\Traits\Accessable;
|
|
|
|
|
use Yansongda\Supports\Traits\Arrayable;
|
|
|
|
|
use Yansongda\Supports\Traits\Serializable;
|
|
|
|
|
|
2022-11-28 19:11:12 +08:00
|
|
|
class Request extends \GuzzleHttp\Psr7\Request implements JsonSerializableInterface
|
2022-08-19 19:48:37 +08:00
|
|
|
{
|
|
|
|
|
use Accessable;
|
|
|
|
|
use Arrayable;
|
|
|
|
|
use Serializable;
|
|
|
|
|
|
|
|
|
|
public function toArray(): array
|
|
|
|
|
{
|
|
|
|
|
return [
|
|
|
|
|
'url' => $this->getUri()->__toString(),
|
|
|
|
|
'method' => $this->getMethod(),
|
|
|
|
|
'headers' => $this->getHeaders(),
|
2022-11-28 19:11:12 +08:00
|
|
|
'body' => (string) $this->getBody(),
|
2022-08-19 19:48:37 +08:00
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
}
|