小编Jos*_*ere的帖子

无法使用Square Connect ChargeResponse对象

我可以按照github上的示例使用事务API成功收费.执行收费如下:

$result = $transaction_api->charge($access_token, $location_id, $request_body);
echo "<pre>";
print_r($result);
echo "</pre>";
Run Code Online (Sandbox Code Playgroud)

这是输出:

SquareConnect\Model\ChargeResponse Object
(
    [errors:protected] => 
    [transaction:protected] => SquareConnect\Model\Transaction Object
        (
            [id:protected] => REMOVED FROM POST
            [location_id:protected] => REMOVED FROM POST
            [created_at:protected] => 2016-04-30T23:42:33Z
            [tenders:protected] => Array
                (
                    [0] => SquareConnect\Model\Tender Object
                        (
                            [id:protected] => REMOVED FROM POST
                            [location_id:protected] => REMOVED FROM POST
                            [transaction_id:protected] => 02d1d965-51fd-5023-68f5-0fcd148a263b
                            [created_at:protected] => 2016-04-30T23:42:33Z
                            [note:protected] => Online Transaction
                            [amount_money:protected] => SquareConnect\Model\Money Object
                                (
                                    [amount:protected] => 6000
                                    [currency:protected] => USD
                                )

                            [processing_fee_money:protected] => 
                            [customer_id:protected] => …
Run Code Online (Sandbox Code Playgroud)

php square square-connect

4
推荐指数
1
解决办法
1032
查看次数

标签 统计

php ×1

square ×1

square-connect ×1