1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 08:21:34 +02:00

System Log Checkout Failures

This commit is contained in:
David Bomba 2022-10-18 20:30:55 +11:00
parent 830676f673
commit 76525ceacf
3 changed files with 18 additions and 6 deletions

View File

@ -86,7 +86,7 @@ class CreateAccount
$sp794f3f->hosted_company_count = config('ninja.quotas.free.max_companies');
$sp794f3f->account_sms_verified = true;
if(in_array($this->getDomain($this->request['email']), ['gmail.com', 'hotmail.com', 'outlook.com', 'yahoo.com', 'aol.com', 'mail.ru'])){
if(in_array($this->getDomain($this->request['email']), ['yopmail.com','gmail.com', 'hotmail.com', 'outlook.com', 'yahoo.com', 'aol.com', 'mail.ru'])){
$sp794f3f->account_sms_verified = false;
}

View File

@ -602,11 +602,11 @@ class BaseDriver extends AbstractPaymentDriver
}
}
if ($this->company_gateway->require_contact_email) {
if ($this->checkRequiredResource($this->email)) {
$this->required_fields[] = 'contact_email';
}
}
// if ($this->company_gateway->require_contact_email) {
// if ($this->checkRequiredResource($this->email)) {
// $this->required_fields[] = 'contact_email';
// }
// }
// if ($this->company_gateway->require_contact_name) {
// if ($this->checkRequiredResource($this->first_name)) {

View File

@ -14,9 +14,11 @@ namespace App\PaymentDrivers\CheckoutCom;
use App\Exceptions\PaymentFailed;
use App\Http\Requests\ClientPortal\Payments\PaymentResponseRequest;
use App\Jobs\Util\SystemLogger;
use App\Models\ClientGatewayToken;
use App\Models\GatewayType;
use App\Models\Payment;
use App\Models\SystemLog;
use App\PaymentDrivers\CheckoutComPaymentDriver;
use App\PaymentDrivers\Common\MethodInterface;
use App\Utils\Traits\MakesHash;
@ -242,6 +244,16 @@ class CreditCard implements MethodInterface
if ($response['status'] == 'Declined') {
$this->checkout->unWindGatewayFees($this->checkout->payment_hash);
//18-10-2022
SystemLogger::dispatch(
$response,
SystemLog::CATEGORY_GATEWAY_RESPONSE,
SystemLog::EVENT_GATEWAY_ERROR,
SystemLog::TYPE_CHECKOUT,
$this->checkout->client,
$this->checkout->client->company,
);
return $this->processUnsuccessfulPayment($response);
}
} catch (CheckoutApiException $e) {