2021-02-09 19:22:58 +03:00
<div class="gh-main-section">
2021-05-17 18:14:38 +03:00
{{ # if this .stripeDirect }}
<section>
<div class="flex flex-column flex-row-l items-start justify-between">
<div class="w-100 w-50-l">
<div class="mb4">
<label class="fw6 f8">Stripe Publishable key</label>
<GhTextInput
@type="password"
@value= {{ readonly this .stripeDirectPublicKey }}
@input= {{ action "setStripeDirectPublicKey" }}
@class="mt1 password"
/>
</div>
<div class="nudge-top--3">
<label class="fw6 f8 mt4">Stripe Secret key</label>
<GhTextInput
@type="password"
@value= {{ readonly this .stripeDirectSecretKey }}
@input= {{ action "setStripeDirectSecretKey" }}
@class="mt1 password"
/>
2022-02-02 19:09:43 +03:00
<a href="https://dashboard.stripe.com/account/apikeys" target="_blank" class="mt1 fw4 f8" rel="noopener noreferrer">
2021-05-17 18:14:38 +03:00
Find your Stripe API keys here »
</a>
2019-10-16 20:54:49 +03:00
</div>
2021-02-09 19:22:58 +03:00
</div>
2021-05-17 18:14:38 +03:00
<div class="ml0 ml5-l mt6">
<div class="gh-members-stripe-info">
<div class="gh-members-stripe-info-header">
<h4>How you get paid</h4>
{{ svg-jar "stripe-verified-partner-badge" class = "gh-members-stripe-badge" }}
2019-10-16 20:54:49 +03:00
</div>
2021-05-17 18:14:38 +03:00
<p class="f8 mt2 mb0">
Stripe is our exclusive direct payments partner.<br />
2022-02-02 19:09:43 +03:00
Ghost collects <strong>no fees</strong> on any payments! If you don’ t have a Stripe account yet, you can <a href="https://stripe.com" target="_blank" rel="noopener noreferrer" class="gh-members-stripe-link">sign up here</a>.
2021-05-17 18:14:38 +03:00
</p>
</div>
2019-10-09 13:02:56 +03:00
</div>
2021-02-09 19:22:58 +03:00
</div>
2021-05-17 18:14:38 +03:00
</section>
2021-02-09 19:22:58 +03:00
2021-05-17 18:14:38 +03:00
<div class="mb4 mt4 flex justify-end">
<GhTaskButton @buttonText="Save settings"
@task= {{ this .saveSettings }}
@successText="Saved"
@runningText="Saving"
@class="gh-btn gh-btn-primary gh-btn-icon"
data-test-button="save-members-settings"
/>
</div>
2021-02-25 12:47:08 +03:00
2021-05-17 18:14:38 +03:00
{{ else }}
2021-02-09 19:22:58 +03:00
2021-05-20 18:17:23 +03:00
{{ # if ( and this .stripeConnectAccountId ( not this .saveStripeSettings .isRunning ) ) }}
2021-05-17 18:14:38 +03:00
<div class="gh-stripe-connected-container">
{{ svg-jar "check-circle-stroke" class = "check-circle" }}
<h1>You are connected to Stripe</h1>
<div class="gh-stripe-connected-info">
2022-02-02 19:09:43 +03:00
<p>Connected to <a href="https://dashboard.stripe.com/ {{ this .stripeConnectAccountId }} " target="_blank" rel="noopener noreferrer"> {{ this .stripeConnectAccountName }} </a></p>
2021-05-17 18:14:38 +03:00
{{ # unless this .stripeConnectLivemode }}
<div class="gh-members-connect-testmodelabel">Test mode</div>
{{ / unless }}
{{ # if this .hasActiveStripeSubscriptions }}
<span class="gh-stripe-error-hasactivesub">
Cannot disconnect while there are members with active Stripe subscriptions.
</span>
2020-06-23 14:29:12 +03:00
{{ / if }}
2020-06-02 14:58:43 +03:00
</div>
2021-05-17 18:14:38 +03:00
<button type="button" class="gh-btn gh-btn-stripe-disconnect" {{ action "openDisconnectStripeModal" }} ><span>Disconnect</span></button>
</div>
{{ else }}
<div class="flex flex-column flex-row-l items-start justify-between">
<div class="w-100 w-50-l">
<label class="fw6 f8">Generate secure key</label>
<div class="flex items-center mb4 justify-between gh-members-connectbutton-container mt2">
2022-02-02 19:09:43 +03:00
<a href=" {{ if this .stripeConnectTestMode this .testStripeConnectAuthUrl this .liveStripeConnectAuthUrl }} " class="stripe-connect" target="_blank" rel="noopener noreferrer"><span>Connect with Stripe</span></a>
2021-05-17 18:14:38 +03:00
<div class="ml2 flex items-center flex-nowrap">
<span class="mr2 f8 midgrey nowrap {{ if this .stripeConnectTestMode "gh-members-connect-testmodeon" }} "> {{ if this .stripeConnectTestMode "Using" "Use" }} test mode</span>
<div class="for-switch small">
<label class="switch" for="stripe-connect-test-mode" {{ action ( toggle "stripeConnectTestMode" this ) bubbles = "false" }} >
<input type="checkbox" class="gh-input" checked= {{ this .stripeConnectTestMode }} onclick= {{ action ( toggle "stripeConnectTestMode" this ) }} data-test-checkbox="stripe-connect-test-mode">
<span class="input-toggle-component mt1"></span>
</label>
2020-06-11 16:15:44 +03:00
</div>
2020-06-02 14:58:43 +03:00
</div>
2021-05-17 18:14:38 +03:00
</div>
<div class="nudge-top--3">
<GhTextarea
@class="gh-members-stripe-connect-token"
@placeholder="Paste your secure key here"
@input= {{ action "setStripeConnectIntegrationToken" }}
/>
{{ # if this .stripeConnectError }} <p class="mb0 mt2 f8 red"> {{ this .stripeConnectError }} </p> {{ / if }}
</div>
</div>
<div class="mt5 mt5-m mt8-l ml0 ml5-l">
<div class="gh-members-stripe-info">
<div class="gh-members-stripe-info-header">
<h4>Getting paid</h4>
{{ svg-jar "stripe-verified-partner-badge" class = "gh-members-stripe-badge" }}
2021-02-09 19:22:58 +03:00
</div>
2021-05-17 18:14:38 +03:00
<p class="f8 mt2 mb0">
Stripe is our exclusive direct payments partner.<br />
2022-02-02 19:09:43 +03:00
Ghost collects <strong>no fees</strong> on any payments! If you don’ t have a Stripe account yet, you can <a href="https://stripe.com" target="_blank" rel="noopener noreferrer" class="gh-members-stripe-link">sign up here</a>.
2021-05-17 18:14:38 +03:00
</p>
2021-02-09 19:22:58 +03:00
</div>
2020-06-15 18:55:16 +03:00
</div>
2020-06-02 14:58:43 +03:00
</div>
2020-08-25 15:05:45 +03:00
2021-05-17 18:14:38 +03:00
<div class="gh-members-connect-savecontainer {{ if this .settings .stripeConnectIntegrationToken "expanded" }} ">
<GhTaskButton @buttonText="Save Stripe settings"
@task= {{ this .saveStripeSettings }}
2021-05-19 22:24:13 +03:00
@unlinkedTask= {{ true }}
2021-05-17 18:14:38 +03:00
@successText="Saved"
@disabled= {{ is-empty this .settings .stripeConnectIntegrationToken }}
@runningText="Saving"
@class="gh-btn gh-btn-green gh-btn-icon"
/>
2019-10-11 11:20:30 +03:00
</div>
2021-05-17 18:14:38 +03:00
{{ / if }}
{{ / if }}
2021-02-09 19:22:58 +03:00
</div>
2019-10-09 13:02:56 +03:00
2020-06-23 14:29:12 +03:00
{{ # if this .showDisconnectStripeConnectModal }}
<GhFullscreenModal @modal="disconnect-stripe"
@model= {{ hash
2020-06-29 20:37:11 +03:00
stripeConnectAccountName=this.stripeConnectAccountName
2020-06-23 14:29:12 +03:00
}}
@confirm= {{ action "disconnectStripeConnectIntegration" }}
@close= {{ action "closeDisconnectStripeModal" }}
@modifier="action wide" />
2022-05-24 17:53:03 +03:00
{{ / if }}