diff --git a/lms/djangoapps/shoppingcart/views.py b/lms/djangoapps/shoppingcart/views.py index e7d09e18b7..a2680fd845 100644 --- a/lms/djangoapps/shoppingcart/views.py +++ b/lms/djangoapps/shoppingcart/views.py @@ -5,6 +5,7 @@ import hmac import binascii from hashlib import sha1 +from django.conf import settings from collections import OrderedDict from django.http import HttpResponse from django.contrib.auth.decorators import login_required @@ -71,10 +72,10 @@ def cybersource_sign(params): params needs to be an ordered dict, b/c cybersource documentation states that order is important. Reverse engineered from PHP version provided by cybersource """ - shared_secret = "ELIDED" - merchant_id = "ELIDED" - serial_number = "ELIDED" - orderPage_version = "7" + shared_secret = settings.CYBERSOURCE.get('SHARED_SECRET','') + merchant_id = settings.CYBERSOURCE.get('MERCHANT_ID','') + serial_number = settings.CYBERSOURCE.get('SERIAL_NUMBER','') + orderPage_version = settings.CYBERSOURCE.get('ORDERPAGE_VERSION','7') params['merchantID'] = merchant_id params['orderPage_timestamp'] = int(time.time()*1000) params['orderPage_version'] = orderPage_version diff --git a/lms/envs/aws.py b/lms/envs/aws.py index 8d2ffba96e..cc0e956b0c 100644 --- a/lms/envs/aws.py +++ b/lms/envs/aws.py @@ -191,6 +191,8 @@ if SEGMENT_IO_LMS_KEY: MITX_FEATURES['SEGMENT_IO_LMS'] = ENV_TOKENS.get('SEGMENT_IO_LMS', False) +CYBERSOURCE = AUTH_TOKENS.get('CYBERSOURCE', CYBERSOURCE) + SECRET_KEY = AUTH_TOKENS['SECRET_KEY'] AWS_ACCESS_KEY_ID = AUTH_TOKENS["AWS_ACCESS_KEY_ID"] diff --git a/lms/envs/common.py b/lms/envs/common.py index 250552a40c..d397371cc2 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -431,6 +431,14 @@ ZENDESK_URL = None ZENDESK_USER = None ZENDESK_API_KEY = None +##### CyberSource Payment parameters ##### +CYBERSOURCE = { + 'SHARED_SECRET': '', + 'MERCHANT_ID' : '', + 'SERIAL_NUMBER' : '', + 'ORDERPAGE_VERSION': '7', +} + ################################# open ended grading config ##################### #By setting up the default settings with an incorrect user name and password, diff --git a/lms/templates/shoppingcart/list.html b/lms/templates/shoppingcart/list.html index f3fd26c96b..a1f785c8b4 100644 --- a/lms/templates/shoppingcart/list.html +++ b/lms/templates/shoppingcart/list.html @@ -7,27 +7,32 @@ <%block name="title">
| Qty | Description | Unit Price | Price | |
| ${item.qty} | ${item.line_desc} | ${item.unit_cost} | ${item.line_cost} | -[x] |
| Total Cost | ||||
| ${total_cost} |
| Qty | Description | Unit Price | Price | |
| ${item.qty} | ${item.line_desc} | ${item.unit_cost} | ${item.line_cost} | +[x] |
| Total Cost | ||||
| ${total_cost} |
You have selected no items for purchase.
+ % endif -