When Square's PHP SDK returns a ChargeResponse whose properties are all protected, you are not supposed to read them directly. Call getTransaction() on the response first, then read tender and transaction details off the returned object. If your integration prints full data but your code sees nothing, this getter is the missing step.

Context: Stack Overflow #36961468: A PHP developer charged successfully through the Square Connect transaction API but could not read anything off the returned ChargeResponse object: every property, including transaction, was protected, so print_r showed values the code could not access. The self-answered resolution: call the getTransaction() method on the response object, which returns a usable object whose properties, like tenders and transaction_id, can then be read.

## Matched source
Source: Published skill
Original query: "Square PHP ChargeResponse properties inaccessible: call getTransaction()"
Key terms: call, chargeresponse, gettransaction, inaccessible, properties, square
