Compare commits

...

5 Commits

Author SHA1 Message Date
ch4o5
1dba3b84a4 chore(release): 1.0.0-alpha.6 2023-09-22 08:15:10 +00:00
李东云
6cecc96c5f build(composer): 兼容 hyperf 的 RequestInterface 2023-09-22 16:15:01 +08:00
ch4o5
448569583c chore(release): 1.0.0-alpha.5 2023-09-22 07:43:53 +00:00
李东云
99af043376 feat(stripe): 增加 callback 对请求的转化 2023-09-22 15:42:22 +08:00
李东云
90dde97bc9 build(composer): 增加 hyperf/contract 包,更新依赖 2023-09-22 15:39:42 +08:00
4 changed files with 523 additions and 120 deletions

View File

@@ -1,4 +1,23 @@
# 版本更新日志
## [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)

View File

@@ -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.4"
"version": "1.0.0-alpha.6"
}

611
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -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());
}
}