diff --git a/VERSION.txt b/VERSION.txt index 1885318d63c4..ad9f18701a13 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -5.5.77 \ No newline at end of file +5.5.78 \ No newline at end of file diff --git a/app/PaymentDrivers/BaseDriver.php b/app/PaymentDrivers/BaseDriver.php index f68391de2734..b746e17299ca 100644 --- a/app/PaymentDrivers/BaseDriver.php +++ b/app/PaymentDrivers/BaseDriver.php @@ -32,6 +32,7 @@ use App\Utils\Traits\MakesHash; use App\Exceptions\PaymentFailed; use App\Jobs\Mail\NinjaMailerJob; use App\Models\ClientGatewayToken; +use Illuminate\Support\Facades\App; use App\Jobs\Mail\NinjaMailerObject; use App\Utils\Traits\SystemLogTrait; use App\Events\Invoice\InvoiceWasPaid; @@ -726,6 +727,11 @@ class BaseDriver extends AbstractPaymentDriver */ public function getDescription(bool $abbreviated = true) { + App::forgetInstance('translator'); + $t = app('translator'); + $t->replace(Ninja::transformTranslations($this->client->getMergedSettings())); + App::setLocale($this->client->company->locale()); + if (! $this->payment_hash || !$this->client) { return 'No description'; } diff --git a/app/Services/Subscription/SubscriptionService.php b/app/Services/Subscription/SubscriptionService.php index 08d803d52ef5..87848cf0abdb 100644 --- a/app/Services/Subscription/SubscriptionService.php +++ b/app/Services/Subscription/SubscriptionService.php @@ -88,7 +88,6 @@ class SubscriptionService $recurring_invoice = $recurring_invoice_repo->save([], $recurring_invoice); $recurring_invoice->auto_bill = $this->subscription->auto_bill; - /* Start the recurring service */ $recurring_invoice->service() ->start() @@ -111,9 +110,10 @@ class SubscriptionService 'account_key' => $recurring_invoice->client->custom_value2, ]; - $response = $this->triggerWebhook($context); + $response = $this->triggerWebhook($context); + + return $this->handleRedirect('/client/recurring_invoices/'.$recurring_invoice->hashed_id); - $this->handleRedirect('/client/recurring_invoices/'.$recurring_invoice->hashed_id); } else { $invoice = Invoice::withTrashed()->find($payment_hash->fee_invoice_id); @@ -131,7 +131,7 @@ class SubscriptionService /* 06-04-2022 */ /* We may not be in a state where the user is present */ if (auth()->guard('contact')) { - $this->handleRedirect('/client/invoices/'.$this->encodePrimaryKey($payment_hash->fee_invoice_id)); + return $this->handleRedirect('/client/invoices/'.$this->encodePrimaryKey($payment_hash->fee_invoice_id)); } } } diff --git a/config/ninja.php b/config/ninja.php index cf403ccda892..1b41cbad3624 100644 --- a/config/ninja.php +++ b/config/ninja.php @@ -14,8 +14,8 @@ return [ 'require_https' => env('REQUIRE_HTTPS', true), 'app_url' => rtrim(env('APP_URL', ''), '/'), 'app_domain' => env('APP_DOMAIN', 'invoicing.co'), - 'app_version' => '5.5.77', - 'app_tag' => '5.5.77', + 'app_version' => '5.5.78', + 'app_tag' => '5.5.78', 'minimum_client_version' => '5.0.16', 'terms_version' => '1.0.1', 'api_secret' => env('API_SECRET', ''), diff --git a/lang/en/texts.php b/lang/en/texts.php index a3b1d7f30dd0..18fa7cc2195a 100644 --- a/lang/en/texts.php +++ b/lang/en/texts.php @@ -5007,7 +5007,9 @@ $LANG = array( 'bank_name' => 'Bank Name', 'bank_code' => 'Bank Code', 'bic' => 'BIC', - + 'change_plan_description' => 'Upgrade or downgrade your current plan.', + 'add_company_logo' => 'Add Logo', + 'add_stripe' => 'Add Stripe', ); diff --git a/resources/views/portal/ninja2020/subscriptions/show.blade.php b/resources/views/portal/ninja2020/subscriptions/show.blade.php index 997115475984..a2e226cd928c 100644 --- a/resources/views/portal/ninja2020/subscriptions/show.blade.php +++ b/resources/views/portal/ninja2020/subscriptions/show.blade.php @@ -6,7 +6,7 @@
Upgrade or downgrade your current plan.
+{{ ctrans('texts.change_plan_description') }}