mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-10-31 18:07:35 -04:00 
			
		
		
		
	
						commit
						2bc95e4f42
					
				| @ -1 +1 @@ | |||||||
| 5.3.46 | 5.3.47 | ||||||
| @ -35,7 +35,13 @@ class Locale | |||||||
|         } elseif (auth('contact')->user()) { |         } elseif (auth('contact')->user()) { | ||||||
|             App::setLocale(auth('contact')->user()->client->locale()); |             App::setLocale(auth('contact')->user()->client->locale()); | ||||||
|         } elseif (auth()->user()) { |         } elseif (auth()->user()) { | ||||||
|             App::setLocale(auth()->user()->company()->getLocale()); | 
 | ||||||
|  |             try{ | ||||||
|  |                 App::setLocale(auth()->user()->company()->getLocale()); | ||||||
|  |             } | ||||||
|  |             catch(\Exception $e){ | ||||||
|  |             } | ||||||
|  | 
 | ||||||
|         } else { |         } else { | ||||||
|             App::setLocale(config('ninja.i18n.locale')); |             App::setLocale(config('ninja.i18n.locale')); | ||||||
|         } |         } | ||||||
|  | |||||||
| @ -210,6 +210,12 @@ class NinjaMailerJob implements ShouldQueue | |||||||
|                 $user = $user->fresh(); |                 $user = $user->fresh(); | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|  |                 //17-01-2022 - ensure we have a token otherwise we fail gracefully to default sending engine
 | ||||||
|  |                 if(strlen($user->oauth_user_token) == 0){ | ||||||
|  |                     $this->nmo->settings->email_sending_method = 'default'; | ||||||
|  |                     return $this->setMailDriver(); | ||||||
|  |                 } | ||||||
|  | 
 | ||||||
|             $google->getClient()->setAccessToken(json_encode($user->oauth_user_token)); |             $google->getClient()->setAccessToken(json_encode($user->oauth_user_token)); | ||||||
| 
 | 
 | ||||||
|             //need to slow down gmail requests otherwise we hit 429's
 |             //need to slow down gmail requests otherwise we hit 429's
 | ||||||
