forked from BantenITSolutions/oc-shop
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Stripe API Key settings to close #11
Removes the hardcoded API key and replaces it with a new Settings page in the backend. Also adds a setting for the active keyset, in case anyone wants to use test mode while in production.
- Loading branch information
Showing
4 changed files
with
57 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php namespace Dshoreman\Shop\Models; | ||
|
||
use Model; | ||
|
||
class Settings extends Model { | ||
|
||
public $implement = ['System.Behaviors.SettingsModel']; | ||
|
||
public $settingsCode = 'dshoreman_shop_settings'; | ||
|
||
public $settingsFields = 'fields.yaml'; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# =================================== | ||
# Form Field Definitions | ||
# =================================== | ||
|
||
fields: | ||
stripe_active_keys: | ||
label: Active Stripe | ||
type: dropdown | ||
options: | ||
test: Development | ||
live: Production | ||
tabs: | ||
fields: | ||
stripe_test_sec_key: | ||
label: Secret Key | ||
tab: Development | ||
stripe_test_pub_key: | ||
label: Publishable Key | ||
tab: Development | ||
|
||
stripe_live_sec_key: | ||
label: Secret Key | ||
tab: Production | ||
stripe_live_pub_key: | ||
label: Publishable Key | ||
tab: Production |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters