Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
ecommerce
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
ecommerce
Commits
022973c0
Commit
022973c0
authored
Nov 07, 2017
by
Clinton Blackburn
Committed by
Clinton Blackburn
Nov 07, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added switch to toggle global activation of Stripe payment processor
parent
f1d34114
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
0 deletions
+31
-0
docs/additional_features/payment_processors.rst
+3
-0
ecommerce/extensions/payment/migrations/0018_create_stripe_switch.py
+28
-0
No files found.
docs/additional_features/payment_processors.rst
View file @
022973c0
...
@@ -90,6 +90,9 @@ processors they control.
...
@@ -90,6 +90,9 @@ processors they control.
* - CyberSource
* - CyberSource
- payment_processor_active_cybersource
- payment_processor_active_cybersource
- True
- True
* - Stripe
- payment_processor_active_stripe
- True
In the unlikely event that all payment processors are disabled, the LMS will display an informative error message
In the unlikely event that all payment processors are disabled, the LMS will display an informative error message
explaining why payment is not currently possible.
explaining why payment is not currently possible.
...
...
ecommerce/extensions/payment/migrations/0018_create_stripe_switch.py
0 → 100644
View file @
022973c0
# -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2017-11-07 15:50
from
__future__
import
unicode_literals
from
django.conf
import
settings
from
django.db
import
migrations
from
ecommerce.extensions.payment.processors.stripe
import
Stripe
def
create_switch
(
apps
,
schema_editor
):
Switch
=
apps
.
get_model
(
'waffle'
,
'Switch'
)
Switch
(
name
=
settings
.
PAYMENT_PROCESSOR_SWITCH_PREFIX
+
Stripe
.
NAME
,
active
=
True
)
.
save
()
def
delete_switch
(
apps
,
schema_editor
):
Switch
=
apps
.
get_model
(
'waffle'
,
'Switch'
)
Switch
.
objects
.
get
(
name
=
settings
.
PAYMENT_PROCESSOR_SWITCH_PREFIX
+
Stripe
.
NAME
)
.
delete
()
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'payment'
,
'0017_auto_20170328_1445'
),
]
operations
=
[
migrations
.
RunPython
(
create_switch
,
delete_switch
)
]
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment