我收到了回复$ oResponse:
object(stdClass)[5]
public 'transaction' =>
object(stdClass)[6]
public 'sId' => string '55PT1U-ELU4Z8-7RDTJY' (length=20)
public 'sDate' => string '2012-12-13 17:32:45' (length=19)
public 'fAmount' => int -10
public 'sCurrency' => string 'USD' (length=3)
public 'fFee' => int 0
public 'sType' => string '(api) Sent to' (length=13)
public 'iTypeId' => string '12' (length=2)
public 'sEmail' => string 'receiver@test.com' (length=19)
public 'sDetails' => string 'Api send test' (length=12)
public 'sStatus' => string 'Completed' (length=9)
public 'status' => string 'ok' (length=2)
然后尝试解析状态:
echo $oResponse->{5}->status;
但它不起作用:(
答案 0 :(得分:1)
尝试更改此
echo $oResponse->status;