Fixes for subs v4

This commit is contained in:
David Bomba 2024-05-05 08:18:32 +10:00
parent 526d86c5a3
commit e563dea2b8
3 changed files with 9 additions and 6 deletions

View File

@ -51,9 +51,9 @@ class ClientRegisterService
} }
} }
if ($this->company->settings->client_portal_terms || $this->company->settings->client_portal_privacy_policy) { // if ($this->company->settings->client_portal_terms || $this->company->settings->client_portal_privacy_policy) {
$rules['terms'] = ['required']; // $rules['terms'] = ['required'];
} // }
foreach ($this->additional as $field) { foreach ($this->additional as $field) {
if ($field['visible'] ?? true) { if ($field['visible'] ?? true) {

View File

@ -202,6 +202,10 @@ class RegisterOrLogin extends Component
$this->register_fields = [...collect($this->subscription->company->client_registration_fields ?? [])->toArray()]; $this->register_fields = [...collect($this->subscription->company->client_registration_fields ?? [])->toArray()];
// if ($this->subscription->company->settings->client_portal_terms || $this->subscription->company->settings->client_portal_privacy_policy) {
// $this->register_fields[] = ['key' => 'terms', 'required' => true, 'visible' => 'true'];
// }
$first_gateway = collect($this->subscription->company->company_gateways) $first_gateway = collect($this->subscription->company->company_gateways)
->sortBy('sort_order') ->sortBy('sort_order')
->first(); ->first();

View File

@ -680,7 +680,7 @@ class StripePaymentDriver extends BaseDriver
} }
if ($request->type === 'payment_intent.processing') { if ($request->type === 'payment_intent.processing') {
PaymentIntentProcessingWebhook::dispatch($request->data, $request->company_key, $this->company_gateway->id)->delay(now()->addSeconds(2)); PaymentIntentProcessingWebhook::dispatch($request->data, $request->company_key, $this->company_gateway->id)->delay(now()->addSeconds(rand(10,12)));
return response()->json([], 200); return response()->json([], 200);
} }
@ -692,7 +692,7 @@ class StripePaymentDriver extends BaseDriver
} }
if ($request->type === 'payment_intent.partially_funded') { if ($request->type === 'payment_intent.partially_funded') {
PaymentIntentPartiallyFundedWebhook::dispatch($request->data, $request->company_key, $this->company_gateway->id)->delay(now()->addSeconds(rand(5, 10))); PaymentIntentPartiallyFundedWebhook::dispatch($request->data, $request->company_key, $this->company_gateway->id)->delay(now()->addSeconds(rand(10, 15)));
return response()->json([], 200); return response()->json([], 200);
} }
@ -715,7 +715,6 @@ class StripePaymentDriver extends BaseDriver
->first(); ->first();
} else { } else {
$payment = Payment::query() $payment = Payment::query()
// ->where('company_id', $request->getCompany()->id)
->where('transaction_reference', $transaction['id']) ->where('transaction_reference', $transaction['id'])
->first(); ->first();
} }