diff --git a/app/PaymentDrivers/BaseDriver.php b/app/PaymentDrivers/BaseDriver.php index 8366c4f5f6..168d96e435 100644 --- a/app/PaymentDrivers/BaseDriver.php +++ b/app/PaymentDrivers/BaseDriver.php @@ -468,4 +468,16 @@ class BaseDriver extends AbstractPaymentDriver { return $this->company_gateway->id; } + + public function logSuccessfulGatewayResponse($response, $gateway_const) + { + + SystemLogger::dispatch( + $response, + SystemLog::CATEGORY_GATEWAY_RESPONSE, + SystemLog::EVENT_GATEWAY_SUCCESS, + $gateway_const, + $this->client, + ); + } } diff --git a/app/PaymentDrivers/Stripe/CreditCard.php b/app/PaymentDrivers/Stripe/CreditCard.php index fa2755e14d..f64e87e081 100644 --- a/app/PaymentDrivers/Stripe/CreditCard.php +++ b/app/PaymentDrivers/Stripe/CreditCard.php @@ -103,6 +103,8 @@ class CreditCard if ($server_response->status == 'succeeded') { $this->stripe->confirmGatewayFee($request); + $this->stripe->logSuccessfulGatewayResponse(['response' => $request->gateway_response, 'data' => $this->stripe->payment_has], SystemLog::TYPE_STRIPE); + return $this->processSuccessfulPayment(); } diff --git a/database/migrations/2021_01_11_092056_fix_company_settings_url.php b/database/migrations/2021_01_11_092056_fix_company_settings_url.php index 472025550c..a2ac1f1640 100644 --- a/database/migrations/2021_01_11_092056_fix_company_settings_url.php +++ b/database/migrations/2021_01_11_092056_fix_company_settings_url.php @@ -31,7 +31,7 @@ class FixCompanySettingsUrl extends Migration Schema::table('companies', function (Blueprint $table) { $table->dropColumn('logo'); - $tbale->dropColumn('expense_amount_is_pretax'); + $table->dropColumn('expense_amount_is_pretax'); }); Schema::table('tasks', function (Blueprint $table) {