From 5359ff9d71993310e4f39ddfa11b87d4109ee065 Mon Sep 17 00:00:00 2001 From: Nickersoft Date: Fri, 15 May 2015 15:02:10 +0000 Subject: [PATCH] Passing full name to E-Commerce API --- lms/djangoapps/commerce/__init__.py | 2 +- lms/djangoapps/commerce/tests/__init__.py | 1 + requirements/edx/github.txt | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lms/djangoapps/commerce/__init__.py b/lms/djangoapps/commerce/__init__.py index 01ef271447..8fcbe9ea51 100644 --- a/lms/djangoapps/commerce/__init__.py +++ b/lms/djangoapps/commerce/__init__.py @@ -16,4 +16,4 @@ def create_tracking_context(user): def ecommerce_api_client(user): """ Returns an E-Commerce API client setup with authentication for the specified user. """ return EcommerceApiClient(settings.ECOMMERCE_API_URL, settings.ECOMMERCE_API_SIGNING_KEY, user.username, - user.email, tracking_context=create_tracking_context(user)) + user.profile.name, user.email, tracking_context=create_tracking_context(user)) diff --git a/lms/djangoapps/commerce/tests/__init__.py b/lms/djangoapps/commerce/tests/__init__.py index 9c4d61fc85..0601b0cc17 100644 --- a/lms/djangoapps/commerce/tests/__init__.py +++ b/lms/djangoapps/commerce/tests/__init__.py @@ -58,6 +58,7 @@ class EcommerceApiClientTest(TestCase): actual_header = httpretty.last_request().headers['Authorization'] expected_payload = { 'username': self.user.username, + 'full_name': self.user.profile.name, 'email': self.user.email, 'tracking_context': { 'lms_user_id': self.user.id, # pylint: disable=no-member diff --git a/requirements/edx/github.txt b/requirements/edx/github.txt index 983d934758..8f554a6f1c 100644 --- a/requirements/edx/github.txt +++ b/requirements/edx/github.txt @@ -50,7 +50,7 @@ git+https://github.com/edx/edx-lint.git@8bf82a32ecb8598c415413df66f5232ab8d974e9 -e git+https://github.com/edx/xblock-utils.git@581ed636c862b286002bb9a3724cc883570eb54c#egg=xblock-utils -e git+https://github.com/edx-solutions/xblock-google-drive.git@138e6fa0bf3a2013e904a085b9fed77dab7f3f21#egg=xblock-google-drive -e git+https://github.com/edx/edx-reverification-block.git@2ff0d21f6614874067168bd244e68d8215041f3b#egg=edx-reverification-block -git+https://github.com/edx/ecommerce-api-client.git@0.4.3#egg=ecommerce-api-client==0.4.3 +git+https://github.com/edx/ecommerce-api-client.git@1.0.0#egg=ecommerce-api-client==1.0.0 # Third Party XBlocks -e git+https://github.com/mitodl/edx-sga@172a90fd2738f8142c10478356b2d9ed3e55334a#egg=edx-sga