Ensure braintree error is parsed correctly

This commit is contained in:
David Bomba 2021-11-24 04:39:29 +11:00
parent e289ddda16
commit 3c8651ad6f
2 changed files with 8 additions and 2 deletions

View File

@ -136,7 +136,10 @@ class CreditCard
return $this->processSuccessfulPayment($result);
}
return $this->processUnsuccessfulPayment($result);
$error = $result ?: 'Undefined gateway error';
return $this->processUnsuccessfulPayment($error);
}
private function getPaymentToken(array $data, $customerId): ?string

View File

@ -312,6 +312,9 @@ class MolliePaymentDriver extends BaseDriver
$client = $record->client;
}
else{
nlog("mollie webhook");
nlog($payment);
$client = Client::withTrashed()->find($this->decodePrimaryKey($payment->metadata->client_id));
}