- 新增epay v2、v3、v3new版本的支付类库及证书文件 - 新增cos云存储类库文件 - 调整文件上传保存格式为按分类存储 - 修复会员、规则、类目等语言翻译键名 - 新增小程序图标等静态资源文件
59 行
1.3 KiB
PHP
59 行
1.3 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Yansongda\Pay\Contract;
|
|
|
|
use Psr\Http\Message\MessageInterface;
|
|
use Psr\Http\Message\ResponseInterface;
|
|
use Psr\Http\Message\ServerRequestInterface;
|
|
use Yansongda\Pay\Exception\ContainerException;
|
|
use Yansongda\Pay\Exception\InvalidParamsException;
|
|
use Yansongda\Pay\Exception\ServiceNotFoundException;
|
|
use Yansongda\Supports\Collection;
|
|
|
|
interface ProviderInterface
|
|
{
|
|
/**
|
|
* @return null|array|Collection|MessageInterface
|
|
*
|
|
* @throws ContainerException
|
|
* @throws InvalidParamsException
|
|
* @throws ServiceNotFoundException
|
|
*/
|
|
public function pay(array $plugins, array $params);
|
|
|
|
/**
|
|
* @param array|string $order
|
|
*
|
|
* @return array|Collection
|
|
*/
|
|
public function find($order);
|
|
|
|
/**
|
|
* @param array|string $order
|
|
*
|
|
* @return array|Collection|void
|
|
*/
|
|
public function cancel($order);
|
|
|
|
/**
|
|
* @param array|string $order
|
|
*
|
|
* @return array|Collection|void
|
|
*/
|
|
public function close($order);
|
|
|
|
/**
|
|
* @return array|Collection
|
|
*/
|
|
public function refund(array $order);
|
|
|
|
/**
|
|
* @param null|array|ServerRequestInterface $contents
|
|
*/
|
|
public function callback($contents = null, ?array $params = null): Collection;
|
|
|
|
public function success(): ResponseInterface;
|
|
}
|