Show message on unsuccessful verification

This commit is contained in:
Benjamin Beganović 2021-08-30 12:18:57 +02:00
parent 8467c60a3b
commit e67c668fd8
2 changed files with 5 additions and 2 deletions

View File

@ -63,7 +63,7 @@ class ACH implements MethodInterface
],
]);
if ($result->success) {
if ($result->success && optional($result->paymentMethod)->verified) {
$account = $result->paymentMethod;
try {
@ -71,7 +71,7 @@ class ACH implements MethodInterface
$payment_meta->brand = (string)$account->bankName;
$payment_meta->last4 = (string)$account->last4;
$payment_meta->type = GatewayType::BANK_TRANSFER;
$payment_meta->state = $account->verified ? 'authorized' : 'unauthorized';
$payment_meta->state = 'authorized';
$data = [
'payment_meta' => $payment_meta,
@ -86,6 +86,8 @@ class ACH implements MethodInterface
return $this->braintree->processInternallyFailedPayment($this->braintree, $e);
}
}
return back()->withMessage(ctrans('texts.unable_to_verify_payment_method'));
}
public function paymentView(array $data)

View File

@ -4301,6 +4301,7 @@ $LANG = array(
'locality' => 'Locality',
'checking' => 'Checking',
'savings' => 'Savings',
'unable_to_verify_payment_method' => 'Unable to verify payment method.',
);
return $LANG;