-
Notifications
You must be signed in to change notification settings - Fork 227
Open
Description
General information
- SDK/Library version: 6.18.0
- Environment: Production
- Language, language version, and OS: PHP 8.1.2 on ubuntu 2.17
Issue description
When calling $result->toString()
on a Braintree\Result\Error
object, a PHP warning "Array to string conversion" is thrown. The issue may be caused by the presence of an array within the _attributes
property, perhapsinternationalPhoneNumber=Array
– which I see in the output of $result->toString()
.
Here is edited/redacted output of $result->toString()
:
[
"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=]"
]
Steps to Reproduce:
- Create a Braintree transaction that results in an error.
- Retrieve the
Braintree\Result\Error
object. - Call
$result->toString()
on theBraintree\Result\Error
object.
headbandno2uzegonemad
Metadata
Metadata
Assignees
Labels
No labels