Fixes for Checkout.com

This commit is contained in:
David Bomba 2021-04-22 23:32:34 +10:00
parent 5052124c6d
commit 300cc9fb9e
5 changed files with 10 additions and 11 deletions

View File

@ -291,7 +291,9 @@ class SetupController extends Controller
Artisan::call('migrate', ['--force' => true]); Artisan::call('migrate', ['--force' => true]);
Artisan::call('db:seed', ['--force' => true]); Artisan::call('db:seed', ['--force' => true]);
return redirect('/?clear_cache=true'); $this->buildCache(true);
return redirect('/');
} }
} }

View File

@ -370,7 +370,7 @@ class BaseDriver extends AbstractPaymentDriver
$invoices = Invoice::whereIn('id', $this->transformKeys(array_column($this->payment_hash->invoices(), 'invoice_id')))->get(); $invoices = Invoice::whereIn('id', $this->transformKeys(array_column($this->payment_hash->invoices(), 'invoice_id')))->get();
$invoices->first()->invitations->each(function ($invitation) { $invoices->first()->invitations->each(function ($invitation) use ($nmo){
if ($invitation->contact->send_email && $invitation->contact->email) { if ($invitation->contact->send_email && $invitation->contact->email) {

View File

@ -58,7 +58,7 @@ trait Utilities
private function processSuccessfulPayment(Payment $_payment) private function processSuccessfulPayment(Payment $_payment)
{ {
if ($this->getParent()->payment_hash->data->store_card) { if ($this->getParent()->payment_hash->data->store_card) {
$this->storePaymentMethod($_payment); $this->storeLocalPaymentMethod($_payment);
} }
$data = [ $data = [
@ -118,7 +118,7 @@ trait Utilities
} }
} }
private function storePaymentMethod(Payment $response) private function storeLocalPaymentMethod(Payment $response)
{ {
try { try {
$payment_meta = new stdClass; $payment_meta = new stdClass;

View File

@ -37,11 +37,8 @@ trait AppSetup
{ {
$cached_tables = config('ninja.cached_tables'); $cached_tables = config('ninja.cached_tables');
if(request()->has('clear_cache'))
Artisan::call('optimize');
foreach ($cached_tables as $name => $class) { foreach ($cached_tables as $name => $class) {
if (request()->has('clear_cache') || !Cache::has($name) || $force) { if (!Cache::has($name) || $force) {
// check that the table exists in case the migration is pending // check that the table exists in case the migration is pending
if (!Schema::hasTable((new $class())->getTable())) { if (!Schema::hasTable((new $class())->getTable())) {
@ -64,9 +61,8 @@ trait AppSetup
} }
/*Build template cache*/ /*Build template cache*/
if (request()->has('clear_cache') || !Cache::has('templates')) { $this->buildTemplates();
$this->buildTemplates();
}
} }

View File

@ -1775,6 +1775,7 @@ $LANG = array(
'lang_Chinese - Taiwan' => 'Chinese - Taiwan', 'lang_Chinese - Taiwan' => 'Chinese - Taiwan',
'lang_Serbian' => 'Serbian', 'lang_Serbian' => 'Serbian',
'lang_Bulgarian' => 'Bulgarian', 'lang_Bulgarian' => 'Bulgarian',
'lang_Russian' => 'Russian',
// Industries // Industries
'industry_Accounting & Legal' => 'Accounting & Legal', 'industry_Accounting & Legal' => 'Accounting & Legal',