2021-02-04 19:49:06 +03:00
<div class="gh-launch-wizard-settings-container">
2021-02-12 14:33:24 +03:00
<div class="gh-stack overflow-y-auto flex-grow-1">
2021-02-04 19:49:06 +03:00
<div class="gh-stack-item gh-setting-first">
2021-05-18 15:15:44 +03:00
<div class="gh-members-stripe-info gh-launch-wizard-stripe-info">
<div class="gh-members-stripe-info-header">
<h4>Getting paid</h4>
2021-02-04 19:49:06 +03:00
{{ svg-jar "stripe-verified-partner-badge" class = "gh-members-stripe-badge" }}
</div>
2021-05-18 15:15:44 +03:00
<p class="f8 mt2 mb0">
2021-02-08 16:10:34 +03:00
Stripe is our exclusive direct payments partner. 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-18 15:15:44 +03:00
</p>
2021-01-28 17:25:05 +03:00
</div>
2021-02-04 19:49:06 +03:00
</div>
{{ # if this .config .stripeDirect }}
2021-02-04 17:02:48 +03:00
<div class="gh-stack-item gh-setting flex-column">
2021-02-02 14:29:44 +03:00
<div class="mb4">
<label for="stripe-publishable-key" class="gh-setting-title">Stripe Publishable key</label>
<GhTextInput
@id="stripe-publishable-key"
@type="password"
2021-02-03 19:45:09 +03:00
@value= {{ readonly this .settings .stripePublishableKey }}
2021-02-02 14:29:44 +03:00
class="mt1 password"
{{ on "input" this .setStripeDirectPublicKey }}
/>
2021-02-03 19:45:09 +03:00
{{ # if this .stripePublishableKeyError }} <p class="mb0 mt2 f8 red"> {{ this .stripePublishableKeyError }} </p> {{ / if }}
2021-02-02 14:29:44 +03:00
</div>
<div>
<label for="stripe-secret-key" class="gh-setting-title">Stripe Secret key</label>
<GhTextInput
@id="stripe-secret-key"
@type="password"
2021-02-03 19:45:09 +03:00
@value= {{ readonly this .settings .stripeSecretKey }}
2021-02-02 14:29:44 +03:00
class="mt1 password"
{{ on "input" this .setStripeDirectSecretKey }}
/>
2021-02-03 19:45:09 +03:00
{{ # if this .stripeSecretKeyError }} <p class="mb0 mt2 f8 red"> {{ this .stripeSecretKeyError }} </p> {{ / if }}
2021-02-02 14:29:44 +03:00
<a href="https://dashboard.stripe.com/account/apikeys" target="_blank" rel="noopener noreferrer" class="mt1 fw4 f8">
Find your Stripe API keys here »
</a>
2021-01-21 12:20:06 +03:00
</div>
2021-01-28 17:25:05 +03:00
</div>
2021-02-04 17:02:48 +03:00
<div class="gh-setting-desc"><a href="javascript:void(0)" {{ on "click" @ skipStep }} >Skip</a> if you don't want to offer paid subscriptions.</div>
2021-02-04 19:49:06 +03:00
{{ else }}
2021-02-08 12:13:26 +03:00
<div class="gh-stack-item gh-setting flex-wrap">
{{!-- Stripe already configured --}}
{{ # if this .settings .stripeConnectAccountId }}
<div>
2021-02-04 19:49:06 +03:00
<h4 class="gh-setting-title">Already connected to Stripe</h4>
2021-02-08 12:13:26 +03:00
<p class="gh-setting-desc mt2">
2022-02-02 19:09:43 +03:00
Connected to <a href="https://dashboard.stripe.com/ {{ this .settings .stripeConnectAccountId }} " target="_blank" rel="noopener noreferrer"> {{ this .settings .stripeConnectDisplayName }} </a>
2021-02-04 19:49:06 +03:00
{{ # unless this .settings .stripeConnectLivemode }}
<span class="gh-members-connect-testmodelabel">Test mode</span>
{{ / unless }}
</p>
2021-02-08 12:13:26 +03:00
</div>
{{ # if this .hasActiveStripeSubscriptions }}
<p class="red ma0 pa0 f8 nudge-bottom--2">
Cannot disconnect while there are members with active Stripe subscriptions.
</p>
2021-02-04 19:49:06 +03:00
{{ else }}
2021-02-08 12:13:26 +03:00
<div class="gh-setting-action">
<button type="button" class="gh-btn" {{ on "click" ( perform this .openDisconnectStripeConnectModalTask ) }} ><span>Disconnect</span></button>
</div>
{{ / if }}
{{!-- Stripe not yet configured --}}
{{ else }}
<div class="w-100">
2021-02-04 19:49:06 +03:00
<div class="gh-setting-title">Generate secure key</div>
2021-02-25 18:57:18 +03:00
<div class="flex items-center mb4 gh-members-connectbutton-container justify-between mt2">
2021-02-04 19:49:06 +03:00
<a href=" {{ this .stripeConnectAuthUrl }} " class="stripe-connect" target="_blank" rel="noopener noreferrer"><span>Connect with Stripe</span></a>
<div class="ml2 flex items-center flex-nowrap">
2021-02-08 16:10:34 +03:00
<span class="mr2 f8 midgrey nowrap {{ if this .stripeConnectTestMode "gh-members-connect-testmodeon" }} ">Test mode</span>
2021-02-04 19:49:06 +03:00
<div class="for-switch small">
<label class="switch" for="stripe-connect-test-mode" {{ on "click" this .toggleStripeConnectTestMode }} >
<input type="checkbox" class="gh-input" checked= {{ this .stripeConnectTestMode }} {{ on "click" this .toggleStripeConnectTestMode }} data-test-checkbox="stripe-connect-test-mode">
<span class="input-toggle-component mt1"></span>
</label>
</div>
2021-02-02 14:29:44 +03:00
</div>
</div>
2021-02-04 19:49:06 +03:00
<div class="gh-setting-action">
<GhTextarea
class="gh-launch-wizard-stripe-connect-token"
placeholder="Paste your secure key here"
{{ on "input" this .setStripeConnectIntegrationToken }}
/>
{{ # if this .stripeConnectError }} <p class="mb0 mt2 f8 red"> {{ this .stripeConnectError }} </p> {{ / if }}
</div>
2021-03-09 11:51:37 +03:00
<div class="gh-setting-desc skip-step"><a href="javascript:void(0)" {{ on "click" @ skipStep }} >Skip</a> if you don't want to offer paid subscriptions.</div>
2021-02-08 12:13:26 +03:00
</div>
{{ / if }}
2021-01-21 12:20:06 +03:00
</div>
2021-02-04 19:49:06 +03:00
{{ / if }}
</div>
<div class="gh-launch-wizard-nav-buttons">
2021-02-08 12:13:26 +03:00
<button type="button" class="gh-btn gh-btn-outline gh-btn-icon-dark gh-btn-large w-30" {{ on "click" @ backStep }} ><span> {{ svg-jar "arrow-left-tail" }} </span></button>
2021-02-02 14:29:44 +03:00
2021-02-04 19:49:06 +03:00
<GhTaskButton
@task= {{ this .saveAndContinueTask }}
@runningText="Saving"
2021-02-08 12:13:26 +03:00
@class="w-70 ml4 right gh-btn gh-btn-black gh-btn-large gh-btn-icon-right"
2021-02-04 19:49:06 +03:00
data-test-button="wizard-next"
2021-02-08 12:13:26 +03:00
>
2021-05-20 18:53:38 +03:00
{{ # if this .saveAndContinueTask .isRunning }}
<span>Saving...</span>
{{ else }}
<span> {{ if this .settings .stripeConnectAccountId "Continue" "Save and continue" }} {{ svg-jar "arrow-right-tail" }} </span>
{{ / if }}
2021-02-08 12:13:26 +03:00
</GhTaskButton>
2021-01-21 12:20:06 +03:00
</div>
2021-02-04 19:49:06 +03:00
</div>
{{ # if this .showDisconnectStripeConnectModal }}
<GhFullscreenModal
@modal="disconnect-stripe"
@model= {{ hash
stripeConnectAccountName=this.settings.stripeConnectDisplayName
}}
@confirm= {{ perform this .disconnectStripeConnectIntegrationTask }}
@close= {{ this .closeDisconnectStripeModal }}
@modifier="action wide" />
{{ / if }}