Failed to enroll (using checkout) to a course as a user with student role

Hello,

I have installed tutor version 3.12.4 on a google cloud VM.

I have the following plugins installed:
discovery==0.1.17
ecommerce==0.1.13
minio==0.1.5
notes==0.1.7
xqueue==0.2.2

All the functionality on the site works fine.

However, the ecommerce module is not working correctly.

I have configured “stripe” as the only available payment processor. I am able to enroll into a course as “admin” user.

I see the following webpage view at url https://ecommerce.redbench.academy/basket/:
Admin checkout

However enrolling as a student user, the i am incorrectly directed to the following webpage view for url https://ecommerce.redbench.academy/basket/:
Student checkout

Also in both cases, ecommerce service fails to fetch course run information from discovery service and logs the following error:

discovery_1         | 2020-06-14 20:49:04,057 WARNING 15 [django.request] /openedx/venv/lib/python3.5/site-packages/django/core/han
dlers/base.py:152 - Not Found: /api/v1/course_runs/course-v1:RedBench+TC1+2020_R1/
discovery_1         | 2020-06-14 20:49:04,057 WARNING 15 [django.request] /openedx/venv/lib/python3.5/site-packages/django/core/han
dlers/base.py:152 - Not Found: /api/v1/course_runs/course-v1:RedBench+TC1+2020_R1/
discovery_1         | 2020-06-14 20:49:04,057 WARNING 15 [django.request] /openedx/venv/lib/python3.5/site-packages/django/core/han
dlers/base.py:152 - Not Found: /api/v1/course_runs/course-v1:RedBench+TC1+2020_R1/
ecommerce_1         | 2020-06-14 20:49:04,061 ERROR 17 [ecommerce.extensions.basket.views] /openedx/ecommerce/ecommerce/extensions/
basket/views.py:183 - Failed to retrieve data from Discovery Service for course [course-v1:RedBench+TC1+2020_R1].
ecommerce_1         | Traceback (most recent call last):
ecommerce_1         |   File "/openedx/ecommerce/ecommerce/extensions/basket/views.py", line 168, in _get_course_data
ecommerce_1         |     course = get_course_info_from_catalog(self.request.site, product)
ecommerce_1         |   File "/openedx/ecommerce/ecommerce/courses/utils.py", line 45, in get_course_info_from_catalog
ecommerce_1         |     course = api.course_runs(key).get(partner=partner_short_code)
ecommerce_1         |   File "/openedx/venv/local/lib/python2.7/site-packages/slumber/__init__.py", line 155, in get
ecommerce_1         |     resp = self._request("GET", params=kwargs)
ecommerce_1         |   File "/openedx/venv/local/lib/python2.7/site-packages/slumber/__init__.py", line 101, in _request
ecommerce_1         |     raise exception_class("Client Error %s: %s" % (resp.status_code, url), response=resp, content=resp.conten
t)
ecommerce_1         | HttpNotFoundError: Client Error 404: https://discovery.redbench.academy/api/v1/course_runs/course-v1:RedBench+TC1+2020_R1/

I will really appreciate any help in fixing this issue.

Thanks a bunch.

Hi! Can you try to upgrade to tutor v10+ (and also upgrade the ecommerce/discovery plugins) to see if this is resolved in the latest release?

Thanks @regis for the response. We just found the root cause for the issue. The flag “enable_client_side_checkout” was “true” only for “superuser”. I used the django admin UI for ecommerce site and enabled the flag true for “authenticated” users. With that change, I am able to enroll into a course in the “learner” role.

The only pending issue we have now involves discovery service returning a “404” during the checkout flow for url https://discovery.redbench.academy/api/v1/course_runs/course-v1:RedBench+TC1+2020_R1/