Adjustments for authorize

This commit is contained in:
David Bomba 2021-08-17 19:48:40 +10:00
parent 09babb4afe
commit e55da32e55
3 changed files with 24 additions and 3 deletions

View File

@ -1 +1 @@
5.2.18
5.2.19

View File

@ -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);
}

View File

@ -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', ''),