diff options
author | 2019-02-28 09:17:18 +0100 | |
---|---|---|
committer | 2019-02-28 09:17:18 +0100 | |
commit | 6be4e00a72eacc971cbeeeb6d10124a1eead7f57 (patch) | |
tree | 6ef71604b75e9e7e6520ea563e951cd459c676bd /src/containers | |
parent | fix value setter (diff) | |
download | ferdium-app-6be4e00a72eacc971cbeeeb6d10124a1eead7f57.tar.gz ferdium-app-6be4e00a72eacc971cbeeeb6d10124a1eead7f57.tar.zst ferdium-app-6be4e00a72eacc971cbeeeb6d10124a1eead7f57.zip |
new payment flow
Diffstat (limited to 'src/containers')
-rw-r--r-- | src/containers/subscription/SubscriptionFormScreen.js | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/src/containers/subscription/SubscriptionFormScreen.js b/src/containers/subscription/SubscriptionFormScreen.js index 3eb7b6255..cb67ee7f2 100644 --- a/src/containers/subscription/SubscriptionFormScreen.js +++ b/src/containers/subscription/SubscriptionFormScreen.js | |||
@@ -43,26 +43,31 @@ export default @inject('stores', 'actions') @observer class SubscriptionFormScre | |||
43 | }); | 43 | }); |
44 | 44 | ||
45 | const hostedPage = await stores.payment.createHostedPageRequest; | 45 | const hostedPage = await stores.payment.createHostedPageRequest; |
46 | const url = `file://${__dirname}/../../index.html#/payment/${encodeURIComponent(hostedPage.url)}`; | ||
47 | 46 | ||
48 | if (hostedPage.url) { | 47 | if (hostedPage.url) { |
49 | const paymentWindow = new BrowserWindow({ | 48 | if (hostedPage.legacyCheckoutFlow) { |
50 | parent: remote.getCurrentWindow(), | 49 | const paymentWindow = new BrowserWindow({ |
51 | modal: true, | 50 | parent: remote.getCurrentWindow(), |
52 | title: '🔒 Franz Supporter License', | 51 | modal: true, |
53 | width: 600, | 52 | title: '🔒 Franz Supporter License', |
54 | height: window.innerHeight - 100, | 53 | width: 600, |
55 | maxWidth: 600, | 54 | height: window.innerHeight - 100, |
56 | minWidth: 600, | 55 | maxWidth: 600, |
57 | webPreferences: { | 56 | minWidth: 600, |
58 | nodeIntegration: true, | 57 | webPreferences: { |
59 | }, | 58 | nodeIntegration: true, |
60 | }); | 59 | }, |
61 | paymentWindow.loadURL(url); | 60 | }); |
61 | paymentWindow.loadURL(`file://${__dirname}/../../index.html#/payment/${encodeURIComponent(hostedPage.url)}`); | ||
62 | 62 | ||
63 | paymentWindow.on('closed', () => { | 63 | paymentWindow.on('closed', () => { |
64 | onCloseWindow(); | 64 | onCloseWindow(); |
65 | }); | 65 | }); |
66 | } else { | ||
67 | actions.app.openExternalUrl({ | ||
68 | url: hostedPage.url, | ||
69 | }); | ||
70 | } | ||
66 | } | 71 | } |
67 | } | 72 | } |
68 | 73 | ||