mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fix for double Update Entity Webhook call
This commit is contained in:
parent
369acc27be
commit
a6c9e0e8b3
@ -42,7 +42,7 @@ class CreditEmailedNotification implements ShouldQueue
|
||||
|
||||
$credit = $event->invitation->credit;
|
||||
$credit->last_sent_date = now();
|
||||
$credit->save();
|
||||
$credit->saveQuietly();
|
||||
|
||||
$nmo = new NinjaMailerObject;
|
||||
$nmo->mailable = new NinjaMailer( (new EntitySentObject($event->invitation, 'credit', $event->template))->build() );
|
||||
|
@ -42,7 +42,7 @@ class InvoiceEmailedNotification implements ShouldQueue
|
||||
|
||||
$invoice = $event->invitation->invoice;
|
||||
$invoice->last_sent_date = now();
|
||||
$invoice->save();
|
||||
$invoice->saveQuietly();
|
||||
|
||||
$nmo = new NinjaMailerObject;
|
||||
$nmo->mailable = new NinjaMailer( (new EntitySentObject($event->invitation, 'invoice', $event->template))->build() );
|
||||
|
@ -42,7 +42,7 @@ class QuoteEmailedNotification implements ShouldQueue
|
||||
|
||||
$quote = $event->invitation->quote;
|
||||
$quote->last_sent_date = now();
|
||||
$quote->save();
|
||||
$quote->saveQuietly();
|
||||
|
||||
$nmo = new NinjaMailerObject;
|
||||
$nmo->mailable = new NinjaMailer( (new EntitySentObject($event->invitation, 'quote', $event->template))->build() );
|
||||
|
@ -405,6 +405,10 @@ class BaseDriver extends AbstractPaymentDriver
|
||||
public function sendFailureMail(string $error)
|
||||
{
|
||||
|
||||
if (!is_null($this->payment_hash)) {
|
||||
$this->unWindGatewayFees($this->payment_hash);
|
||||
}
|
||||
|
||||
PaymentFailedMailer::dispatch(
|
||||
$this->payment_hash,
|
||||
$this->client->company,
|
||||
@ -419,7 +423,6 @@ class BaseDriver extends AbstractPaymentDriver
|
||||
|
||||
if ($this->payment_hash && is_array($this->payment_hash->invoices())) {
|
||||
|
||||
|
||||
$nmo = new NinjaMailerObject;
|
||||
$nmo->mailable = new NinjaMailer((new ClientPaymentFailureObject($this->client, $error, $this->client->company, $this->payment_hash))->build());
|
||||
$nmo->company = $this->client->company;
|
||||
|
Loading…
x
Reference in New Issue
Block a user