【发布时间】:2019-09-09 23:07:43
【问题描述】:
请帮助我了解我接下来需要做什么。我正在使用方形交易 API 来接受电子商务网站上的付款。我从生成的表单中得到了随机数,我希望得到下面的回复。我现在需要从此响应中检索值并将它们存储在变量中,以便我可以继续为要履行的订单创建采购订单。
SquareConnect\Model\ChargeResponse Object
(
[errors:protected] =>
[transaction:protected] => SquareConnect\Model\Transaction Object
(
[id:protected] => ...
[location_id:protected] => ...
[created_at:protected] => 2018-08-05T15:45:48Z
[tenders:protected] => Array
(
[0] => SquareConnect\Model\Tender Object
(
[id:protected] => ...
[location_id:protected] => ..
[transaction_id:protected] => ...
[created_at:protected] => 2018-08-05T15:45:48Z
[note:protected] => Online Transaction
[amount_money:protected] => SquareConnect\Model\Money Object
(
[amount:protected] => 20448
[currency:protected] => USD
)
[tip_money:protected] =>
[processing_fee_money:protected] =>
[customer_id:protected] =>
[type:protected] => CARD
[card_details:protected] => SquareConnect\Model\TenderCardDetails Object
(
[status:protected] => CAPTURED
[card:protected] => SquareConnect\Model\Card Object
(
[id:protected] =>
[card_brand:protected] => VISA
[last_4:protected] => 1111
[exp_month:protected] =>
[exp_year:protected] =>
[cardholder_name:protected] =>
[billing_address:protected] =>
[fingerprint:protected] =>...
)
[entry_method:protected] => KEYED
)
[cash_details:protected] =>
[additional_recipients:protected] =>
)
)
[refunds:protected] =>
[reference_id:protected] =>
[product:protected] => EXTERNAL_API
[client_id:protected] =>
[shipping_address:protected] =>
[order_id:protected] =>
)
)
我只需要确认卡被扣款的交易结果
【问题讨论】:
标签: api transactions square