Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

Commit

Permalink
Better configuration defaults
Browse files Browse the repository at this point in the history
Set PAYMENT_PROCESSORS to better defaults.
  • Loading branch information
regisb committed Jul 11, 2019
1 parent 7638766 commit 5fdf566
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 3 deletions.
31 changes: 30 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Configuration
~~~~~~~~~~~~~

- ``ECOMMERCE_HOST`` (default: ``"ecommerce.{{ LMS_HOST }}"``)
- ``ECOMMERCE_PAYMENT_PROCESSORS`` (default: ``{cybersource: {}, paypal: {}}``)
- ``ECOMMERCE_PAYMENT_PROCESSORS`` (default: ``{cybersource: {...}, paypal: {...}}`` See below for details.)
- ``ECOMMERCE_ENABLED_PAYMENT_PROCESSORS``: (default: ``["cybersource", "paypal"]``)
- ``ECOMMERCE_ENABLED_CLIENT_SIDE_PAYMENT_PROCESSORS`` (default: ``["cybersource"]``)
- ``ECOMMERCE_EXTRA_PAYMENT_PROCESSOR_CLASSES`` (default: ``[]``)
Expand All @@ -69,6 +69,35 @@ Configuration
- ``ECOMMERCE_WORKER_JWT_ISSUER`` (default: ``"ecommerce_worker"``)
- ``ECOMMERCE_EXTRA_PIP_REQUIREMENTS`` (default: ``[]``)

You will need to modify the ``ECOMMERCE_PAYMENT_PROCESSORS`` parameter to configure your payment providers credentials. By default, it is equal to::
cybersource:
access_key: SET-ME-PLEASE
cancel_page_url: /checkout/cancel-checkout/
merchant_id: SET-ME-PLEASE
payment_page_url: https://testsecureacceptance.cybersource.com/pay
profile_id: SET-ME-PLEASE
receipt_page_url: /checkout/receipt/
secret_key: SET-ME-PLEASE
send_level_2_3_details: true
soap_api_url: https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor/CyberSourceTransaction_1.140.wsdl
sop_access_key: SET-ME-PLEASE
sop_payment_page_url: https://testsecureacceptance.cybersource.com/silent/pay
sop_profile_id: SET-ME-PLEASE
sop_secret_key: SET-ME-PLEASE
transaction_key: SET-ME-PLEASE
paypal:
cancel_url: /checkout/cancel-checkout/
client_id: SET-ME-PLEASE
client_secret: SET-ME-PLEASE
error_url: /checkout/error/
mode: sandbox
receipt_url: /checkout/receipt/
We suggest you modify this configuration, save it to ``ecommerce-config.yml`` and then load it with::
tutor config save --set "ECOMMERCE_PAYMENT_PROCESSORS=$(cat ecommerce-config.yml)"

Image customisation
~~~~~~~~~~~~~~~~~~~

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

setup(
name="tutor-ecommerce",
version="0.1.0",
version="0.1.1",
url="https://docs.tutor.overhang.io/",
project_urls={
"Documentation": "https://docs.tutor.overhang.io/",
Expand Down
27 changes: 26 additions & 1 deletion tutorecommerce/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,32 @@
"SECRET_KEY": "{{ 20|random_string }}",
"OAUTH2_SECRET": "{{ 8|random_string }}",
"API_KEY": "{{ 20|random_string }}",
"PAYMENT_PROCESSORS": {"cybersource": {}, "paypal": {}},
"PAYMENT_PROCESSORS": {
"cybersource": {
"merchant_id": "SET-ME-PLEASE",
"profile_id": "SET-ME-PLEASE",
"access_key": "SET-ME-PLEASE",
"secret_key": "SET-ME-PLEASE",
"transaction_key": "SET-ME-PLEASE",
"payment_page_url": "https://testsecureacceptance.cybersource.com/pay",
"receipt_page_url": "/checkout/receipt/",
"cancel_page_url": "/checkout/cancel-checkout/",
"soap_api_url": "https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor/CyberSourceTransaction_1.140.wsdl",
"send_level_2_3_details": True,
"sop_profile_id": "SET-ME-PLEASE",
"sop_access_key": "SET-ME-PLEASE",
"sop_secret_key": "SET-ME-PLEASE",
"sop_payment_page_url": "https://testsecureacceptance.cybersource.com/silent/pay",
},
"paypal": {
"mode": "sandbox",
"client_id": "SET-ME-PLEASE",
"client_secret": "SET-ME-PLEASE",
"receipt_url": "/checkout/receipt/",
"cancel_url": "/checkout/cancel-checkout/",
"error_url": "/checkout/error/",
},
},
"ENABLED_PAYMENT_PROCESSORS": ["cybersource", "paypal"],
"ENABLED_CLIENT_SIDE_PAYMENT_PROCESSORS": ["cybersource"],
"EXTRA_PAYMENT_PROCESSOR_CLASSES": [],
Expand Down

0 comments on commit 5fdf566

Please sign in to comment.