我在 First Data 演示模式帐户中相当成功地使用了 VinceG\FirstDataApi。也就是说,我发送了一个模拟的信用卡支付,我收到了一个完整的 JSON 对象,error=0,approved=1,等等。
在这个集合中是一些我想用来构建“谢谢”页面或“出了点问题”页面的信息:
[arrayResponse:protected] => stdClass Object
(
[transaction_error] => 0
[transaction_approved] => 1
[exact_resp_code] => 00
[exact_message] => Transaction Normal
[bank_resp_code] => 100
[bank_message] => Approved
[sequence_no] => 000008
[cvv2] => I
[retrieval_ref_no] => 4241673
[merchant_name] => MY COMPANY NAME
[merchant_address] => MY COMPANY ADDRESS
[merchant_city] => MY COMPANY CITY
[merchant_province] => MY COMPANY STATE
[merchant_country] => United States
[merchant_postal] => MY COMPANY ZIPCODE
[merchant_url] => https:/my.website.com
我试图访问数组中的属性:
echo "<pre>";
print_r($firstData->arrayResponse);
...并且输出是“无法访问受保护的属性 FirstData::$arrayResponse”。