Open edX Ecommerce

Get Ecommerce working on your Open edX native build. This post is a supplement to the official documentation, “How to Install and Start the E-Commerce Service in Native Installations“, covering installation and configuration, Django configuration, Nginx considerations, and PayPal integration.


The Open edX Ecommerce module is actually a 3rd party Django project named Oscar that the Open edX team fully integrated into the platform by fusing the user lists together with Oauth. While recently setting up the Ecommerce module on a Gingko.2 installation I found myself stumbling through some the steps in the official documentation while disagreeing entirely with others. What follows is a modified procedure that I followed to get Ecommerce running on a Ginkgo.2 installation. Hopefully this will save you some time.

Setup Procedure

1. Verify that the Ecommerce module is running

If you followed the documented instructions from “Native Open edX Ubuntu 16.04 64 bit Installation” for Gingko or later then the Ecommerce module is automatically installed and should be running on your instance. You can verify this by running the following command from a terminal window connected to your Ubuntu instance.

sudo /edx/bin/supervisorctl status

If you see the “Ecommerce” module in a running state then you can ignore the first two steps of the official documentation, or at least when running these you should notice that both steps are benign. If for any reason you decide to execute the first two steps of the official documentation then be forewarned that step #2 is tantamount to upgrading your entire platform and could thus bring unintended consequences beyond the scope of the Ecommerce module setup.

Moreover, if the Ecommerce module is not currently running then you should think carefully about your next steps. If your installation is not version Ginkgo or later then you should consider upgrading your entire platform before proceeding simply to ensure that your code base doesn’t venture too far into the unknown. You can read my blog post on Upgrading Open edX for more detail on what’s involved in upgrading and how to prepare.

2. Configure edX

There are a handful of things to configure in the LMS via the eponymous configuration file /edx/app/edxapp/lms.env.json. Refer to the screen shots below for guidance on the subject matter and approximate locations of each section. You’ll need to restart the LMS for these changes to take effect:

sudo /edx/bin/supervisorctl restart edxapp:

Briefly summarizing the purpose of each section:

  • ENABLE_OAUTH2_PROVIDER – This enables the LMS as a provider of Oauth2 authentication services. The Ecommerce module will leverage Oauth2 rather than host its own user list and passwords. For example, as an end user if you’ve ever elected to “Login with Facebook” then this flag makes your LMS the “Facebook” of that proposition.
  • JWT_AUTH – This is the URL of the JSON Web Token authorizer. In our case it’s exactly the same as the issuer.
  • JWT_ISSUER – This is the URL of the JSON Web Token issuer
  • OAUTH_OIDC_ISSUER – This is the URL of the Open ID issuer (eg your LMS platform)
  • PAID_COURSE_REGISTRATION_CURRENCY – The Ecommerce module reads this value to determine which currency symbol to display along side products. This value is also passed to the payment gateway.
  • PDF_RECEIPT_ – All of the salient text for customer receipts is stored in these fields.
3. Setup Oauth between the LMS and the Ecommerce module

It wasn’t initially apparent to me but, setting configuration parameters in lms.env.json only indicates to the LMS that you want to use it as part of an Oauth authentication; you still have to setup Oauth itself. We’ll use the Django admin console for this. For the Python/Django uninitiated, Django apps like LMS and CMS come with a “back end” admin console where additional configuration parameters are available beyond what you’ll find in the four JSON files in /edx/app/edxapp/. Refer to this screen shot for the URL path and guidelines for creating an Oauth client.

