From ef4c0c423744f89ac41e4aada698af39fbce5a74 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Mon, 15 Aug 2016 23:14:08 +0300 Subject: [PATCH] Fixed PayFast integration --- app/Ninja/PaymentDrivers/PayFastPaymentDriver.php | 6 +++--- database/seeds/UserTableSeeder.php | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/Ninja/PaymentDrivers/PayFastPaymentDriver.php b/app/Ninja/PaymentDrivers/PayFastPaymentDriver.php index 79b49b2349..c7780307fb 100644 --- a/app/Ninja/PaymentDrivers/PayFastPaymentDriver.php +++ b/app/Ninja/PaymentDrivers/PayFastPaymentDriver.php @@ -6,8 +6,8 @@ class PayFastPaymentDriver extends BasePaymentDriver public function completeOffsitePurchase($input) { - if ($accountGateway->isGateway(GATEWAY_PAYFAST) && Request::has('pt')) { - $token = Request::query('pt'); - } + parent::completeOffsitePurchase([ + 'token' => Request::query('pt') + ]); } } diff --git a/database/seeds/UserTableSeeder.php b/database/seeds/UserTableSeeder.php index ec4f0ae8f4..80b88b2336 100644 --- a/database/seeds/UserTableSeeder.php +++ b/database/seeds/UserTableSeeder.php @@ -10,6 +10,7 @@ use App\Models\InvoiceDesign; use App\Models\Client; use App\Models\Contact; use App\Models\Product; +use App\Models\DateFormat; use Faker\Factory; class UserTableSeeder extends Seeder @@ -42,6 +43,7 @@ class UserTableSeeder extends Seeder 'primary_color' => $faker->hexcolor, 'timezone_id' => 1, 'company_id' => $company->id, + //'date_format_id' => DateFormat::all()->random()->id, ]); $user = User::create([