Skip to main content

External Checkout Plugin

A django app plugin to add a new API to Open edX for external checkouts. The plugin redirects the user the desired external ecommerce service upon clicking the Upgrade button in LMS dashboard or Learning MFE.

Version Compatibility

For this plugin’s compatibility with Open edX, see the Open edX Release Compatibility table.

Installation

For detailed installation instructions, please refer to the plugin installation guide.

Installation required in:

  • LMS

Configuration

1) edx-platform configuration (Environment/Settings)

  • You might need to add the following configuration values to the config file in Open edX. For any release after Juniper, that config file is /edx/etc/lms.yml. If you’re using private.py, add these values to lms/envs/private.py. These should be added to the top level. Ask a fellow developer or devops for these values.

    MARKETING_SITE_CHECKOUT_URL = <MARKETING_SITE_CHECKOUT_URL>  # The URL of checkout/cart API in your marketing site
    ECOMMERCE_PUBLIC_URL_ROOT = <LMS_BASE_URL>  # Because we want to use external ecommerce using this API plugin for redirection
  • For Tutor installations, these values can also be managed through a custom tutor plugin.

2) edx-platform configuration (Django Admin)

1. Create a new ecommerce configuration in http://<LMS_BASE>/admin/commerce/commerceconfiguration with following values:

    a. Set value for "Basket checkout page" to "/checkout-external/". (When set, the ecommerce will redirect the `Upgrade Course` requests to this plugin)

    b. "Enabled" checked.

    c. "Checkout on ecommerce service" checked.

    d. Other values are arbitrary, but you can fill them out as per your need.

2. Make sure to create CourseModes(e.g. "Verified") for the courses with non-empty and unique SKU value.

How To Use

The API supports a GET call with SKU as query parameter.

API Request

To manually call the API, Send a GET request to <LMS_BASE>/checkout-external?sku=<sku_id>:

A sample request looks like below:

http://local.openedx.io:8000/checkout-external?sku=ABC45F

API Response

The successful response would be a redirect to the marketing site with 302 status code and a failure response would be a 400 status code with basic error fields.

With 302 status code (If your marketing checkout URL is "https://<marketing_site_base>/checkout") the resulting redirect would be:

https://<marketing_site_base>/checkout/?course_id=<course_id against the sku in CourseMode>
With 400 status code

{
    "developer_message": "<Message for the developer>",
    "error_code": "internal_error"
}

Metadata

Release files for ol-openedx-checkout-external 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ol-openedx-checkout-external 0.3.1
File Size Uploaded Provenance Actions
ol_openedx_checkout_external-0.3.1.tar.gz 4.7 kB Without provenance Details for ol_openedx_checkout_external-0.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ol-openedx-checkout-external 0.3.1
File Interpreter ABI Platform Actions
ol_openedx_checkout_external-0.3.1-py3-none-any.whl Python 3 none any Details for ol_openedx_checkout_external-0.3.1-py3-none-any.whl

Total release size: 12.2 kB

Release files / ol_openedx_checkout_external-0.3.1.tar.gz

Download URL ol_openedx_checkout_external-0.3.1.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
bd9eb4a81a9e9cada5f3165ae7a43260ff7a8f0acd90eaf1d2bdcf1834cf9a26
BLAKE2b-256 checksum
How to use checksums
be0d6278d4954f3579e76b8c3df16fd4f31a879df73749550f72d200e1f0cc97
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Release files / ol_openedx_checkout_external-0.3.1-py3-none-any.whl

Download URL ol_openedx_checkout_external-0.3.1-py3-none-any.whl
Size 7.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2f429ef260a121b4977e9860ea48f8dcd87c90f64f3015d021e97e64c869d3d2
BLAKE2b-256 checksum
How to use checksums
f164e4f2601ebafa216845c9071ed42ad2e31db8a331a01decc4c8bfe19305b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Security for ol-openedx-checkout-external 0.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page