|  | |||||||
| @ -48,7 +48,6 @@ class CompanyDeleted extends Mailable | |||||||
|      */ |      */ | ||||||
|     public function build() |     public function build() | ||||||
|     { |     { | ||||||
|         App::setLocale($this->company->getLocale()); |  | ||||||
| 
 | 
 | ||||||
|         return $this->from(config('mail.from.address'), config('mail.from.name')) |         return $this->from(config('mail.from.address'), config('mail.from.name')) | ||||||
|             ->subject(ctrans('texts.company_deleted')) |             ->subject(ctrans('texts.company_deleted')) | ||||||
|  | |||||||
| @ -43,6 +43,8 @@ class Token | |||||||
| 
 | 
 | ||||||
|         $amount = array_sum(array_column($payment_hash->invoices(), 'amount')) + $payment_hash->fee_total; |         $amount = array_sum(array_column($payment_hash->invoices(), 'amount')) + $payment_hash->fee_total; | ||||||
| 
 | 
 | ||||||
|  |         $this->eway_driver->payment_hash = $payment_hash; | ||||||
|  | 
 | ||||||
|     	$transaction = [ |     	$transaction = [ | ||||||
| 		    'Customer' => [ | 		    'Customer' => [ | ||||||
| 		        'TokenCustomerID' => $cgt->token, | 		        'TokenCustomerID' => $cgt->token, | ||||||
| @ -74,10 +76,10 @@ class Token | |||||||
|         $data = [ |         $data = [ | ||||||
|             'gateway_type_id' => GatewayType::CREDIT_CARD, |             'gateway_type_id' => GatewayType::CREDIT_CARD, | ||||||
|             'payment_type' => PaymentType::CREDIT_CARD_OTHER, |             'payment_type' => PaymentType::CREDIT_CARD_OTHER, | ||||||
|             'transaction_reference' => $response->Customer->Reference, |             'transaction_reference' => $response->TransactionID, | ||||||
|             'amount' => $amount, |             'amount' => $amount, | ||||||
|         ]; |         ]; | ||||||
| 
 |          | ||||||
|         $payment = $this->eway_driver->createPayment($data); |         $payment = $this->eway_driver->createPayment($data); | ||||||
|         $payment->meta = $cgt->meta; |         $payment->meta = $cgt->meta; | ||||||
|         $payment->save(); |         $payment->save(); | ||||||
|  | |||||||
| @ -167,12 +167,6 @@ class EwayPaymentDriver extends BaseDriver | |||||||
|             $fields[] = ['name' => 'client_name', 'label' => ctrans('texts.client_name'), 'type' => 'text', 'validation' => 'required']; |             $fields[] = ['name' => 'client_name', 'label' => ctrans('texts.client_name'), 'type' => 'text', 'validation' => 'required']; | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         // if ($this->company_gateway->require_contact_name) {
 |  | ||||||
|         // }
 |  | ||||||
| 
 |  | ||||||
|         // if ($this->company_gateway->require_contact_email) {
 |  | ||||||
|         // }
 |  | ||||||
| 
 |  | ||||||
|         if ($this->company_gateway->require_client_phone) { |         if ($this->company_gateway->require_client_phone) { | ||||||
|             $fields[] = ['name' => 'client_phone', 'label' => ctrans('texts.client_phone'), 'type' => 'tel', 'validation' => 'required']; |             $fields[] = ['name' => 'client_phone', 'label' => ctrans('texts.client_phone'), 'type' => 'tel', 'validation' => 'required']; | ||||||
|         } |         } | ||||||
|  | |||||||
| @ -1,5 +1,7 @@ | |||||||
| <?php | <?php | ||||||
| 
 | 
 | ||||||
|  | use App\Utils\Ninja; | ||||||
|  | 
 | ||||||
| return [ | return [ | ||||||
| 
 | 
 | ||||||
|     /* |     /* | ||||||
| @ -94,9 +96,8 @@ return [ | |||||||
|             'prefix_indexes' => true, |             'prefix_indexes' => true, | ||||||
|             'strict'         => env('DB_STRICT', false), |             'strict'         => env('DB_STRICT', false), | ||||||
|             'engine'         => 'InnoDB ROW_FORMAT=DYNAMIC', |             'engine'         => 'InnoDB ROW_FORMAT=DYNAMIC', | ||||||
|             //  'options'   => array(
 |             'ssl_mode'       => env('SSL_MODE',''), | ||||||
|             //     PDO::ATTR_EMULATE_PREPARES => true
 |             // 'options'        => Ninja::isHosted() ? config('ninja.db_options') : [],
 | ||||||
|             // ),
 |  | ||||||
|         ], |         ], | ||||||
| 
 | 
 | ||||||
|         'db-ninja-01a' => [ |         'db-ninja-01a' => [ | ||||||
| @ -112,9 +113,8 @@ return [ | |||||||
|             'prefix_indexes' => true, |             'prefix_indexes' => true, | ||||||
|             'strict'         => env('DB_STRICT', false), |             'strict'         => env('DB_STRICT', false), | ||||||
|             'engine'         => 'InnoDB ROW_FORMAT=DYNAMIC', |             'engine'         => 'InnoDB ROW_FORMAT=DYNAMIC', | ||||||
|             //  'options'   => array(
 |             'ssl_mode'       => env('SSL_MODE',''), //required
 | ||||||
|             //     PDO::ATTR_EMULATE_PREPARES => true
 |             // 'options'        => Ninja::isHosted() ? config('ninja.db_options') : [],
 | ||||||
|             // ),
 |  | ||||||
|         ], |         ], | ||||||
| 
 | 
 | ||||||
|         'db-ninja-02' => [ |         'db-ninja-02' => [ | ||||||
| @ -130,9 +130,8 @@ return [ | |||||||
|             'prefix_indexes' => true, |             'prefix_indexes' => true, | ||||||
|             'strict'         => env('DB_STRICT', false), |             'strict'         => env('DB_STRICT', false), | ||||||
|             'engine'         => 'InnoDB ROW_FORMAT=DYNAMIC', |             'engine'         => 'InnoDB ROW_FORMAT=DYNAMIC', | ||||||
|             //  'options'   => array(
 |             'ssl_mode'       => env('SSL_MODE',''), | ||||||
|             //     PDO::ATTR_EMULATE_PREPARES => true
 |             // 'options'        => Ninja::isHosted() ? config('ninja.db_options') : [],
 | ||||||
|             // ),
 |  | ||||||
|         ], |         ], | ||||||
| 
 | 
 | ||||||
|         'db-ninja-02a' => [ |         'db-ninja-02a' => [ | ||||||
| @ -148,9 +147,8 @@ return [ | |||||||
|             'prefix_indexes' => true, |             'prefix_indexes' => true, | ||||||
|             'strict'         => env('DB_STRICT', false), |             'strict'         => env('DB_STRICT', false), | ||||||
|             'engine'         => 'InnoDB ROW_FORMAT=DYNAMIC', |             'engine'         => 'InnoDB ROW_FORMAT=DYNAMIC', | ||||||
|             //  'options'   => array(
 |             'ssl_mode'       => env('SSL_MODE',''), | ||||||
|             //     PDO::ATTR_EMULATE_PREPARES => true
 |             // 'options'        => Ninja::isHosted() ? config('ninja.db_options') : [],
 | ||||||
|             // ),
 |  | ||||||
|         ], |         ], | ||||||
|     ], |     ], | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -14,8 +14,8 @@ return [ | |||||||
|     'require_https' => env('REQUIRE_HTTPS', true), |     'require_https' => env('REQUIRE_HTTPS', true), | ||||||
|     'app_url' => rtrim(env('APP_URL', ''), '/'), |     'app_url' => rtrim(env('APP_URL', ''), '/'), | ||||||
|     'app_domain' => env('APP_DOMAIN', 'invoicing.co'), |     'app_domain' => env('APP_DOMAIN', 'invoicing.co'), | ||||||
|     'app_version' => '5.3.46', |     'app_version' => '5.3.47', | ||||||
|     'app_tag' => '5.3.46', |     'app_tag' => '5.3.47', | ||||||
|     'minimum_client_version' => '5.0.16', |     'minimum_client_version' => '5.0.16', | ||||||
|     'terms_version' => '1.0.1', |     'terms_version' => '1.0.1', | ||||||
|     'api_secret' => env('API_SECRET', ''), |     'api_secret' => env('API_SECRET', ''), | ||||||
| @ -59,6 +59,12 @@ return [ | |||||||
|         'default' => env('DB_CONNECTION', 'mysql'), |         'default' => env('DB_CONNECTION', 'mysql'), | ||||||
|     ], |     ], | ||||||
| 
 | 
 | ||||||
|  |     'db_options' => [ | ||||||
|  |                 PDO::MYSQL_ATTR_SSL_KEY => env("DB_CLIENT_KEY", ''), | ||||||
|  |                 PDO::MYSQL_ATTR_SSL_CERT => env("DB_CLIENT_CERT", ''), | ||||||
|  |                 PDO::MYSQL_ATTR_SSL_CA => env("DB_CA_CERT", ''), | ||||||
|  |     ], | ||||||
|  | 
 | ||||||
|     'i18n' => [ |     'i18n' => [ | ||||||
|         'timezone_id' => env('DEFAULT_TIMEZONE', 1), |         'timezone_id' => env('DEFAULT_TIMEZONE', 1), | ||||||
|         'country_id' => env('DEFAULT_COUNTRY', 840), // United Stated
 |         'country_id' => env('DEFAULT_COUNTRY', 840), // United Stated
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user