From 63087de0bcf1b535acb654f95ccf6a483ca86f96 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 12 Jan 2021 09:06:56 +1100 Subject: [PATCH] Fix for tests (typo) --- app/PaymentDrivers/BaseDriver.php | 12 ++++++++++++ app/PaymentDrivers/Stripe/CreditCard.php | 2 ++ .../2021_01_11_092056_fix_company_settings_url.php | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) 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) {