我有以下对象。在这种情况下,如何将 GrossAmount (1.10) 的值作为变量?
我试过了:
$gross = $object->GrossAmount->_;
然而$id = $object->GrossAmount->currencyID;
是否给了我当前的英镑代码
但这行不通。
Array
(
[TransactionID] => 9BBXH1113VA716445A
[ParentTransactionID] =>
[ReceiptID] =>
[TransactionType] => express-checkout
[PaymentType] => instant
[PaymentDate] => 2013-02-28T18:26:43Z
[GrossAmount] => stdClass Object
(
[_] => 1.10
[currencyID] => GBP
)
[FeeAmount] => stdClass Object
(
[_] => 0.21
[currencyID] => GBP
)
[TaxAmount] => stdClass Object
(
[_] => 0.00
[currencyID] => GBP
)
[ExchangeRate] =>
[PaymentStatus] => Completed
[PendingReason] => none
[ReasonCode] => none
)