diff --git a/app/Console/Commands/CreateSingleAccount.php b/app/Console/Commands/CreateSingleAccount.php index 4fb8d08e567e..fb5c264fc567 100644 --- a/app/Console/Commands/CreateSingleAccount.php +++ b/app/Console/Commands/CreateSingleAccount.php @@ -696,6 +696,27 @@ class CreateSingleAccount extends Command $cg->fees_and_limits = $fees_and_limits; $cg->save(); } + + if (config('ninja.testvars.wepay') && ($this->gateway == 'all' || $this->gateway == 'wepay')) { + $cg = new CompanyGateway; + $cg->company_id = $company->id; + $cg->user_id = $user->id; + $cg->gateway_key = '8fdeed552015b3c7b44ed6c8ebd9e992'; + $cg->require_cvv = true; + $cg->require_billing_address = true; + $cg->require_shipping_address = true; + $cg->update_details = true; + $cg->config = encrypt(config('ninja.testvars.wepay')); + $cg->save(); + + $gateway_types = $cg->driver(new Client)->gatewayTypes(); + + $fees_and_limits = new stdClass; + $fees_and_limits->{$gateway_types[0]} = new FeesAndLimits; + + $cg->fees_and_limits = $fees_and_limits; + $cg->save(); + } } private function createRecurringInvoice($client) diff --git a/config/ninja.php b/config/ninja.php index 53dd12331057..5872d60779f0 100644 --- a/config/ninja.php +++ b/config/ninja.php @@ -82,6 +82,7 @@ return [ 'checkout' => env('CHECKOUT_KEYS', ''), 'travis' => env('TRAVIS', false), 'test_email' => env('TEST_EMAIL', 'test@example.com'), + 'wepay' => env('WEPAY_KEYS', ''), ], 'contact' => [ 'email' => env('MAIL_FROM_ADDRESS'),