Skip to content

Commit

Permalink
feat: Addition of stripe test client id (#6358)
Browse files Browse the repository at this point in the history
* Addition of stripe test client id

* Update setting.py

* Update rev-2019-08-13-16:07:52-cd3beca1951a_.py
  • Loading branch information
kushthedude authored and iamareebjamal committed Aug 13, 2019
1 parent 7d5aee8 commit af9e8c7
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 9 deletions.
15 changes: 7 additions & 8 deletions app/api/schema/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,6 @@ class Meta:

id = fields.Str(dump_only=True)

# Stripe Keys
stripe_client_id = fields.Str(allow_none=True)
stripe_publishable_key = fields.Str(allow_none=True)
stripe_test_secret_key = fields.Str(allow_none=True)
stripe_test_publishable_key = fields.Str(allow_none=True)

#
# Generators
#
Expand Down Expand Up @@ -165,8 +159,13 @@ class Meta:
# Payment Gateway
#

# Stripe secret key
# Stripe Credantials
stripe_client_id = fields.Str(allow_none=True)
stripe_publishable_key = fields.Str(allow_none=True)
stripe_secret_key = fields.Str(allow_none=True)
stripe_test_client_id = fields.Str(allow_none=True)
stripe_test_secret_key = fields.Str(allow_none=True)
stripe_test_publishable_key = fields.Str(allow_none=True)

# PayPal Credentials
paypal_mode = fields.Str(allow_none=True)
Expand All @@ -182,7 +181,7 @@ class Meta:
omise_live_public = fields.Str(allow_none=True)
omise_live_secret = fields.Str(allow_none=True)

#
# Alipay Credentials
alipay_publishable_key = fields.Str(allow_none=True)
alipay_secret_key = fields.Str(allow_none=True)

Expand Down
4 changes: 3 additions & 1 deletion app/models/setting.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ class Setting(db.Model):
stripe_client_id = db.Column(db.String)
stripe_secret_key = db.Column(db.String)
stripe_publishable_key = db.Column(db.String)
stripe_test_client_id = db.Column(db.String)
stripe_test_secret_key = db.Column(db.String)
stripe_test_publishable_key = db.Column(db.String)

Expand Down Expand Up @@ -191,7 +192,7 @@ def __init__(self,
is_google_recaptcha_enabled=False, google_recaptcha_secret=None, google_recaptcha_site=None,
google_client_id=None, google_client_secret=None,
fb_client_id=None, fb_client_secret=None, tw_consumer_key=None,
stripe_client_id=None,
stripe_client_id=None, stripe_test_client_id=None,
stripe_secret_key=None, stripe_publishable_key=None,
stripe_test_secret_key=None, stripe_test_publishable_key=None,
in_client_id=None, in_client_secret=None,
Expand Down Expand Up @@ -288,6 +289,7 @@ def __init__(self,
self.stripe_client_id = stripe_client_id
self.stripe_publishable_key = stripe_publishable_key
self.stripe_secret_key = stripe_secret_key
self.stripe_test_client_id = stripe_test_client_id
self.stripe_test_publishable_key = stripe_test_publishable_key
self.stripe_test_secret_key = stripe_test_secret_key
self.web_app_url = web_app_url
Expand Down
28 changes: 28 additions & 0 deletions migrations/versions/rev-2019-08-13-16:07:52-cd3beca1951a_.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
"""empty message
Revision ID: cd3beca1951a
Revises: d252c86d0200
Create Date: 2019-08-13 16:07:52.020447
"""

from alembic import op
import sqlalchemy as sa
import sqlalchemy_utils


# revision identifiers, used by Alembic.
revision = 'cd3beca1951a'
down_revision = 'd252c86d0200'


def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('settings', sa.Column('stripe_test_client_id', sa.String(), nullable=True))
# ### end Alembic commands ###


def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('settings', 'stripe_test_client_id')
# ### end Alembic commands ###

0 comments on commit af9e8c7

Please sign in to comment.