mirror of
http://124.126.16.154:8888/singularity/hdk-pay.git
synced 2026-01-15 05:35:08 +08:00
fix(order): 修复类型错误的问题
This commit is contained in:
@@ -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'],
|
||||
|
||||
Reference in New Issue
Block a user