diff --git a/app/PaymentDrivers/CheckoutComPaymentDriver.php b/app/PaymentDrivers/CheckoutComPaymentDriver.php index ff058296e1..c865eba9da 100644 --- a/app/PaymentDrivers/CheckoutComPaymentDriver.php +++ b/app/PaymentDrivers/CheckoutComPaymentDriver.php @@ -229,7 +229,11 @@ class CheckoutComPaymentDriver extends BasePaymentDriver SystemLogger::dispatch($message, SystemLog::CATEGORY_GATEWAY_RESPONSE, SystemLog::EVENT_GATEWAY_FAILURE, SystemLog::TYPE_CHECKOUT, $this->client); - throw new \Exception('Failed to process the payment: ' . $state['payment_response']->response_summary, 1); + // throw new \Exception('Failed to process the payment: ' . $state['payment_response']->response_summary, 1); + + return render('gateways.unsuccessful', [ + 'code' => $state['payment_response']->response_code + ]); } public function processInternallyFailedPayment($e, $state) diff --git a/resources/lang/en/texts.php b/resources/lang/en/texts.php index 7c8fa0c8ff..8405755c6c 100644 --- a/resources/lang/en/texts.php +++ b/resources/lang/en/texts.php @@ -3243,4 +3243,8 @@ return [ 'node_status_not_found' => 'I could not find Node anywhere. Is it installed?', 'npm_status_not_found' => 'I could not find NPM anywhere. Is it installed?', 'locked_invoice' => 'This invoice is locked and unable to be modified', + + 'common_codes' => 'Common codes and their meanings', + + 'payment_error_code_20087' => '20087: Bad Track Data (invalid CVV and/or expiry date)', ]; diff --git a/resources/views/portal/ninja2020/gateways/unsuccessful.blade.php b/resources/views/portal/ninja2020/gateways/unsuccessful.blade.php new file mode 100644 index 0000000000..5c181dbfb2 --- /dev/null +++ b/resources/views/portal/ninja2020/gateways/unsuccessful.blade.php @@ -0,0 +1,13 @@ +@extends('portal.ninja2020.layout.app') +@section('meta_title', ctrans('texts.dashboard')) + +@section('body') + + {{ ctrans('texts.payment_error_code', ['code' => isset($code) ? $code : '']) }} + + + {{ ctrans('texts.common_codes') }}: +