diff --git a/VERSION.txt b/VERSION.txt index d6701612336e..1c26b6f22f62 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -5.2.18 \ No newline at end of file +5.2.19 \ No newline at end of file diff --git a/app/PaymentDrivers/Authorize/AuthorizeCreditCard.php b/app/PaymentDrivers/Authorize/AuthorizeCreditCard.php index cac57328bb92..0bdeb119229d 100644 --- a/app/PaymentDrivers/Authorize/AuthorizeCreditCard.php +++ b/app/PaymentDrivers/Authorize/AuthorizeCreditCard.php @@ -214,6 +214,27 @@ class AuthorizeCreditCard PaymentFailureMailer::dispatch($this->authorize->client, $response->getTransId(), $this->authorize->client->company, $amount); + $payment_hash = PaymentHash::whereRaw('BINARY `hash`= ?', [$request->input('payment_hash')])->firstOrFail(); + + $vars = [ + 'invoices' => $payment_hash->invoices(), + 'amount' => array_sum(array_column($payment_hash->invoices(), 'amount')) + $payment_hash->fee_total, + ]; + + $logger_message = [ + 'server_response' => $response->getErrors(), + 'data' => $this->formatGatewayResponse($data, $vars), + ]; + + SystemLogger::dispatch( + $logger_message, + SystemLog::CATEGORY_GATEWAY_RESPONSE, + SystemLog::EVENT_GATEWAY_ERROR, + $gateway::SYSTEM_LOG_TYPE, + $this->authorize->client, + $this->authorize->client->company, + ); + throw new PaymentFailed($description, $code); } diff --git a/config/ninja.php b/config/ninja.php index eb3f54f5b066..3533b1a7b2f7 100644 --- a/config/ninja.php +++ b/config/ninja.php @@ -14,8 +14,8 @@ return [ 'require_https' => env('REQUIRE_HTTPS', true), 'app_url' => rtrim(env('APP_URL', ''), '/'), 'app_domain' => env('APP_DOMAIN', 'invoicing.co'), - 'app_version' => '5.2.18', - 'app_tag' => '5.2.18', + 'app_version' => '5.2.19', + 'app_tag' => '5.2.19', 'minimum_client_version' => '5.0.16', 'terms_version' => '1.0.1', 'api_secret' => env('API_SECRET', ''),