2021-01-28 17:25:05 +03:00
{{ # if this .config .stripeDirect }}
2021-02-02 14:29:44 +03:00
<div class="gh-launch-wizard-settings-container">
<div class="gh-stack">
<div class="gh-stack-item gh-setting-first">
<div class="gh-launch-wizard-stripe-info">
<div class="flex justify-between items-center mb2">
<div class="gh-setting-title">How you get paid</div>
{{ svg-jar "stripe-verified-partner-badge" class = "gh-members-stripe-badge" }}
</div>
<div class="gh-setting-desc">
Stripe is our exclusive direct payments partner.<br />
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>.
</div>
</div>
2021-01-28 17:25:05 +03:00
</div>
2021-02-02 14:29:44 +03:00
<div class="gh-stack-item gh-setting flex-column bb b--whitegrey">
<div class="mb4">
<label for="stripe-publishable-key" class="gh-setting-title">Stripe Publishable key</label>
<GhTextInput
@id="stripe-publishable-key"
@type="password"
@value= {{ readonly this .settings .stripeDirectPublicKey }}
class="mt1 password"
{{ on "input" this .setStripeDirectPublicKey }}
/>
</div>
<div>
<label for="stripe-secret-key" class="gh-setting-title">Stripe Secret key</label>
<GhTextInput
@id="stripe-secret-key"
@type="password"
@value= {{ readonly this .settings .stripeDirectSecretKey }}
class="mt1 password"
{{ on "input" this .setStripeDirectSecretKey }}
/>
<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-02 14:29:44 +03:00
<div class="flex flex-row mt4 mb4">
<button type="button" class="gh-btn gh-btn-icon mr2" {{ on "click" @ backStep }} ><span> {{ svg-jar "arrow-left" }} </span></button>
{{!-- TODO: reset "failed" state automatically --}}
<GhTaskButton
@buttonText="Save and continue"
@task= {{ this .saveAndContinue }}
@runningText="Saving"
@class="right gh-btn gh-btn-black gh-btn-icon"
data-test-button="wizard-next"
/>
</div>
<div class="gh-setting-desc"><a href="javascript:void(0)" {{ on "click" @ skipStep }} >Skip this step</a> if you don't want to offer paid subscriptions.</div>
2021-01-28 17:25:05 +03:00
</div>
</div>
{{ else }}
2021-02-02 14:29:44 +03:00
<div class="gh-launch-wizard-settings-container">
<div class="gh-stack">
<div class="gh-stack-item gh-setting-first">
<div class="gh-launch-wizard-stripe-info">
<div class="flex justify-between items-center mb2">
<div class="gh-setting-title">How you get paid</div>
{{ svg-jar "stripe-verified-partner-badge" class = "gh-members-stripe-badge" }}
</div>
<div class="gh-setting-desc">
Stripe is our exclusive direct payments partner.<br />
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>.
</div>
</div>
2021-01-28 17:25:05 +03:00
</div>
2021-02-02 14:29:44 +03:00
<div class="gh-stack-item gh-setting bb b--whitegrey">
<div class="w-100">
<div class="gh-setting-title">Generate secure key</div>
<div class="flex items-center mb4 justify-between mt2">
<a href=" {{ this .stripeConnectAuthUrl }} " class="stripe-connect light-blue" target="_blank" rel="noopener noreferrer"><span>Connect with Stripe</span></a>
<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" {{ 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>
</div>
</div>
<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 }}
2021-01-21 12:20:06 +03:00
</div>
</div>
</div>
2021-02-02 14:29:44 +03:00
<div class="flex flex-row mt4 mb4">
<button type="button" class="gh-btn gh-btn-icon mr2" {{ on "click" @ backStep }} ><span> {{ svg-jar "arrow-left" }} </span></button>
{{!-- TODO: reset "failed" state automatically --}}
<GhTaskButton
@buttonText="Save and continue"
@task= {{ this .saveAndContinue }}
@runningText="Saving"
@class="right gh-btn gh-btn-black gh-btn-icon"
data-test-button="wizard-next"
2021-01-28 17:25:05 +03:00
/>
</div>
2021-02-02 14:29:44 +03:00
<div class="gh-setting-desc"><a href="javascript:void(0)" {{ on "click" @ skipStep }} >Skip this step</a> if you don't want to offer paid subscriptions.</div>
2021-01-28 17:25:05 +03:00
</div>
2021-01-21 12:20:06 +03:00
</div>
2021-02-02 14:29:44 +03:00
{{ / if }}