Skip to content

Commit f9e65ef

Browse files
committed
Merge branch 'develop' into feature/subpage-for-teams
2 parents 30e148c + 944a00d commit f9e65ef

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+367
-292
lines changed

assets/js/androidkey.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"use strict";
22

3-
// requires store.js
43
// requires newsletter.js
54

65
class AndroidLicense {

assets/js/cardpayments.js

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,14 @@
11
"use strict";
22

3-
const STRIPE_PK = 'pk_live_eSasX216vGvC26GdbVwA011V';
4-
const STRIPE_PLANS = {'EUR': 'plan_GgW4ovr7c6upzx', 'USD': 'plan_GejOEdJtfL3kdH'}; // live
5-
const STRIPE_PHP_URL = 'https://api.cryptomator.org/stripe/prepare_payment.php';
6-
7-
//const STRIPE_PK = 'pk_test_JhF3MoFQGw2Is0DB3BSv345P';
8-
//const STRIPE_PLANS = {'EUR': 'plan_GgVY2JfD49bc02', 'USD': 'plan_GgVZwj545E0uH3'}; // test
9-
//const STRIPE_PHP_URL = 'http://localhost/stripe/prepare_payment.php';
3+
const STRIPE_PHP_URL = BASE_API_URL + '/stripe/prepare_payment.php';
104

115
class OneTimePayment {
126

137
/**
148
* Initializes the one-time payments helper and stores a references to the status object that can be observed by AlpineJS
159
* @param {Object} status
1610
* @param {boolean} status.validCardNum Whether the Stripe input field considers the credit card number valid
17-
* @param {string} status.captcha The captcha (if reCAPTCHA validation finished) or null
11+
* @param {string} status.captcha The captcha (if captcha validation finished) or null
1812
* @param {string} status.errorMessage An error message or null
1913
* @param {boolean} status.inProgress Whether an async payment task is currently running
2014
* @param {boolean} status.success Whether the payment succeeded
@@ -127,21 +121,13 @@ class OneTimePayment {
127121
this._status.success = false;
128122
this._status.errorMessage = error.message;
129123
this._status.inProgress = false;
130-
if (grecaptcha) {
131-
this._status.captcha = '';
132-
grecaptcha.reset();
133-
}
134124
}
135125

136126
onPaymentSucceeded() {
137127
console.info('Stripe payment succeeded!');
138128
this._status.success = true;
139129
this._status.errorMessage = '';
140130
this._status.inProgress = false;
141-
if (grecaptcha) {
142-
this._status.captcha = '';
143-
grecaptcha.reset();
144-
}
145131
}
146132

147133
}

assets/js/store.dev.js renamed to assets/js/const.dev.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"use strict";
22

3+
const BASE_API_URL = 'http://localhost';
34
const PADDLE_ENABLE_SANDBOX = true;
45
const PADDLE_VENDOR_ID = 1385;
56
const PADDLE_DESKTOP_PRODUCT_IDS = [54582, 54583, 54584];
@@ -8,3 +9,5 @@ const PADDLE_HUB_SELF_HOSTED_SUBSCRIPTION_PLAN_ID = 23141;
89
const PADDLE_HUB_MANAGED_SUBSCRIPTION_PLAN_ID = 42235;
910
const PADDLE_PRICES_URL = 'https://sandbox-checkout.paddle.com/api/2.0/prices';
1011
const STORE_API_URL = 'http://localhost:8787/api';
12+
const STRIPE_PK = 'pk_test_JhF3MoFQGw2Is0DB3BSv345P';
13+
const STRIPE_PLANS = {'EUR': 'plan_GgVY2JfD49bc02', 'USD': 'plan_GgVZwj545E0uH3'};

assets/js/store.prod.js renamed to assets/js/const.prod.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"use strict";
22

3+
const BASE_API_URL = 'https://api.cryptomator.org';
34
const PADDLE_ENABLE_SANDBOX = false;
45
const PADDLE_VENDOR_ID = 39223;
56
const PADDLE_DESKTOP_PRODUCT_IDS = [840163, 840164, 840165];
@@ -8,3 +9,5 @@ const PADDLE_HUB_SELF_HOSTED_SUBSCRIPTION_PLAN_ID = 770132;
89
const PADDLE_HUB_MANAGED_SUBSCRIPTION_PLAN_ID = 807339;
910
const PADDLE_PRICES_URL = 'https://checkout.paddle.com/api/2.0/prices';
1011
const STORE_API_URL = 'https://store.cryptomator.org/api';
12+
const STRIPE_PK = 'pk_live_eSasX216vGvC26GdbVwA011V';
13+
const STRIPE_PLANS = {'EUR': 'plan_GgW4ovr7c6upzx', 'USD': 'plan_GejOEdJtfL3kdH'};

assets/js/customerportal.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
"use strict";
22

3-
const REQUEST_CUSTOMER_PORTAL_URL = 'https://api.cryptomator.org/stripe/request_customer_portal.php';
4-
5-
// const REQUEST_CUSTOMER_PORTAL_URL = 'http://localhost/stripe/request_customer_portal.php';
3+
const REQUEST_CUSTOMER_PORTAL_URL = BASE_API_URL + '/stripe/request_customer_portal.php';
64

75
class CustomerPortal {
86

assets/js/desktopkey.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"use strict";
22

3-
// requires store.js
43
// requires newsletter.js
54

65
class DesktopLicense {

assets/js/hubdemo.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"use strict";
22

3-
// requires store.js
43
const REQUEST_HUB_DEMO_URL = STORE_API_URL + '/hub/request-demo';
54

65
class HubDemo {

assets/js/hubmanaged.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"use strict";
22

3-
// requires store.js
43
// requires newsletter.js
54
const REQUEST_HUB_MANAGED_URL = STORE_API_URL + '/hub/request-managed';
65
const VALIDATE_HUB_MANAGED_REQUEST_URL = STORE_API_URL + '/hub/validate-managed-request';

assets/js/hubpricing.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
"use strict";
22

3-
// requires store.js
4-
53
class HubPricing {
64

75
constructor(data) {

assets/js/hubsubscription.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"use strict";
22

3-
// requires store.js
43
const BILLING_PORTAL_SESSION_URL = STORE_API_URL + '/hub/billing-portal-session';
54
const CUSTOM_BILLING_URL = STORE_API_URL + '/hub/custom-billing';
65
const GENERATE_PAY_LINK_URL = STORE_API_URL + '/hub/generate-pay-link';

0 commit comments

Comments
 (0)