Testing Open edX e-commerce features

Buyer Perspective

The first half of this article will focus on the workflow of purchasing and enrolling in a paid course. When testing this process, you will be "purchasing" the course on sandbox.paypal.com, which means you will not be actually charged for purchasing the course. Sandbox.paypal.com will simply "go through the motions" of what it looks like to do so.

Note: In order to do this, you must have sandbox.paypal.com buyer credentials. It is important to use your own Paypal Sandbox account because that means that you have correctly configured Paypal on your end. That way when you begin actually collecting payment, we can be confident the funds will go to the correct place.

1. Select the course you would like to purchase.

Beginning from the /courses page, click into the course you would like to simulate purchasing.

This will take you to that particular course's About page, where you should see a button that says "Enroll in [Course Name]"

2. Click "Enroll in [Course Name]"

If, at this point you have not logged into your Open edX account, you will be prompted to register an account or login if you already have one. After you log in, you will be redirected to the next step.

If you were already logged into your Open edX account, you will simply be immediately redirected to the next step.

3. You will be taken to your organization's ecommerce basket page. Click "Checkout with PayPal"

Clicking the "Checkout with PayPal" button will then redirect you to sandbox.paypal.com.

4. Log into sandbox.paypal.com using the your buyer credentials

If you do not know what these are, please contact Appsembler.

5. Complete the purchase process in sandbox.paypal.com

Remember, this is a testing environment, built by paypal to test integrations with other platforms like Open edX. That means that features are limited, but everything you see and do here will be exactly how a real PayPal environment will react and interface with Open edX.

Note: We do not recommend attempting to add alternative payment options or shipping addresses. It won't make any difference in the end, and sandbox.paypal.com is not set up to support such variables.

6. View your receipt and return to Open edX

That's all there is to it! After completing the purchase simulation in sandbox.paypal.com, you will be shown a purchase confirmation like the one below. This page will have a link back to your LMS dashboard where the course will now appear available.