* * This source file is subject to the MIT license that is bundled * with this source code in the file LICENSE. */ namespace ByteDance\MiniProgram\Order; use ByteDance\Kernel\Exceptions\InvalidArgumentException; use ByteDance\Kernel\Exceptions\InvalidConfigException; use ByteDance\Kernel\Support; use ByteDance\Kernel\Support\Collection; use ByteDance\Kernel\BaseClient; use Psr\Http\Message\ResponseInterface; class Client extends BaseClient { /** * Unify order. * * @param array $params * * @return ResponseInterface|Collection|array|object|string * * @throws \ByteDance\Kernel\Exceptions\InvalidArgumentException * @throws \ByteDance\Kernel\Exceptions\InvalidConfigException * @throws \GuzzleHttp\Exception\GuzzleException */ public function unify(array $params) { return $this->httpPostJson('api/apps/ecpay/v1/create_order', $params); } /** * Refund order. * * @param array $params * * @return ResponseInterface|Collection|array|object|string * * @throws \ByteDance\Kernel\Exceptions\InvalidArgumentException * @throws \ByteDance\Kernel\Exceptions\InvalidConfigException * @throws \GuzzleHttp\Exception\GuzzleException */ public function refund(array $params) { return $this->httpPostJson('api/apps/ecpay/v1/create_refund', $params); } }