Note: I’ve seen conflicting documentation regarding the proper port assignment for the Ecommerce module. Some suggest 8002 whereas others say it should be 18130. After some experimentation I’ve learned that either of these assignments will work, provided that you are consistent with your settings in /edx/app/edxapp/*.json and /edx/etc/ecommerce.yml and /etc/nginx/sites-enabled/ecommerce.

4. Configure Django to use Oscar Ecommerce

This is the definitive step in “activating” the Ecommerce module. Refer to the following screen shot for parameter values and the desired outcome.

5. Configure Oscar Ecommerce

This step essentially binds together the Django configurations you created in the previous two steps 3 & 4 so that the Oscar Ecommerce module works seamlessly with our LMS.

sudo su ecommerce -s /bin/bash
cd ~/ecommerce
source ../ecommerce_env
python makemigrations
python migrate
python create_or_update_site \
	--site-id=1 \ \
	--partner-code=edX \
	--partner-name='Open edX' \
	--lms-url-root= \
	--payment-processors=paypal \
	--client-id=ecommerce-key \
	--client-secret=ecommerce-secret \ \

Following is how these command line arguments map to the two Django configuration screens from the previous step.

6. Modify /edx/etc/ecommerce.yml

I don’t understand the technicalities behind how and why the Ecommerce module reads this file at run-time, but I assure you that it does. In this file you’ll find a half-dozen occurrences of the URL, “” which you should update to your instance’s domain name or IP address. Also, make sure that the port assignment that you choose is consistent with the value you used in /edx/app/edxapp and /etc/nginx/sites-enabled/ecommerce. You need to restart the Ecommerce service afterward in order for the new settings to take effect.

sudo /edx/bin/supervisorctl restart ecommerce
7. Navigate to Oscar Ecommerce Dashboard

If everything is working as it should then you’ll be able to navigate to the Ecommerce dashboard where you can begin setting up your products. You can refer to the Oscar Ecommerce Official Documentation for further instructions on setting up products, payment gateways, etcetera.

Trouble Shooting

  • Firewall. You should pay close attention to the unorthodox port assignments used by the Ecommerce module. By default the Oscar Ecommerce module runs on port 8002 and the LMS “Course Discovery” API runs on port 18381. You might need to open these ports on your firewall.
  • Port Settings. Take note that ports have changed over time. The official documentation makes multiple references to ports 18020 and 18130; neither of which seem to be in use on Ginkgo.
  • Nginx. If you’re using SSL on your site then you might need to make adjustments to one or more of the Nginx virtual server configurations located in /edx/app/nginx/sites-available/.
  • Additional Work Notes. You can reference these additional work notes from my colleague Eric Mensah and myself as he was trouble-shooting a couple of details related to ports and ssl.

If you see the screen below when you try to navigate to the Ecommerce site then be aware that this, believe it or not, is correct. This is what you’ll initially see prior to logging in to the Ecommerce back end administration console.

If you see this screen after clicking the “Login” button (note the domain name) then you need to update /edx/etc/ecommerce.yml from Step 6.

If you get a 404 error like the screen shot below then you need to modify the nginx configuration in /etc/nginx/sites-enabled/ecommerce. Most likely you need to modify the port assignment to match the port that you used in /edx/app/edxapp/*.json and /edx/etc/ecommerce.yml.

I hope you found this helpful. Please help me improve this article by leaving a comment below. Thank you!

By |2018-11-28T07:02:06-06:00April 25th, 2018|Categories: Dev Ops, Open edX|41 Comments

About the Author:

Lawrence is a full stack developer specializing in the Open edX platform, Django, Angular, Ionic, Wordpress and Amazon Web Services. He lives in Puerto Escondido, Oaxaca, Mexico.


  1. Bruno José Marques March 3, 2019 at 10:11 am - Reply

    First, congratulations on your tips Lawrence!

    I followed all the steps of the configuration and installation of ecommerce, but it is giving error when trying to create a new course in ecommerce.

    File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/provider/”, line 136, in dispatch
    response = super(OAuthView, self).dispatch(request, *args, **kwargs)
    File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/views/generic/”, line 88, in dispatch
    return handler(request, *args, **kwargs)
    File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/provider/”, line 716, in post
    return handler(request, request.POST, client)
    File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/provider/”, line 660, in client_credentials
    at, rt = self.get_access_and_refresh_tokens(**kwargs)
    File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/provider/”, line 119, in get_access_and_refresh_tokens
    at = self.create_access_token(request, user, scope, client)
    File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/provider/oauth2/”, line 33, in create_access_token
    File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/models/”, line 85, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
    File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/models/”, line 394, in create, using=self.db)
    File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/provider/oauth2/”, line 162, in save
    super(AccessToken, self).save(*args, **kwargs)
    File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/models/”, line 808, in save
    force_update=force_update, update_fields=update_fields)
    File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/models/”, line 838, in save_base
    updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
    File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/models/”, line 924, in _save_table
    result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
    File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/models/”, line 963, in _do_insert
    using=using, raw=raw)
    File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/models/”, line 85, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
    File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/models/”, line 1079, in _insert
    return query.get_compiler(using=using).execute_sql(return_id)
    File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/models/sql/”, line 1112, in execute_sql
    cursor.execute(sql, params)
    File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/backends/”, line 64, in execute
    return self.cursor.execute(sql, params)
    File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/backends/mysql/”, line 106, in execute
    six.reraise(utils.IntegrityError, utils.IntegrityError(*tuple(e.args)), sys.exc_info()[2])
    File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/backends/mysql/”, line 101, in execute
    return self.cursor.execute(query, args)
    File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/MySQLdb/”, line 205, in execute
    self.errorhandler(self, exc, value)
    File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/MySQLdb/”, line 36, in defaulterrorhandler
    raise errorclass, errorvalue
    IntegrityError: (1048, “Column ‘user_id’ cannot be null”)

  2. leo January 24, 2019 at 2:25 pm - Reply

    Very helpful tutorial!!!
    we need people like you my friend!!

    And I’m stuck and I’m pretty sure that is related to the SSL

    And i get something like the “Not Found”, just like the screenshoot you share

    This is from /edx/app/nginx/sites-available/ecommerce

    server {
    server_name ~^((stage|prod)-)?ecommerce.*;
    listen 18130;

    So when the tutorial says or
    I put

    In all places
    JWT_AUTH: “”
    JWT_ISSUER: “”

    STEP 3
    Redirect uri:
    Logout uri:

    STEP 5
    sudo su ecommerce -s /bin/bash
    cd ~/ecommerce
    source ../ecommerce_env
    python makemigrations
    python migrate
    python create_or_update_site \
    –site-id=1 \
    – \
    –partner-code=edX \
    –partner-name=’Open edX’ \
    –lms-url-root= \
    –payment-processors=paypal \
    –client-id=ecommerce-key \
    –client-secret=ecommerce-secret \
    – \

    Any suggestion where the error might be?

  3. sergen January 9, 2019 at 2:29 am - Reply

    Hi Lawrence. I have some problems about paypal. I am using SSL and actually everything works very well. But the problem is when I paid the money and ‘Go to The Dashboard’. When I go to dashboard, I have problems. I have no idea how could be possible but products that I bought from e-commerce part has got a problem. I use COURSE_CATALOG_API_URL= None because of 8008 doesn’t have in my server. Do you have any idea what is the problem here?

    Jan 9 07:37:33 ip-172-31-39-168 [service_variant=lms][django.request][env:sandbox] ERROR [ip-172-31-39-168 27929] [] – Internal Server Error: /dashboard
    Traceback (most recent call last):
    File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/”, line 132, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
    File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/”, line 145, in inner
    return func(*args, **kwargs)
    File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/contrib/auth/”, line 22, in _wrapped_view
    return view_func(request, *args, **kwargs)
    File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/”, line 110, in _wrapped_view
    response = view_func(request, *args, **kwargs)
    File “/edx/app/edxapp/edx-platform/common/djangoapps/student/”, line 803, in dashboard
    enrollment.course_id for enrollment in course_enrollments
    File “/edx/app/edxapp/edx-platform/common/djangoapps/student/”, line 805, in
    File “/edx/app/edxapp/edx-platform/common/djangoapps/student/”, line 1590, in refundable
    refund_cutoff_date = self.refund_cutoff_date()
    File “/edx/app/edxapp/edx-platform/common/djangoapps/student/”, line 1623, in refund_cutoff_date
    order = ecommerce_api_client(self.user).orders(order_number).get()
    File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/slumber/”, line 164, in get
    resp = self._request(“GET”, params=kwargs)
    File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/slumber/”, line 110, in _request
    raise exception_class(“Client Error %s: %s” % (resp.status_code, url), response=resp, content=resp.content)
    HttpClientError: Client Error 401:

  4. Jaleel Abubaker December 29, 2018 at 5:50 pm - Reply

    Dear Lawrence,

    Thank you so much for these useful posts on Open Edx. I followed your most of the posts and its of great help 🙂

    I am stuck on the same “Not Found” page as you have shown in your “troubleshooting” section. Even if I clicked on the “Login” button I get the same “Not Found” text.

    I am using SSL. LMS/CMS/eCommerce/Discovery all has SSL certificates successfully installed.

    You have mentioned that some modification needs to be made in “Nginx virtual server configurations”. Could you please guide me on which code exactly needs to be modified to fix ecommerce with SSL. I have tried a lot but can’t find a way out.


    • admin December 30, 2018 at 7:59 am - Reply

      hi Jaleel, the modifications are limited to two things: a) adding SSL/TLS information, and b) changing the port on which to listen from 18130 to some other port. if you’ve installed Letsencrypt certificates on your server already then you can view the nginx configuration of your lms to locate the four rows of ssl certificate path information that letsencrypt added, such as:
      ssl_certificate /etc/letsencrypt/live/; # managed by Certbot
      ssl_certificate_key /etc/letsencrypt/live/; # managed by Certbot
      include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
      ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
      the port assignment would customarily only change is, for example, you’d decided to create a custom subdomain for the admin console of the store which, in my opinion, is not a good idea since its likely that you’ll be the only person who access the store’s admin console. but if you do, then you’ll need to find and edit the line “listen 18130;” on or around row 21 to an alternative port like say, 80 or 443.

  5. Ronald Walker December 28, 2018 at 1:34 pm - Reply

    Hi Lawrence, your blog posts are a great help. I am running a native Hawthorn instance and cannot get the image and description to appear on the basket page, I have uploaded descriptions and images everywhere I could find. Ecommerce dashboard, cms, and django admin… not luck.

    Any ideas? Thanks again

    • admin December 29, 2018 at 10:33 am - Reply

      hi ronald, thank you for the nice complement! i’m glad you’ve found my articles helpful. noting that the Ecommerce module is itself an independent community-supported django project ( the answer to your question lies more with Oscar than with Open edX. That is, you can refer to the Oscar documentation for specifics on setting and/or adjusting the product imagery.

  6. Jonas November 28, 2018 at 11:02 am - Reply

    Hi Lawrence,
    I have the same issue that Sergen has. When I try to log in to commerce I neither get to the IP page nor to the error 404
    I end up at https://[DOMAIN]:18130/complete/edx-oidc/?state=%5BSTATE%5D&code=%5BCODE%5D, but I don’t get to the Dashboard and in the log I see “AuthTokenError: Token error: Invalid issuer”
    I checked step 3 and the trouble shooting section however everything seems to be right over there

  7. Sergen November 27, 2018 at 3:06 am - Reply

    Hi Lawrence,

    I had problem about firewall and then I saw your page. Firstly, thank you very much about it. I have question sitename:18130. When I go to the site, I see one text and header. “Not Found’ is written in body. Do you have any idea about it?

    • admin November 27, 2018 at 5:42 am - Reply

      hi sergen, that means that the Ecommerce service is running. you’re looking at the login screen (it’s ugly). click the “Login” button to test whether or not oauth2 is working.

      • Sergen November 28, 2018 at 8:21 am - Reply

        Hi Lawrence,

        When I used the link http://sitename:18130/dashboard/ , it was working. I have changed some information but now I take some errors. “AuthTokenError: Token error: Invalid issuer”. I haven’t changed anything but I started to take this error.

        • admin November 28, 2018 at 8:52 am - Reply

          That means you have a configuration error in section 3: django admin / oauth2 configuration.

          • Sergen November 29, 2018 at 2:37 am

            I have checked section 3 and now I take another error. “invalid_request The requested redirect didn’t match the client settings.”. I checked my client id and client secret in ecommerce.yml . I did them same with . But I still have problem.

          • Sergen November 29, 2018 at 4:55 am

            When I try to be login in ”’. I take error again. I checked ”” that I have user which I use but I checked ”” I don’t have. It is empty. Then I tried curl -d ‘grant_type=client_credentials&client_id=SET_CLIENT&client_secret=SET_SECRET&token_type=jwt’ but it doesn’t work.

          • Sergen November 29, 2018 at 5:27 am

            Hi Lawrence,

            First thank you very much for all information which you gave me. It was a good experience for me. Your document, it helped me. My problem, it was password. I have an user admin but I didn’t have password. I created new superuser now I can see

          • Sergen November 29, 2018 at 12:13 pm

            Here’s my solution, I hope it helps.
            sudo su ecommerce -s /bin/bash
            cd ~/ecommerce
            source ../ecommerce_env
            ./ createsuperuser
            /*create new user*/
   (use new username and password)

            Thank you again Lawrence…

  8. modire November 8, 2018 at 1:49 am - Reply

    very good, thanks!!

  9. karim November 7, 2018 at 4:15 pm - Reply

    when I tried to log in Oscar dashboradI got the folowing error:

    File “/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/django/core/handlers/”, line 41, in inner
    response = get_response(request)
    File “/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/django/core/handlers/”, line 249, in _legacy_get_response
    response = self._get_response(request)
    File “/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/django/core/handlers/”, line 187, in _get_response
    response = self.process_exception_by_middleware(e, request)
    File “/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/django/core/handlers/”, line 185, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
    File “/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/django/utils/”, line 185, in inner
    return func(*args, **kwargs)
    File “/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/django/views/decorators/”, line 57, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)
    File “/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/django/views/decorators/”, line 58, in wrapped_view
    return view_func(*args, **kwargs)
    File “/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/social_django/”, line 50, in wrapper
    return func(request, backend, *args, **kwargs)
    File “/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/social_django/”, line 32, in complete
    redirect_name=REDIRECT_FIELD_NAME, *args, **kwargs)
    File “/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/social_core/”, line 41, in do_complete
    user = backend.complete(user=user, *args, **kwargs)
    File “/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/social_core/backends/”, line 40, in complete
    return self.auth_complete(*args, **kwargs)
    File “/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/auth_backends/”, line 164, in auth_complete
    user = super(EdXOpenIdConnect, self).auth_complete(*args, **kwargs)
    File “/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/social_core/”, line 252, in wrapper
    return func(*args, **kwargs)
    File “/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/social_core/backends/”, line 388, in auth_complete
    state = self.validate_state()
    File “/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/social_core/backends/”, line 90, in validate_state
    raise AuthStateMissing(self, ‘state’)
    AuthStateMissing: Session value state missing.

  10. Yafet Getachew November 1, 2018 at 3:15 am - Reply

    Hi Lawrence,
    Does E-commerce / Oscar provide functionality where one can select the currency with which the course should be paid in? So, basically when a user sets the price for the course in the e-commerce platform can I make it so that the user can also select a preferred currency. It doesn’t have to be on Oscar, can be anywhere really, just need that choice, maybe a drop down menu of currencies. Thanks

    • admin November 1, 2018 at 5:59 am - Reply

      hi yafet. no, i not in the use case you’re describing. keep in mind that E-commerce is only the point-of-sale software. you still need a way to settle transactions; and in each currency that you want to accept. let say for example that you want to offer a course in $USD and €Euros paid by Visa/MC/Amex. you’ll need a distinct payment settlement system for each currency, and a bank account in each currency to where the payments deposit.

      • Yafet Getachew November 2, 2018 at 12:39 am - Reply

        Oh, okay, I understand that I need different payment processors for each currency/payment method. Let’s say I have set up two payment systems one for Euro and another for USD, can an instructor or someone with sales/finance role then select which currency to offer the course in? Or do I have to implement that functionality manually? Maybe I didn’t phrase my question right the first time. Thank you very much, your help is very appreciated.

  11. rooholahmaleki September 25, 2018 at 5:28 am - Reply

    I call below url and get internal error.

    Any ideas what I am missing? Thanks for any help.


    Sep 25 12:16:37 medxj [service_variant=lms][django.request][env:sandbox] ERROR [medxj 30642] [] – Internal Server Error: /verify_student/start-flow/course-v1:q+q+q/
    Traceback (most recent call last):
    File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/”, line 41, in inner
    response = get_response(request)
    File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/”, line 249, in _legacy_get_response
    response = self._get_response(request)
    File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/”, line 187, in _get_response
    response = self.process_exception_by_middleware(e, request)
    File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/”, line 185, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
    File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/”, line 185, in inner
    return func(*args, **kwargs)
    File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/views/generic/”, line 68, in view
    return self.dispatch(request, *args, **kwargs)
    File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/views/generic/”, line 88, in dispatch
    return handler(request, *args, **kwargs)
    File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/”, line 67, in _wrapper
    return bound_func(*args, **kwargs)
    File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/contrib/auth/”, line 23, in _wrapped_view
    return view_func(request, *args, **kwargs)
    File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/”, line 63, in bound_func
    return func.__get__(self, type(self))(*args2, **kwargs2)
    File “/edx/app/edxapp/edx-platform/lms/djangoapps/verify_student/”, line 407, in get
    processors = ecommerce_api_client(request.user).payment.processors.get()
    File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/slumber/”, line 155, in get
    resp = self._request(“GET”, params=kwargs)
    File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/slumber/”, line 101, in _request
    raise exception_class(“Client Error %s: %s” % (resp.status_code, url), response=resp, content=resp.content)
    HttpClientError: Client Error 401: http://localhost:8002/api/v2/payment/processors/

  12. gang wang August 22, 2018 at 10:55 am - Reply

    great work!

    i definitely follow the instruction, but I cannot get commerce running, and btw, for hawthorn.1, the ssl configuration should be work after run certbot, and it is not necessary to modify the config file

  13. robin July 5, 2018 at 1:56 am - Reply

    This page really helps. thanks. And, there’re still some problems. in the step 4. when enable the commerce site, the 2 urls ( /basket/add/, /checkout/receipt/ ) are not found in the project : ?

    • admin July 5, 2018 at 6:08 am - Reply

      hi robin, if you haven’t already done so i’d suggest joining the Open edX Slack channel, there’s a dedicated Ecommerce channel there where you’ll find more help.

  14. Mark July 4, 2018 at 2:26 am - Reply

    Hi Lawrence, I was able to get ecommerce up and running but whenever I try to add a course in the ECAT, i get this

    Error! Failed to publish commerce data for course-v1:Business+BLDEN360LD+2018_Q3 to LMS. Authentication credentials were not provided.

    • admin July 4, 2018 at 5:44 am - Reply

      hi mark, i also got that error on my first couple of attempts. in my case it was related to settings in Step 5, which are easy to confuse.

      • Mark July 6, 2018 at 1:17 am - Reply

        Hmm, checked step 5 and doesnt seem like I made a mistake. I do know though that I don’t have discovery installed so I’m not sure what should be the value in discovery-api-url, is that necessary?

        • admin July 6, 2018 at 5:21 am - Reply

          the Ecommerce module uses the discovery service, so therein lies your current problem. more broadly, these instructions assume that you followed the community documentation to install the Native build, which would have installed discovery. if you’ve taken a different installation approach then you might be in for a bumpy road.

          • Mark August 1, 2018 at 1:01 am

            Hi lawrence, I was able to make workarounds to get past the discovery service and use api calls instead.
            Now I’ve been able to purchase courses in my tests and I do end up being enrolled afterwards but I dont seem to get the receipts. Does the ecommerce send receipts/bills?

          • admin August 1, 2018 at 5:50 am

            hi mark. yes, it does. have you setup an SMTP mail provider for your instance? if not then the messages are probably being sent but going directly to a spam folder on the receiving end.

          • Mark August 1, 2018 at 9:15 pm

            Hi lawrence, I think we do have an SMTP mail provider setup since we do get activation emails when we register but so far when I purchase a course I don’t get a receipt mailed to me.

          • Mark August 14, 2018 at 1:27 am

            Hi Lawrence,

            Could you check out my question in the google grps?

            It’s regarding switching from paypal sandbox to live in the ecommerce.
            Thanks a lot,

          • admin August 14, 2018 at 7:36 am

            hi mark, typically, yml files need to be executed by ansible in order for parameter value modifications to take effect. having said that, i’m not 100% certain that this would be the case in your google forum question given that the yml file is located in /edx/etc/ whereas playbooks are usually located in a different folder within /edx/. i don’t have access to a non-production machine in which i’d be able to experiment, so i’d encourage you to review your ecommerce install notes and look for any opportunity to re-run any of the playbooks that were part of the installation procedure.

  15. Bobby Caste June 12, 2018 at 12:07 pm - Reply

    Same problem for me. I cannot get commerce running.

    Thanks in advance, great work.

  16. Eric Mensah May 28, 2018 at 8:42 pm - Reply

    For some unknown reason, the ecommerce configuration is not working for me. I’m spent about 2 weeks trying to get it to work but nothing seems to work even though, I followed the intructions.

    Could you elaborate a bit more on the nginx and port configuration for the ecommerce?


  17. luis April 29, 2018 at 12:28 pm - Reply

    do you have any official information about configuring ssl on opedx?

  18. Luis April 29, 2018 at 11:47 am - Reply

    Very well explained, thanks!!

Leave A Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.