Minor fixes for importing bank accounts on stripe

This commit is contained in:
David Bomba 2025-04-29 10:26:37 +10:00
parent cdb99be032
commit 8b9d36edc2
4 changed files with 5 additions and 11 deletions

View File

@ -210,9 +210,7 @@ class NinjaMailerJob implements ShouldQueue
} }
} catch(\ErrorException $e){ } catch(\ErrorException $e){ //@todo - remove after symfony/mailer is updated with bug fix
nlog("indeed i am a error exception NinjaMailerJob");
$message = "Attachment size is too large."; $message = "Attachment size is too large.";
$this->fail(); $this->fail();

View File

@ -148,7 +148,7 @@ class UpdatePaymentMethods
$additional_data = ['gateway_customer_reference' => $customer->id]; $additional_data = ['gateway_customer_reference' => $customer->id];
if ($customer->default_source === $method->id) { if ($customer->default_source === $method->id) {
$additional_data = ['gateway_customer_reference' => $customer->id, 'is_default' => 1]; $additional_data = ['gateway_customer_reference' => $customer->id, 'is_default' => 0];
} }
$this->stripe->storeGatewayToken($data, $additional_data); $this->stripe->storeGatewayToken($data, $additional_data);
@ -191,7 +191,7 @@ class UpdatePaymentMethods
$additional_data = ['gateway_customer_reference' => $customer->id]; $additional_data = ['gateway_customer_reference' => $customer->id];
if ($customer->default_source === $method->id) { if ($customer->default_source === $method->id) {
$additional_data = ['gateway_customer_reference' => $customer->id, 'is_default' => 1]; $additional_data = ['gateway_customer_reference' => $customer->id, 'is_default' => 0];
} }
$this->stripe->storeGatewayToken($data, $additional_data); $this->stripe->storeGatewayToken($data, $additional_data);

View File

@ -346,8 +346,8 @@ class Email implements ShouldQueue
$message = null; $message = null;
} }
} catch(\ErrorException $e){ } catch(\ErrorException $e){ //@todo - remove after symfony/mailer is updated with bug fix
nlog("indeed i am a error exception Email Class");
$message = "Attachment size is too large."; $message = "Attachment size is too large.";
$this->fail(); $this->fail();
$this->logMailError($message, $this->company->clients()->first()); $this->logMailError($message, $this->company->clients()->first());

View File

@ -311,10 +311,6 @@ class EmailDefaults
if ($this->email->email_object->settings->pdf_email_attachment) { if ($this->email->email_object->settings->pdf_email_attachment) {
$pdf = ((new CreateRawPdf($this->email->email_object->invitation))->handle()); $pdf = ((new CreateRawPdf($this->email->email_object->invitation))->handle());
// if ($this->email->email_object->settings->embed_documents && ($this->email->email_object->entity->documents()->where('is_public', true)->count() > 0 || $this->email->email_object->entity->company->documents()->where('is_public', true)->count() > 0)) {
// $pdf = $this->email->email_object->entity->documentMerge($pdf);
// }
$this->email->email_object->attachments = array_merge($this->email->email_object->attachments, [['file' => base64_encode($pdf), 'name' => $this->email->email_object->entity->numberFormatter().'.pdf']]); $this->email->email_object->attachments = array_merge($this->email->email_object->attachments, [['file' => base64_encode($pdf), 'name' => $this->email->email_object->entity->numberFormatter().'.pdf']]);
} }