diff --git a/app/PaymentDrivers/Authorize/AuthorizeCreditCard.php b/app/PaymentDrivers/Authorize/AuthorizeCreditCard.php index 160790415bac..1eeb7b5cabaf 100644 --- a/app/PaymentDrivers/Authorize/AuthorizeCreditCard.php +++ b/app/PaymentDrivers/Authorize/AuthorizeCreditCard.php @@ -120,7 +120,7 @@ class AuthorizeCreditCard $payment->client_id = $this->authorize->client->id; $payment->company_gateway_id = $this->authorize->company_gateway->id; $payment->status_id = Payment::STATUS_COMPLETED; - $payment->gateway_type_id = $this->authorize->payment_method; + $payment->gateway_type_id = GatewayType::CREDIT_CARD; $payment->type_id = PaymentType::CREDIT_CARD_OTHER; $payment->currency_id = $this->authorize->client->getSetting('currency_id'); $payment->date = Carbon::now(); diff --git a/tests/Feature/UserTest.php b/tests/Feature/UserTest.php index 5c9057fb7a4a..aa86249793f0 100644 --- a/tests/Feature/UserTest.php +++ b/tests/Feature/UserTest.php @@ -96,7 +96,7 @@ class UserTest extends TestCase $response = $this->withHeaders([ 'X-API-SECRET' => config('ninja.api_secret'), 'X-API-TOKEN' => $this->token, - 'X-API-PASSWORD' => 'ALongAndBriliantPassword', + 'X-API-PASSWORD' => 'ALongAndBriliantPassword', ])->post('/api/v1/users/'.$this->encodePrimaryKey($user->id).'/attach_to_company?include=company_user'); $response->assertStatus(200); diff --git a/tests/MockAccountData.php b/tests/MockAccountData.php index b73505faf8a4..62b96fa5e553 100644 --- a/tests/MockAccountData.php +++ b/tests/MockAccountData.php @@ -120,11 +120,12 @@ trait MockAccountData if (!$this->user) { $this->user = factory(\App\Models\User::class)->create([ 'account_id' => $this->account->id, - 'password' => Hash::make('ALongAndBriliantPassword'), 'confirmation_code' => $this->createDbHash(config('database.default')) ]); } + $this->user->password = Hash::make('ALongAndBriliantPassword'); + $cu = CompanyUserFactory::create($this->user->id, $this->company->id, $this->account->id); $cu->is_owner = true; $cu->is_admin = true;