[
"Braintree\\Result\\Error[errors=, params=transaction=type=sale, amount=49.99, taxAmount=0, paymentMethodToken=czrtwvr, options=submitForSettlement=true, paypal=customField=1000261653, description=redacted, orderId=redacted, message=Processor Declined, transaction=Braintree\\Transaction[id=redacted, type=sale, amount=49.99, status=processor_declined, createdAt=Thursday, 06-Jun-24 10:25:13 UTC, creditCardDetails=Braintree\\Transaction\\CreditCardDetails[token=redacted, bin=redacted, last4=redacted, cardType=American Express, expirationMonth=06, expirationYear=2017, customerLocation=US, cardholderName=redacted, imageUrl=https://assets.braintreegateway.com/payment_method_logo/american_express.png?environment=production, isNetworkTokenized=, prepaid=No, healthcare=Unknown, debit=No, durbinRegulated=Unknown, commercial=No, payroll=Unknown, issuingBank=American Express, countryOfIssuance=USA, productId=Unknown, globalId=redacted, accountType=credit, uniqueNumberIdentifier=redacted, venmoSdk=, accountBalance=, expirationDate=06/2017, maskedNumber=redacted], customerDetails=Braintree\\Transaction\\CustomerDetails[id=redacted, firstName=, lastName=, company=, email=, website=, phone=, internationalPhone=Array, fax=, globalId=redacted]], creditCardVerification=, subscription=, merchantAccount=, verification=]"
]
General information
Issue description
When calling
$result->toString()on aBraintree\Result\Errorobject, a PHP warning "Array to string conversion" is thrown. The issue may be caused by the presence of an array within the_attributesproperty, perhapsinternationalPhoneNumber=Array– which I see in the output of$result->toString().Here is edited/redacted output of
$result->toString():Steps to Reproduce:
Braintree\Result\Errorobject.$result->toString()on theBraintree\Result\Errorobject.