Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ export default Component.extend(FormMixin, {
},

isCheckedStripe: computed(function() {
return this.get('settings.stripeClientId');
return this.get('settings.stripeClientId') || this.get('settings.stripeTestClientId');
}),

stripeMode: computed(function() {
Expand Down
1 change: 1 addition & 0 deletions app/models/setting.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export default ModelBase.extend({
stripeClientId : attr('string'),
stripeSecretKey : attr('string'),
stripePublishableKey : attr('string'),
stripeTestCliendId : attr('string'),
stripeTestSecretKey : attr('string'),
stripeTestPublishableKey : attr('string'),
isAliPayActivated : attr('boolean'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@
{{t 'on how to obtain these keys.'}}
</div>
</h3>
<div class="field">
<label>
{{t 'Client ID'}}
</label>
{{input type='text' name='stripe_client_id' value=settings.stripeClientId}}
</div>
<h5 class="ui header">
{{t 'Stripe Integration Mode'}}
</h5>
Expand All @@ -33,15 +27,24 @@
onChange=(action (mut stripeMode))}}
</div>
{{#if (eq stripeMode 'debug')}}
<div class="field">
<label>
{{t 'Client Test ID'}}
{{ui-popup tagName="i" class="info icon" content=(t 'This client id will be used for testing mode')}}
</label>
{{input type='text' name='stripe_test_client_id' value=settings.stripeTestClientId}}
</div>
<div class="field">
<label>
{{t 'Secret Test Key'}}
{{ui-popup tagName="i" class="info icon" content=(t 'This secret key will be used for testing mode')}}
</label>
{{input type='text' name='stripe_test_secret_key' value=settings.stripeTestSecretKey}}
</div>
<div class="field">
<label>
{{t 'Publishable Test Key'}}
{{ui-popup tagName="i" class="info icon" content=(t 'This publishable key will be used for testing mode')}}
</label>
{{input type='text' name='stripe_test_publishable_key' value=settings.stripeTestPublishableKey}}
</div>
Expand All @@ -55,15 +58,24 @@
onChange=(action (mut stripeMode))}}
</div>
{{#if (eq stripeMode 'production')}}
<div class="field">
<label>
{{t 'Client ID'}}
{{ui-popup tagName="i" class="info icon" content=(t 'This client id will be used during live (production) mode')}}
</label>
{{input type='text' name='stripe_client_id' value=settings.stripeClientId}}
</div>
<div class="field">
<label>
{{t 'Secret Key'}}
{{ui-popup tagName="i" class="info icon" content=(t 'This Secret Key will be used during live (production) mode')}}
</label>
{{input type='text' name='stripe_secret_key' value=settings.stripeSecretKey}}
</div>
<div class="field">
<label>
{{t 'Publishable Key'}}
{{ui-popup tagName="i" class="info icon" content=(t 'This Publishable Key will be used during live (production) mode')}}
</label>
{{input type='text' name='stripe_publishable_key' value=settings.stripePublishableKey}}
</div>
Expand Down Expand Up @@ -133,14 +145,14 @@
<div class="field">
<label>
{{t 'Paypal Sandbox Client Id'}}
{{ui-popup tagName="i" class="info icon" content="This client id will be used for testing mode"}}
{{ui-popup tagName="i" class="info icon" content=(t 'This client id will be used for testing mode')}}
</label>
{{input type='text' name='sandbox_client_id' value=settings.paypalSandboxClient}}
</div>
<div class="field">
<label>
{{t 'Paypal Sandbox Secret Token'}}
{{ui-popup tagName="i" class="info icon" content="This secret token will be used during testing mode"}}
{{ui-popup tagName="i" class="info icon" content=(t 'This secret token will be used during testing mode')}}
</label>
{{input type='text' name='sandbox_secret_token' value=settings.paypalSandboxSecret}}
</div>
Expand All @@ -156,14 +168,14 @@
<div class="field">
<label>
{{t 'Paypal Client Id'}}
{{ui-popup tagName="i" class="info icon" content="This client id will be used during live (production) mode"}}
{{ui-popup tagName="i" class="info icon" content=(t 'This client id will be used during live (production) mode')}}
</label>
{{input type='text' name='client_id' value=settings.paypalClient}}
</div>
<div class="field">
<label>
{{t 'Paypal Secret Token'}}
{{ui-popup tagName="i" class="info icon" content="This secret tocken will be used during live (production) mode"}}
{{ui-popup tagName="i" class="info icon" content=(t 'This secret tocken will be used during live (production) mode')}}
</label>
{{input type='text' name='secret_token' value=settings.paypalSecret}}
</div>
Expand Down Expand Up @@ -223,7 +235,7 @@
<div class="field">
<label>
{{t 'Omise Live Public Key'}}
{{ui-popup tagName="i" class="info icon" content=(t 'This pucliv key will be used during live (production) mode') }}
{{ui-popup tagName="i" class="info icon" content=(t 'This public key will be used during live (production) mode') }}
</label>
{{input type='text' name='live_public_key' value=settings.omiseLivePublic}}
</div>
Expand Down