Skip to main content
https://circleci.com/gh/eduNEXT/ecommerce-extensions.svg?style=shield https://codecov.io/gh/eduNEXT/ecommerce-extensions/branch/main/graph/badge.svg

This repository contains an external django application, which adds multiple funtionalities in order to extend the ecommerce behaviour and avoid changing the base code directly.

Installation

Install with pip:

pip install django-oauth-toolkit

Add ecommerce_extensions.apps.EcommerceExtensionsConfig to your INSTALLED_APPS, if you want to use payment processors, and add ecommerce_extensions.tenant.apps.TenantConfig to your INSTALLED_APPS, if you want to use TenantOptions.

INSTALLED_APPS = (
    ...
    'ecommerce_extensions.apps.EcommerceExtensionsConfig',
    'ecommerce_extensions.tenant.apps.TenantConfig',
)

Usage

  1. Add model TenantOptions: This model allows to override settings by tenant and it can be found in <ecommerce-site>/admin/edunext/tenantoptions/

  2. Add new payment processors.

Integrate payment processors.

The django application offers some integrations listed below:

  • Payu payment processor.

  • Fomopay payment processor.

In order to activate these processor some configuratios are required.

  1. Add urls. File ecommerce/extensions/payment/urls.py

from ecommerce_extensions.urls import urlpatterns as url_extensions
...

urlpatterns = [
    url('', include((url_extensions, 'ecommerce_extensions'))),
    ...
]
  1. Add payment processors. File ecommerce/settings/_oscar.py

PAYMENT_PROCESSORS = (
    ...
    'ecommerce_extensions.payment.processors.payu.Payu',
    'ecommerce_extensions.payment.processors.fomopay.Fomopay',
)
  1. Add html buttons. File ecommerce/templates/oscar/basket/partials/hosted_checkout_basket.html

{% for processor in payment_processors %}
    <button data-track-type="click"
            data-track-event="edx.bi.ecommerce.basket.payment_selected"
            data-track-category="checkout"
            data-processor-name="{{ processor.NAME|lower }}"
            data-track-checkout-type="hosted"
            class="btn payment-button"
            id="{{ processor.NAME|lower }}">
        {% if processor.NAME == 'cybersource' %}
            {% trans "Checkout" as tmsg %}{{ tmsg | force_escape }}
        {% elif processor.NAME == 'paypal' %}
            {# Translators: Do NOT translate the name PayPal. #}
            {% trans "Checkout with PayPal" as tmsg %}{{ tmsg | force_escape }}
        {% elif processor.NAME == 'payu' %}
            {# Translators: Do NOT translate the name PayU. #}
            {% trans "Checkout with PayU" as tmsg %}{{ tmsg | force_escape }}
        {% elif processor.NAME == 'fomopay' %}
            {# Translators: Do NOT translate the name WeChat. #}
            {% trans "Checkout with WeChat" as tmsg %}{{ tmsg | force_escape }}
        {% endif %}
    </button>
{% endfor %}

How to Contribute

Contributions are welcome! See our CONTRIBUTING file for more information – it also contains guidelines for how to maintain high code quality, which will make your contribution more likely to be accepted.

Metadata

Release files for ecommerce-extensions 1.4.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 ecommerce-extensions 1.4.1
File Size Uploaded
ecommerce_extensions-1.4.1.tar.gz 56.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ecommerce-extensions 1.4.1
File Interpreter ABI Platform
ecommerce_extensions-1.4.1-py3-none-any.whl Python 3 none any Details

Total release size: 130.9 kB

Release files / ecommerce_extensions-1.4.1.tar.gz

Download URL ecommerce_extensions-1.4.1.tar.gz
Size 56.3 kB
Tags Source
SHA-256 checksum
How to use checksums
240cc2bfb0bc592a82556ef019a1a66b84dfec05080c56f40f14144657134b5d
BLAKE2b-256 checksum
How to use checksums
3892454f4136156261733b84bde15fb6937763d3bd857d67bb53b7303864697e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.8.2 requests/2.25.1 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.5.10

Release files / ecommerce_extensions-1.4.1-py3-none-any.whl

Download URL ecommerce_extensions-1.4.1-py3-none-any.whl
Size 74.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5c5c3737dab9081394b47858165ee456d795d9614596439e5f4e1265ad72f2f2
BLAKE2b-256 checksum
How to use checksums
d3163c2e3d42908c59a43d8850d6ff8973063811ef8eff670a69f14e3b6be105
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.8.2 requests/2.25.1 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.5.10

Release history Release notifications | RSS feed

This release

1.4.1 This release

2 release files

1.4.0

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

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