Closed chandon closed 5 years ago
The errors result object will only be populated if the error is due to a failed validation. In this case, the object will contain one or more validation errors indicating which parameters were invalid:
In this case, the decline is not a validation error, so I wouldn't expect it to be there.
General information
SDK/Library version: packagist "braintree/braintree_php" for dev-master
Environment: Sandbox AND Production
Language, language version, and OS: PHP 5.6, Ubuntu 16.10
Issue description
When running a Transaction::sale resulting in a Processor Decline, according to the documentation (https://developers.braintreepayments.com/reference/general/result-objects/php) , i should retrieve errors with
$result->errors->deepAll()
But there is no error returned.
I can see the Processor Response Code by getting code from transaction :
$result->transaction
: { "processorResponseCode" : 2001, "processorResponseText" : "Insufficient Funds" ... }The decline should be reported in errors too...