mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for creating new company gateways
This commit is contained in:
parent
4c1fef5cf4
commit
4057cf351b
@ -23,6 +23,7 @@ class CompanyGatewayFactory
|
|||||||
$company_gateway->user_id = $user_id;
|
$company_gateway->user_id = $user_id;
|
||||||
$company_gateway->require_billing_address = false;
|
$company_gateway->require_billing_address = false;
|
||||||
$company_gateway->require_shipping_address = false;
|
$company_gateway->require_shipping_address = false;
|
||||||
|
$company_gateway->config = encrypt(json_encode(new \stdClass));
|
||||||
// $company_gateway->fees_and_limits = new FeesAndLimits;
|
// $company_gateway->fees_and_limits = new FeesAndLimits;
|
||||||
|
|
||||||
return $company_gateway;
|
return $company_gateway;
|
||||||
|
@ -250,7 +250,7 @@ class CompanyGateway extends BaseModel
|
|||||||
{
|
{
|
||||||
$config = $this->getConfig();
|
$config = $this->getConfig();
|
||||||
|
|
||||||
if ($this->gateway->provider == 'Stripe' && property_exists($config, 'publishableKey') && strpos($config->publishableKey, 'test')) {
|
if ($this->gateway && $this->gateway->provider == 'Stripe' && property_exists($config, 'publishableKey') && strpos($config->publishableKey, 'test')) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user