Compare commits

...

2 Commits

Author SHA1 Message Date
ch4o5
999f3633a5 chore(release): 1.0.0-alpha.8 2023-09-22 10:23:09 +00:00
李东云
6431fc010f fix(order): 修复类型错误的问题 2023-09-22 18:22:59 +08:00
3 changed files with 13 additions and 2 deletions

View File

@@ -1,4 +1,11 @@
# 版本更新日志
## [1.0.0-alpha.8](http://124.126.16.154:8888/singularity/hdk-pay/compare/v1.0.0-alpha.7...v1.0.0-alpha.8) (2023-09-22)
### 🐛 Bug Fixes | Bug 修复
* **order:** 修复类型错误的问题 ([6431fc0](http://124.126.16.154:8888/singularity/hdk-pay/commit/6431fc010fe3e989773b84506df62d3c8f7ffc81))
## [1.0.0-alpha.7](http://124.126.16.154:8888/singularity/hdk-pay/compare/v1.0.0-alpha.6...v1.0.0-alpha.7) (2023-09-22)

View File

@@ -63,5 +63,5 @@
"url": "https://mirrors.cloud.tencent.com/composer/"
}
},
"version": "1.0.0-alpha.7"
"version": "1.0.0-alpha.8"
}

View File

@@ -3,6 +3,7 @@
namespace Singularity\HDK\Pay\Resource;
use Hyperf\Resource\Json\JsonResource;
use Money\Currency;
use Money\Money;
use Singularity\HDK\Pay\Enum\OrderStatus;
@@ -45,7 +46,10 @@ class Order extends JsonResource
'orderNo' => $this->resource['orderNo'],
'transactionId' => $this->resource['transactionId'],
'goodsName' => $this->resource['goodsName'],
'amount' => new Money($this->resource['amount']['amount'], $this->resource['amount']['currency']),
'amount' => new Money(
$this->resource['amount']['amount'],
new Currency($this->resource['amount']['currency'])
),
'state' => OrderStatus::from($this->resource['state']),
'uid' => $this->resource['uid'],
'payment' => $this->resource['payment'],