mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-08-05 10:20:14 -04:00
Working on tests
This commit is contained in:
parent
9b9a27a38b
commit
5eab95f5d8
@ -254,23 +254,18 @@ class BasePaymentDriver
|
||||
|
||||
protected function gateway()
|
||||
{
|
||||
\Log::info('gateway...');
|
||||
if ($this->gateway) {
|
||||
\Log::info('g1');
|
||||
return $this->gateway;
|
||||
}
|
||||
|
||||
\Log::info('g2: ' . $this->accountGateway->gateway->provider);
|
||||
$this->gateway = Omnipay::create($this->accountGateway->gateway->provider);
|
||||
\Log::info('g3');
|
||||
$this->gateway->initialize((array) $this->accountGateway->getConfig());
|
||||
\Log::info('g4');
|
||||
|
||||
return $this->gateway;
|
||||
}
|
||||
|
||||
public function completeOnsitePurchase($input = false, $paymentMethod = false)
|
||||
{
|
||||
\Log::info('completeOnsitePurchase...');
|
||||
$this->input = count($input) ? $input : false;
|
||||
$gateway = $this->gateway();
|
||||
|
||||
@ -311,7 +306,7 @@ class BasePaymentDriver
|
||||
if ($this->isTwoStep() || request()->capture) {
|
||||
return;
|
||||
}
|
||||
\Log::info('starting paymnet...');
|
||||
|
||||
// prepare and process payment
|
||||
$data = $this->paymentDetails($paymentMethod);
|
||||
// TODO move to payment driver class
|
||||
|
@ -128,10 +128,18 @@ class AccountRepository
|
||||
|
||||
private function checkForSpammer()
|
||||
{
|
||||
$count = Account::whereIp(Request::getClientIp())->count();
|
||||
|
||||
if ($count > 1) {
|
||||
$ip = Request::getClientIp();
|
||||
$count = Account::whereIp($ip)->count();
|
||||
|
||||
if ($count > 1 && $errorEmail = env('ERROR_EMAIL')) {
|
||||
\Mail::raw($ip, function ($message) use ($ip, $errorEmail) {
|
||||
$message->to($errorEmail)
|
||||
->from(CONTACT_EMAIL)
|
||||
->subject('Duplicate company for IP: ' . $ip);
|
||||
});
|
||||
if ($count >= 5) {
|
||||
abort();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
||||
"fzaninotto/faker": "^1.5",
|
||||
"gatepay/FedACHdir": "dev-master@dev",
|
||||
"google/apiclient": "^2.0",
|
||||
"guzzlehttp/guzzle": "~6.0",
|
||||
"guzzlehttp/guzzle": "^6.3",
|
||||
"intervention/image": "dev-master",
|
||||
"invoiceninja/omnipay-collection": "0.7@dev",
|
||||
"jaybizzle/laravel-crawler-detect": "1.*",
|
||||
|
4
composer.lock
generated
4
composer.lock
generated
@ -4,8 +4,8 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"hash": "90db9851db82d5398c2c173955211b0f",
|
||||
"content-hash": "958cf422514450eb39c743ebd6c3a3c8",
|
||||
"hash": "d690d598db58964feb20dbbcdce8a92f",
|
||||
"content-hash": "859622bff39b3e438703dcc641ada711",
|
||||
"packages": [
|
||||
{
|
||||
"name": "abdala/omnipay-pagseguro",
|
||||
|
Loading…
x
Reference in New Issue
Block a user