diff --git a/backup/static/backup/backup.js b/backup/static/backup/backup.js index a0d8ebb03..1500147a8 100755 --- a/backup/static/backup/backup.js +++ b/backup/static/backup/backup.js @@ -2309,6 +2309,39 @@ app.controller('backupPlanNowOneClick', function ($scope, $http, $window) { }; + //// paypal + + $scope.PaypalBuyNowBackup = function (planName, monthlyPrice, yearlyPrice, months) { + + const baseURL = 'https://platform.cyberpersons.com/Billing/PaypalCreateOrderforBackupPlans'; + // Get the current URL + var currentURL = window.location.href; + +// Find the position of the question mark + const queryStringIndex = currentURL.indexOf('?'); + +// Check if there is a query string + currentURL = queryStringIndex !== -1 ? currentURL.substring(0, queryStringIndex) : currentURL; + + // Encode parameters to make them URL-safe + const params = new URLSearchParams({ + planName: planName, + monthlyPrice: monthlyPrice, + yearlyPrice: yearlyPrice, + returnURL: currentURL, // Add the current URL as a query parameter + months: months + }); + + + // Build the complete URL with query string + const fullURL = `${baseURL}?${params.toString()}`; + + // Redirect to the constructed URL + + window.location.href = fullURL; + + } + }); diff --git a/backup/templates/backup/oneClickBackups.html b/backup/templates/backup/oneClickBackups.html index b59d94fc9..98063f6c1 100755 --- a/backup/templates/backup/oneClickBackups.html +++ b/backup/templates/backup/oneClickBackups.html @@ -46,7 +46,8 @@
-

With CyberPanel's one-click backups, you can easily back up your website to our secure +

With CyberPanel's one-click backups, you can easily back + up your website to our secure servers in just 60 seconds. It's simple, fast, and reliable.

@@ -82,7 +83,7 @@ {% if plan.state == 1 %} + href="{% url 'ManageOCBackups' %}?id={{ plan.id }}"> @@ -136,12 +137,22 @@ ${{ plan.monthlyPrice }} ${{ plan.yearlyPrice }} + {% if plan.name != '100GB' %} + + {% endif %} + ng-click="PaypalBuyNowBackup('{{ plan.name }}', '{{ plan.monthlyPrice }}', '{{ plan.yearlyPrice }}', 12)" + class="btn btn-primary btn-lg btn-block">{% trans "Buy Yearly (Paypal)" %} + {% if plan.name != '100GB' %} + + {% endif %} + class="btn btn-primary btn-lg btn-block">{% trans "Buy Yearly via Card" %} diff --git a/baseTemplate/templates/baseTemplate/index.html b/baseTemplate/templates/baseTemplate/index.html index c677f2fae..c4b81a9a8 100755 --- a/baseTemplate/templates/baseTemplate/index.html +++ b/baseTemplate/templates/baseTemplate/index.html @@ -77,7 +77,7 @@ - {% with version="2.3.5.6" %} + {% with version="2.3.5.7" %}