Stripe configuration for Tutor, Juniper Open edX release

We use the Stripe as Payment Processor.

  1. Create an account or test account in Stripe, and get the api keys.

https://dashboard.stripe.com/test/dashboard

  1. Create ecommerce-config.yml

Fill in the details of the api keys. Keep the file secure.

stripe:
  publishable_key: pk_test_XXXX
  secret_key: sk_test_XXX
  country: db
  1. Set up the payment processor in tutor.
tutor config save --set "ECOMMERCE_PAYMENT_PROCESSORS=$(cat ecommerce-config.yml)" \
 --set 'ECOMMERCE_ENABLED_PAYMENT_PROCESSORS=["stripe"]' \
 --set 'ECOMMERCE_ENABLED_CLIENT_SIDE_PAYMENT_PROCESSORS=["stripe"]'
tutor local init --limit=ecommerce
  1. Create Commerce Configuration in Django LMS Dashboard

In the django administration dashboard, section “Home › Commerce › Commerce configurations”

https://tutor.yoursite.com/admin/commerce/commerceconfiguration/

Add Commerce Configuration

Enabled: True
Checkout on ecommerce service: True
Basket checkout page:	/basket/add/
Cache Time To Live: 360
Receipt page: /checkout/receipt/?order_number=
Enable automatic refund approval: True
  1. Create waffle flag in Django Ecommerce Dashboard

In the django administration dashboard, section “Home › django-waffle › Flags › enable_client_side_checkout”

https://ecommerce.tutor.yoursite.com/admin/waffle/flag/

Add:

Name: enable_client_side_checkout
Everyone: Yes
Superusers: True
Staff: True
Authenticated: True
Note: This flag determines if the integrated/client-side checkout flow should be enabled.

More info in: Stripe ecommerce checkout errors - #7 by Headhurts - Tutor - Overhang.IO

  1. Create a course in the E-Commerce Courses page

Get the course key from the LMS by navigating to a course and examining its URL. The course key should look something like course-v1:edX+DemoX+Demo_Course.

Navigate to the E-Commerce Courses page (https://ecommerce.tutor.yoursite.com/courses/) to add the two test courses that are on your LMS instance to E-Commerce. Configure one course as a “Verified” course.

e.g.: https://ecommerce.tutor.yoursite.com/courses/course-v1:edX+DemoX+Demo_Course

Check different types of enrollment tracks in the documentation resources below.

  1. Enroll in a Paid Course in the LMS

e.g.: With a student account, go to the configured paid course:

https://tutor.yoursite.com/courses/course-v1:edX+DemoX+Demo_Course/about

and click on “Enroll Now”

That will redirect to the ecommerce module in: https://ecommerce.tutor.yoursite.com/basket/

  1. Use a test card to complete the checkout.

Get a Test Card from: https://stripe.com/docs/testing#cards

  1. Check the Ecommerce Dashboard to get an overview of the payments:

With an administrator account go to:

https://ecommerce.tutor.yoursite.com/dashboard/

  1. Check the status of the payments in the stripe dashboard:

https://dashboard.stripe.com/test/payments?status[]=successful

Documentation used to configure the ecommerce module

https://edx.readthedocs.io/projects/edx-installing-configuring-and-running/en/open-release-juniper.master/glossary.html?highlight=fees#e

https://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/named-release-cypress/running_course/manage_course_fees.html#set-the-price-of-the-course

https://edx.readthedocs.io/projects/edx-installing-configuring-and-running/en/latest/ecommerce/test_ecommerce.html

PD:
Tutor has his own discuss instance: discuss.overhang.io

4 Likes