x

What is the following output?

I have the Square API card form up and working in a sandbox. When I run a card I get the following output from the process-card.php.

 

SquareConnect\Model\ChargeResponse Object
(
    [errors:protected] => 
    [transaction:protected] => SquareConnect\Model\Transaction Object
        (
            [id:protected] => xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
            [location_id:protected] => xxxxxxxxxxxxxxxxxxxxxxxxxxxx
            [created_at:protected] => 2017-04-04T15:32:45Z
            [tenders:protected] => Array
                (
                    [0] => SquareConnect\Model\Tender Object
                        (
                            [id:protected] => xxxxxxxxxxxxxxxxxxxxxxxxxxx
                            [location_id:protected] => xxxxxxxxxxxxxxxxxxxxx
                            [transaction_id:protected] => xxxxxxxxxxxxxxxxxxxxxxxxxx
                            [created_at:protected] => 2017-04-04T15:32:45Z
                            [note:protected] => Online Transaction
                            [amount_money:protected] => SquareConnect\Model\Money Object
                                (
                                    [amount:protected] => 100
                                    [currency:protected] => USD
                                )

                            [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] => xxxx
                                            [exp_month:protected] => 
                                            [exp_year:protected] => 
                                            [cardholder_name:protected] => 
                                            [billing_address:protected] => 
                                        )

                                    [entry_method:protected] => KEYED
                                )

                            [cash_details:protected] => 
                        )

                )

            [refunds:protected] => 
            [reference_id:protected] => 
            [product:protected] => EXTERNAL_API
            [client_id:protected] => 
            [order:protected] => 
            [shipping_address:protected] => 
        )

)

Thank you for your payment.

Amount: $1.00
Card: VISA XXXX

 

 

What is the proition above the "Thank you for your payment"? Is this being displayed because of an error or is it informational? Can I just comment it out in the code? I haven't been able to find any documenation on your site or on Google.

 

Thanks.

1,340 Views
Message 1 of 4
Report
3 REPLIES 3
Alumni

That part is showing the exact output from the API. The line in process charge

  print_r($result);

prints it out to the page, if you remove it, you'll no longer see that info. 

1,326 Views
Message 2 of 4
Report

Is that information just informational or is it an error? It look like it's just informational. Also does it mean that the processing is working correctly?

1,322 Views
Message 3 of 4
Report
Alumni

It is informational, the card was charged. 

1,318 Views
Message 4 of 4
Report