diff --git a/app/DataMapper/EmailTemplateDefaults.php b/app/DataMapper/EmailTemplateDefaults.php
index a63b7f89011d..0d34fcfe4897 100644
--- a/app/DataMapper/EmailTemplateDefaults.php
+++ b/app/DataMapper/EmailTemplateDefaults.php
@@ -140,7 +140,7 @@ class EmailTemplateDefaults
public static function emailPaymentFailedTemplate()
{
- return '
$client
'.ctrans('texts.client_payment_failure_body', ['invoice' => '$number', 'amount' => '$amount']).'
$gateway_payment_error
$payment_button
';
+ return '$client
'.ctrans('texts.client_payment_failure_body', ['invoice' => '$number', 'amount' => '$amount']).'
$payment_error
$payment_button
';
}
public static function emailQuoteReminder1Subject()
@@ -151,7 +151,7 @@ class EmailTemplateDefaults
public static function emailQuoteReminder1Body()
{
- return '$client
'.self::transformText('quote_reminder_message').'
$view_button
';
+ return '$client
'.self::transformText('quote_reminder_message').'
$view_button
';
}
@@ -177,14 +177,14 @@ class EmailTemplateDefaults
public static function emailInvoiceTemplate()
{
- $invoice_message = '$client
'.self::transformText('invoice_message').'
$view_button
';
+ $invoice_message = '$client
'.self::transformText('invoice_message').'
$view_button
';
return $invoice_message;
}
public static function emailInvoiceReminderTemplate()
{
- $invoice_message = '$client
'.self::transformText('reminder_message').'
$view_button
';
+ $invoice_message = '$client
'.self::transformText('reminder_message').'
$view_button
';
return $invoice_message;
}
@@ -196,7 +196,7 @@ class EmailTemplateDefaults
public static function emailQuoteTemplate()
{
- $quote_message = '$client
'.self::transformText('quote_message').'
$view_button
';
+ $quote_message = '$client
'.self::transformText('quote_message').'
$view_button
';
return $quote_message;
}
@@ -213,28 +213,28 @@ class EmailTemplateDefaults
public static function emailPurchaseOrderTemplate()
{
- $purchase_order_message = '$vendor
'.self::transformText('purchase_order_message').'
$view_button
';
+ $purchase_order_message = '$vendor
'.self::transformText('purchase_order_message').'
$view_button
';
return $purchase_order_message;
}
public static function emailPaymentTemplate()
{
- $payment_message = '$client
'.self::transformText('payment_message').'
$invoices
$view_button
';
+ $payment_message = '$client
'.self::transformText('payment_message').'
$invoices
$view_button
';
return $payment_message;
}
public static function emailCreditTemplate()
{
- $credit_message = '$client
'.self::transformText('credit_message').'
$view_button
';
+ $credit_message = '$client
'.self::transformText('credit_message').'
$view_button
';
return $credit_message;
}
public static function emailPaymentPartialTemplate()
{
- $payment_message = '$client
'.self::transformText('payment_message').'
$invoices
$view_button
';
+ $payment_message = '$client
'.self::transformText('payment_message').'
$invoices
$view_button
';
return $payment_message;
}
diff --git a/app/Mail/Admin/ClientPaymentFailureObject.php b/app/Mail/Admin/ClientPaymentFailureObject.php
index 842d0f84fb26..a6673609304f 100644
--- a/app/Mail/Admin/ClientPaymentFailureObject.php
+++ b/app/Mail/Admin/ClientPaymentFailureObject.php
@@ -123,7 +123,7 @@ class ClientPaymentFailureObject
$signature = $this->client->getSetting('email_signature');
$html_variables = (new HtmlEngine($invitation))->makeValues();
- $html_variables['$gateway_payment_error'] = $this->error ?? '';
+ $html_variables['$payment_error'] = $this->error ?? '';
$html_variables['$total'] = $this->getAmount();
$signature = str_replace(array_keys($html_variables), array_values($html_variables), $signature);
diff --git a/app/PaymentDrivers/MolliePaymentDriver.php b/app/PaymentDrivers/MolliePaymentDriver.php
index bc2c7404e3e4..8f98a2faebd1 100644
--- a/app/PaymentDrivers/MolliePaymentDriver.php
+++ b/app/PaymentDrivers/MolliePaymentDriver.php
@@ -287,7 +287,7 @@ class MolliePaymentDriver extends BaseDriver
{
// Allow app to catch up with webhook request.
// sleep(4);
- usleep(2800000, 4000000);
+ usleep(rand(2800000, 4000000));
$validator = Validator::make($request->all(), [
'id' => ['required', 'starts_with:tr'],
diff --git a/app/Services/EDocument/Gateway/Storecove/Storecove.php b/app/Services/EDocument/Gateway/Storecove/Storecove.php
index 335012f473dc..d362eea22f26 100644
--- a/app/Services/EDocument/Gateway/Storecove/Storecove.php
+++ b/app/Services/EDocument/Gateway/Storecove/Storecove.php
@@ -261,7 +261,7 @@ class Storecove
*
* @param int $id
* @param array $data
- * @return array
+ * @return mixed
*/
public function updateLegalEntity(int $id, array $data)
{
diff --git a/app/Services/EDocument/Standards/Peppol.php b/app/Services/EDocument/Standards/Peppol.php
index 11adde48f8b7..fe8e7b058650 100644
--- a/app/Services/EDocument/Standards/Peppol.php
+++ b/app/Services/EDocument/Standards/Peppol.php
@@ -335,7 +335,7 @@ class Peppol extends AbstractService
/**
* getInvoice
*
- * @return InvoiceNinja\EInvoice\Models\Peppol\Invoice
+ * @return \InvoiceNinja\EInvoice\Models\Peppol\Invoice
*/
public function getInvoice(): \InvoiceNinja\EInvoice\Models\Peppol\Invoice
{
diff --git a/app/Utils/HtmlEngine.php b/app/Utils/HtmlEngine.php
index e39f257e068a..5d1c7a5ce003 100644
--- a/app/Utils/HtmlEngine.php
+++ b/app/Utils/HtmlEngine.php
@@ -733,7 +733,7 @@ class HtmlEngine
$data['$payment.number'] = ['value' => '', 'label' => ctrans('texts.payment_number')];
$data['$payment.transaction_reference'] = ['value' => '', 'label' => ctrans('texts.transaction_reference')];
$data['$payment.refunded'] = ['value' => '', 'label' => ctrans('texts.refund')];
- $data['$gateway_payment_error'] = ['value' => '', 'label' => ctrans('texts.error')];
+ $data['$payment_error'] = ['value' => '', 'label' => ctrans('texts.error')];
if ($this->entity_string == 'invoice' && $this->entity->net_payments()->exists()) {
$payment_list = '
';
@@ -1166,7 +1166,7 @@ class HtmlEngine
}
return '
-