mirror of
http://124.126.16.154:8888/singularity/hdk-pay.git
synced 2026-01-15 07:35:09 +08:00
Compare commits
7 Commits
v1.0.0-alp
...
v1.0.0-alp
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1dba3b84a4 | ||
|
|
6cecc96c5f | ||
|
|
448569583c | ||
|
|
99af043376 | ||
|
|
90dde97bc9 | ||
|
|
f7e1386c78 | ||
|
|
a6b33ed0ab |
26
CHANGELOG.md
26
CHANGELOG.md
@@ -1,4 +1,30 @@
|
||||
# 版本更新日志
|
||||
## [1.0.0-alpha.6](http://124.126.16.154:8888/singularity/hdk-pay/compare/v1.0.0-alpha.5...v1.0.0-alpha.6) (2023-09-22)
|
||||
|
||||
|
||||
### 📦 Build System | 打包构建
|
||||
|
||||
* **composer:** 兼容 hyperf 的 RequestInterface ([6cecc96](http://124.126.16.154:8888/singularity/hdk-pay/commit/6cecc96c5ffc223a1a72df6abd1f07d54cb7953d))
|
||||
|
||||
## [1.0.0-alpha.5](http://124.126.16.154:8888/singularity/hdk-pay/compare/v1.0.0-alpha.4...v1.0.0-alpha.5) (2023-09-22)
|
||||
|
||||
|
||||
### 📦 Build System | 打包构建
|
||||
|
||||
* **composer:** 增加 hyperf/contract 包,更新依赖 ([90dde97](http://124.126.16.154:8888/singularity/hdk-pay/commit/90dde97bc90d33917eb2c1a4d09779dd45776d30))
|
||||
|
||||
|
||||
### ✨ Features | 新功能
|
||||
|
||||
* **stripe:** 增加 callback 对请求的转化 ([99af043](http://124.126.16.154:8888/singularity/hdk-pay/commit/99af043376c4b44412a275d1b778e3e3584f5f96))
|
||||
|
||||
## [1.0.0-alpha.4](http://124.126.16.154:8888/singularity/hdk-pay/compare/v1.0.0-alpha.3...v1.0.0-alpha.4) (2023-09-20)
|
||||
|
||||
|
||||
### ✏️ Documentation | 文档
|
||||
|
||||
* **resource:** 更新了资源的字段注释 ([a6b33ed](http://124.126.16.154:8888/singularity/hdk-pay/commit/a6b33ed0abed2d23b041407c0a6a58e8405e075c))
|
||||
|
||||
## [1.0.0-alpha.3](http://124.126.16.154:8888/singularity/hdk-pay/compare/v1.0.0-alpha.2...v1.0.0-alpha.3) (2023-09-20)
|
||||
|
||||
|
||||
|
||||
@@ -20,8 +20,10 @@
|
||||
"moneyphp/money": "^4.1",
|
||||
"singularity/hdk-core": "^1.0.0",
|
||||
"hyperf/contract": "~3.0.0",
|
||||
"hyperf/constants": "3.0.*",
|
||||
"hyperf/config": "~3.0.0",
|
||||
"hyperf/di": "~3.0.0"
|
||||
"hyperf/di": "~3.0.0",
|
||||
"hyperf/http-server": "3.0.*"
|
||||
},
|
||||
"require-dev": {
|
||||
"cooper/hyperf-pest": "^1.1",
|
||||
@@ -61,5 +63,5 @@
|
||||
"url": "https://mirrors.cloud.tencent.com/composer/"
|
||||
}
|
||||
},
|
||||
"version": "1.0.0-alpha.3"
|
||||
"version": "1.0.0-alpha.6"
|
||||
}
|
||||
|
||||
611
composer.lock
generated
611
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -13,6 +13,13 @@ namespace Singularity\HDK\Pay\Resource;
|
||||
|
||||
use Hyperf\Resource\Json\ResourceCollection;
|
||||
|
||||
/**
|
||||
* Singularity\HDK\Pay\Resource\ GoodsCollection@Pay
|
||||
*
|
||||
* @author 李东云 <Dongyun.Li@LuxCreo.Ai>
|
||||
* Powered by PhpStorm
|
||||
* Created on 2023/9/20
|
||||
*/
|
||||
final class GoodsCollection extends ResourceCollection
|
||||
{
|
||||
public ?string $wrap = null;
|
||||
|
||||
@@ -12,6 +12,14 @@ use Singularity\HDK\Pay\Enum\OrderStatus;
|
||||
* @author 李东云 <Dongyun.Li@LuxCreo.Ai>
|
||||
* Powered by PhpStorm
|
||||
* Created on 2023/9/19
|
||||
*
|
||||
* @property-read string $orderNo
|
||||
* @property-read string transactionId
|
||||
* @property-read Money amount
|
||||
* @property-read OrderStatus state
|
||||
* @property-read string uid
|
||||
* @property-read string payment
|
||||
* @property-read string remark
|
||||
*/
|
||||
class Order extends JsonResource
|
||||
{
|
||||
@@ -23,8 +31,8 @@ class Order extends JsonResource
|
||||
* @return array{
|
||||
* orderNo: string,
|
||||
* transactionId: string,
|
||||
* amount: array{amount: numeric, currency: string},
|
||||
* state: string,
|
||||
* amount: Money,
|
||||
* state: OrderStatus,
|
||||
* uid: string,
|
||||
* payment: string,
|
||||
* remark: string
|
||||
|
||||
@@ -14,11 +14,11 @@ namespace Singularity\HDK\Pay\Sdk;
|
||||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use GuzzleHttp\RequestOptions;
|
||||
use Hyperf\Codec\Json;
|
||||
use Hyperf\HttpServer\Contract\RequestInterface;
|
||||
use Money\Money;
|
||||
use Singularity\HDK\Core\Http\RequestService;
|
||||
use Singularity\HDK\Core\Http\RequestServiceFactory;
|
||||
use Singularity\HDK\Pay\Resource\Order;
|
||||
|
||||
use Singularity\HDK\Pay\Resource\StripeConfiguration;
|
||||
|
||||
use function Hyperf\Config\config;
|
||||
@@ -86,4 +86,9 @@ final class StripeRpc
|
||||
$order = Json::decode($content);
|
||||
return Order::make($order);
|
||||
}
|
||||
|
||||
public function callback(RequestInterface $request): Order
|
||||
{
|
||||
return Order::make($request->post());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user