Minor fixes

This commit is contained in:
David Bomba 2022-11-09 08:09:42 +11:00
parent 237725a9c8
commit dd4d5534fb
7 changed files with 13 additions and 5 deletions

View File

@ -54,7 +54,7 @@ class StripeConnectController extends BaseController
if ($company_gateway) {
$config = $company_gateway->getConfig();
if (property_exists($config, 'account_id') && strlen($config->account_id) > 1) {
if (property_exists($config, 'account_id') && strlen($config->account_id) > 5) {
return view('auth.connect.existing');
}
}

View File

@ -271,7 +271,8 @@ class Import implements ShouldQueue
}
/*After a migration first some basic jobs to ensure the system is up to date*/
VersionCheck::dispatch();
if(Ninja::isSelfHost())
VersionCheck::dispatch();
info('Completed🚀🚀🚀🚀🚀 at '.now());

View File

@ -45,7 +45,7 @@ class InvoiceObserver
* @return void
*/
public function updated(Invoice $invoice)
{
{nlog("updated");
$subscriptions = Webhook::where('company_id', $invoice->company_id)
->where('event_id', Webhook::EVENT_UPDATE_INVOICE)
->exists();

View File

@ -288,7 +288,7 @@ class GoCardlessPaymentDriver extends BaseDriver
if(!$hash){
nlog("GoCardless: couldn't find a hash, need to abort => Billing Request => " . $event['links']['billing_request']);
return;
return response()->json([], 200);
}
$this->go_cardless->setPaymentHash($hash);
@ -328,7 +328,7 @@ class GoCardlessPaymentDriver extends BaseDriver
//return early if nothing to do
if($invoices->count() == 0){
nlog("GoCardless: Could not harvest any invoices - probably all paid!!");
return;
return response()->json([], 200);
}
$this->processSuccessfulPayment($payment);

View File

@ -143,6 +143,8 @@ class MarkPaid extends AbstractService
// TransactionLog::dispatch(TransactionEvent::INVOICE_MARK_PAID, $transaction, $this->invoice->company->db);
event('eloquent.updated: App\Models\Invoice', $this->invoice);
return $this->invoice;
}

View File

@ -1,5 +1,7 @@
<?php
use App\Models\Gateway;
use App\Utils\Ninja;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
@ -29,6 +31,8 @@ return new class extends Migration
Schema::table('bank_integrations', function (Blueprint $table) {
$table->boolean('auto_sync')->default(false);
});
}
/**

View File

@ -82,6 +82,7 @@ class PaymentLibrariesSeeder extends Seeder
['id' => 55, 'name' => 'Custom', 'provider' => 'Custom', 'is_offsite' => true, 'sort_order' => 21, 'key' => '54faab2ab6e3223dbe848b1686490baa', 'fields' => '{"name":"","text":""}'],
['id' => 57, 'name' => 'Square', 'provider' => 'Square', 'is_offsite' => false, 'sort_order' => 21, 'key' => '65faab2ab6e3223dbe848b1686490baz', 'fields' => '{"accessToken":"","applicationId":"","locationId":"","testMode":false}'],
['id' => 58, 'name' => 'Razorpay', 'provider' => 'Razorpay', 'is_offsite' => false, 'sort_order' => 21, 'key' => 'hxd6gwg3ekb9tb3v9lptgx1mqyg69zu9', 'fields' => '{"apiKey":"","apiSecret":""}'],
['id' => 59, 'name' => 'Forte', 'provider' => 'Forte', 'is_offsite' => false, 'sort_order' => 21, 'key' => 'kivcvjexxvdiyqtj3mju5d6yhpeht2xs', 'fields' => '{"testMode":false,"apiLoginId":"","apiAccessId":"","secureKey":"","authOrganizationId":"","organizationId":"","locationId":""}'],
];
foreach ($gateways as $gateway) {