Minor fixes for tests

This commit is contained in:
David Bomba 2021-10-17 13:59:43 +11:00
parent ba2f78dad0
commit 895cc7d926
3 changed files with 9 additions and 9 deletions

View File

@ -98,5 +98,7 @@ class PaymentFailureMailer implements ShouldQueue
}
});
//add client payment failures here.
}
}

View File

@ -116,6 +116,11 @@ class CreditCard
throw new PaymentFailed(ctrans('texts.generic_gateway_error'), $e->getCode());
}
PaymentFailureMailer::dispatch($this->braintree->client,
$e->getMessage(),
$this->braintree->client->company,
$this->braintree->payment_hash->data->amount_with_fee);
throw new PaymentFailed($e->getMessage(), $e->getCode());
}
@ -197,13 +202,6 @@ class CreditCard
{
PaymentFailureMailer::dispatch($this->braintree->client, $response->transaction->additionalProcessorResponse, $this->braintree->client->company, $this->braintree->payment_hash->data->amount_with_fee);
PaymentFailureMailer::dispatch(
$this->braintree->client,
$response,
$this->braintree->client->company,
$this->braintree->payment_hash->data->amount_with_fee,
);
$message = [
'server_response' => $response,
'data' => $this->braintree->payment_hash->data,

View File

@ -397,7 +397,7 @@ trait MockAccountData
$this->quote = $this->quote_calc->getQuote();
$this->quote->status_id = Quote::STATUS_SENT;
$this->quote->number = $this->getNextQuoteNumber($this->client);
$this->quote->number = $this->getNextQuoteNumber($this->client, $this->quote);
//$this->quote->service()->createInvitations()->markSent();
@ -448,7 +448,7 @@ trait MockAccountData
$this->client->service()->adjustCreditBalance($this->credit->balance)->save();
$this->credit->ledger()->updateCreditBalance($this->credit->balance)->save();
$this->credit->number = $this->getNextCreditNumber($this->client);
$this->credit->number = $this->getNextCreditNumber($this->client, $this->credit);
CreditInvitation::factory()->create([