Name | tutor-ecommerce JSON |
Version |
19.0.0
JSON |
| download |
home_page | https://docs.tutor.edly.io/ |
Summary | A Tutor plugin for Open edX E-Commerce |
upload_time | 2024-12-16 20:55:30 |
maintainer | Edly |
docs_url | None |
author | Edly |
requires_python | >=3.9 |
license | AGPLv3 |
keywords |
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
⛔️ WARNING
===========
This plugin is deprecated as the underlying e-commerce repositories have been archived. For more details, please refer to the `tutor-ecommerce DEPR ticket <https://github.com/overhangio/tutor-ecommerce/issues/83>`_ and `upstream Open edX DEPR ticket <https://github.com/openedx/public-engineering/issues/22>`_.
E-Commerce plugin for `Tutor <https://docs.tutor.edly.io>`_
===============================================================
This is a plugin for `Tutor <https://docs.tutor.edly.io>`_ that integrates the `E-Commerce <https://github.com/openedx/ecommerce/>`__ application in an Open edX platform.
Installation
------------
This plugin requires tutor>=12.0.0, the `Discovery plugin <https://github.com/overhangio/tutor-discovery>`__ and the `MFE plugin <https://github.com/overhangio/tutor-mfe>`__. If you have installed Tutor by downloading the pre-compiled binary, then both plugins should be automatically installed. You can confirm by running::
tutor plugins list
But if you have installed tutor from source, then you also need to install the plugin from source::
tutor plugins install ecommerce
Then, in any case you need to enable the plugins::
tutor plugins enable discovery ecommerce mfe
Services will have to be re-configured and restarted, so you are probably better off just running launch again::
tutor local launch
Note that this plugins is compatible with `Kubernetes integration <http://docs.tutor.edly.io/k8s.html>`__. When deploying to a Kubernetes cluster, run instead::
tutor k8s launch
For further instructions on how to setup E-Commerce with Open edX, check the `official E-Commerce documentation <https://edx-ecommerce.readthedocs.io/en/latest/>`__.
Configuration
-------------
- ``ECOMMERCE_HOST`` (default: ``"ecommerce.{{ LMS_HOST }}"``)
- ``ECOMMERCE_PAYMENT_PROCESSORS`` (default: ``{cybersource: {...}, paypal: {...}}`` See below for details.)
- ``ECOMMERCE_ENABLE_IDENTITY_VERIFICATION``: (default: ``True``)
- ``ECOMMERCE_ENABLED_PAYMENT_PROCESSORS``: (default: ``["cybersource", "paypal"]``)
- ``ECOMMERCE_ENABLED_CLIENT_SIDE_PAYMENT_PROCESSORS`` (default: ``["cybersource"]``)
- ``ECOMMERCE_EXTRA_PAYMENT_PROCESSOR_CLASSES`` (default: ``[]``)
- ``ECOMMERCE_MYSQL_PASSWORD``: ``"{{ 8|random_string }}"``)
- ``ECOMMERCE_SECRET_KEY`` (default: ``"{{ 20|random_string }}"``)
- ``ECOMMERCE_OAUTH2_SECRET`` (default: ``"{{ 8|random_string }}"``)
- ``ECOMMERCE_API_KEY`` (default: ``"{{ 20|random_string }}"``)
- ``ECOMMERCE_DOCKER_IMAGE`` (default: ``"{{ DOCKER_REGISTRY }}overhangio/openedx-ecommerce:{{ TUTOR_VERSION }}"``)
- ``ECOMMERCE_WORKER_DOCKER_IMAGE`` (default: ``"{{ DOCKER_REGISTRY }}overhangio/openedx-ecommerce-worker:{{ TUTOR_VERSION }}"``)
- ``ECOMMERCE_MYSQL_DATABASE`` (default: ``"ecommerce"``)
- ``ECOMMERCE_MYSQL_USERNAME`` (default: ``"ecommerce"``)
- ``ECOMMERCE_CURRENCY`` (default: ``"USD"``)
- ``ECOMMERCE_OAUTH2_KEY`` (default: ``"ecommerce"``)
- ``ECOMMERCE_API_TIMEOUT`` (default: ``5``)
- ``ECOMMERCE_WORKER_JWT_ISSUER`` (default: ``"ecommerce-worker"``)
- ``ECOMMERCE_EXTRA_PIP_REQUIREMENTS`` (default: ``[]``)
You will need to modify the ``ECOMMERCE_PAYMENT_PROCESSORS`` parameter to configure your payment providers credentials. By default, it is equal to::
cybersource:
merchant_id: SET-ME-PLEASE
flex_shared_secret_key_id: SET-ME-PLEASE
flex_shared_secret_key: SET-ME-PLEASE
soap_api_url: https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor/CyberSourceTransaction_1.140.wsdl
transaction_key: SET-ME-PLEASE
flex_run_environment: cybersource.environment.sandbox
paypal:
cancel_checkout_path: /checkout/cancel-checkout/
client_id: SET-ME-PLEASE
client_secret: SET-ME-PLEASE
error_url: /checkout/error/
mode: sandbox
receipt_url: /checkout/receipt/
We suggest you modify this configuration, save it to ``ecommerce-config.yml`` and then load it with::
tutor config save --set "ECOMMERCE_PAYMENT_PROCESSORS=$(cat ecommerce-config.yml)"
Cybersource
~~~~~~~~~~~
To enable the `Cybersource <https://cybersource.com>`__ payment processor, two keys need to be generated. In your Cybersource account, go to "Payment Configuration" 🠆 "Key Management" 🠆 "Generate key". Create the following keys:
- SOAP API key: use this key to define the ``transaction_key`` setting.
- REST Shared secret: use the key ID and value to define ``flex_shared_secret_key_id`` and ``flex_shared_secret_key``, respectively.
The ``merchant_id`` setting corresponds to your Merchant ID.
If you are running in production, you need to change the ``flex_run_environment`` value in the configuration file as well. You should change the ``flex_run_environment`` value to ``cybersource.environment.production``
Operations
----------
Creating a user
~~~~~~~~~~~~~~~
The ecommerce user interface will be available at http://ecommerce.local.openedx.io for a local instance, and at ``ECOMMERCE_HOST`` (by default: ``http(s)://ecommerce.<yours lms host>``) in production. In order to run commands from the UI, a user with admin rights must be created. There are two ways to proceed. To create a brand new user in E-Commerce which will not exist in the LMS, run::
tutor local run ecommerce ./manage.py createsuperuser
Then login with this new user at: http://ecommerce.local.openedx.io/admin/
To re-use an existing LMS user, first go to http://ecommerce.local.openedx.io/login. You should be redirected to the LMS login page, then to the dashboard. Then this user must be made a staff/superuser in E-Commerce::
tutor local run ecommerce ./manage.py shell -c "from django.contrib.auth import get_user_model; get_user_model().objects.filter(email='USER@EMAIL.COM').update(is_staff=True, is_superuser=True)"
Make sure to replace ``USER@EMAIL.COM`` by the actual user email address. You should then be able to view the Oscar dashboard at http://ecommerce.local.openedx.io.
Custom payment processors
~~~~~~~~~~~~~~~~~~~~~~~~~
⚠️ WARNING: as of Lilac (Tutor v12), Open edX no longer supports custom payment processors with E-Commerce. There is an ongoing conversation about how to resolve this issue which you can follow `here <https://discuss.openedx.org/t/urgent-ecommerce-in-lilac-custom-payment-processors-broken/5055>`__.
Image customisation
~~~~~~~~~~~~~~~~~~~
E-Commerce implementations vary a lot from one country to another. If all you need are the Paypal, Cybersource and Stripe payment processors, then it should not be necessary to customize the tutor-ecommerce docker image, which contains the vanilla E-Commerce platform. However, if you need to run a fork of E-Commerce, or install extra requirements, then you should re-build the docker image. To do so, first set the appropriate settings::
tutor config save \
--set 'ECOMMERCE_EXTRA_PIP_REQUIREMENTS=["git+https://github.com/myusername/myplugin"]'
Then, build the image, pointing to your fork if necessary::
tutor images build ecommerce \
-a ECOMMERCE_REPOSITORY=https://github.com/myusername/ecommerce \
-a ECOMMERCE_VERSION=my/tag
Development
~~~~~~~~~~~
When running Tutor in development mode, the ecommerce service is accessible at http://ecommerce.local.openedx.io:8130.
To mount a local ecommerce repository in the ecommerce container, add an auto-mounted repository with::
tutor mounts add /path/to/ecommerce
Rebuild the "ecommerce" Docker image::
tutor images build ecommerce
Launch your platform again::
tutor dev launch
To attach a debugger to the ecommerce service, run::
tutor dev start ecommerce
Troubleshooting
---------------
This Tutor plugin is maintained by Muhammad Faraz Maqsood from `Edly <https://edly.io/>`__. Community support is available from the official `Open edX forum <https://discuss.openedx.org>`__. Do you need help with this plugin? See the `troubleshooting <https://docs.tutor.edly.io/troubleshooting.html>`__ section from the Tutor documentation.
Contributing
------------
Pull requests are welcome! Please read the `"contributing" section from the Tutor documentation <https://docs.tutor.edly.io/tutor.html#contributing>`__.
License
-------
This work is licensed under the terms of the `GNU Affero General Public License (AGPL) <https://github.com/overhangio/tutor-ecommerce/blob/release/LICENSE.txt>`_.
Raw data
{
"_id": null,
"home_page": "https://docs.tutor.edly.io/",
"name": "tutor-ecommerce",
"maintainer": "Edly",
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": "faraz.maqsood@arbisoft.com",
"keywords": null,
"author": "Edly",
"author_email": "hello@edly.io",
"download_url": "https://files.pythonhosted.org/packages/1b/13/834fa6bb0cc5ca57fde520c08a6be312d1722559206d06067007ecf58c7c/tutor_ecommerce-19.0.0.tar.gz",
"platform": null,
"description": "\u26d4\ufe0f WARNING\n===========\n\nThis plugin is deprecated as the underlying e-commerce repositories have been archived. For more details, please refer to the `tutor-ecommerce DEPR ticket <https://github.com/overhangio/tutor-ecommerce/issues/83>`_ and `upstream Open edX DEPR ticket <https://github.com/openedx/public-engineering/issues/22>`_.\n\nE-Commerce plugin for `Tutor <https://docs.tutor.edly.io>`_\n===============================================================\n\nThis is a plugin for `Tutor <https://docs.tutor.edly.io>`_ that integrates the `E-Commerce <https://github.com/openedx/ecommerce/>`__ application in an Open edX platform.\n\nInstallation\n------------\n\nThis plugin requires tutor>=12.0.0, the `Discovery plugin <https://github.com/overhangio/tutor-discovery>`__ and the `MFE plugin <https://github.com/overhangio/tutor-mfe>`__. If you have installed Tutor by downloading the pre-compiled binary, then both plugins should be automatically installed. You can confirm by running::\n\n tutor plugins list\n\nBut if you have installed tutor from source, then you also need to install the plugin from source::\n\n tutor plugins install ecommerce\n\nThen, in any case you need to enable the plugins::\n\n tutor plugins enable discovery ecommerce mfe\n\nServices will have to be re-configured and restarted, so you are probably better off just running launch again::\n\n tutor local launch\n\nNote that this plugins is compatible with `Kubernetes integration <http://docs.tutor.edly.io/k8s.html>`__. When deploying to a Kubernetes cluster, run instead::\n\n tutor k8s launch\n\nFor further instructions on how to setup E-Commerce with Open edX, check the `official E-Commerce documentation <https://edx-ecommerce.readthedocs.io/en/latest/>`__.\n\nConfiguration\n-------------\n\n- ``ECOMMERCE_HOST`` (default: ``\"ecommerce.{{ LMS_HOST }}\"``)\n- ``ECOMMERCE_PAYMENT_PROCESSORS`` (default: ``{cybersource: {...}, paypal: {...}}`` See below for details.)\n- ``ECOMMERCE_ENABLE_IDENTITY_VERIFICATION``: (default: ``True``)\n- ``ECOMMERCE_ENABLED_PAYMENT_PROCESSORS``: (default: ``[\"cybersource\", \"paypal\"]``)\n- ``ECOMMERCE_ENABLED_CLIENT_SIDE_PAYMENT_PROCESSORS`` (default: ``[\"cybersource\"]``)\n- ``ECOMMERCE_EXTRA_PAYMENT_PROCESSOR_CLASSES`` (default: ``[]``)\n- ``ECOMMERCE_MYSQL_PASSWORD``: ``\"{{ 8|random_string }}\"``)\n- ``ECOMMERCE_SECRET_KEY`` (default: ``\"{{ 20|random_string }}\"``)\n- ``ECOMMERCE_OAUTH2_SECRET`` (default: ``\"{{ 8|random_string }}\"``)\n- ``ECOMMERCE_API_KEY`` (default: ``\"{{ 20|random_string }}\"``)\n- ``ECOMMERCE_DOCKER_IMAGE`` (default: ``\"{{ DOCKER_REGISTRY }}overhangio/openedx-ecommerce:{{ TUTOR_VERSION }}\"``)\n- ``ECOMMERCE_WORKER_DOCKER_IMAGE`` (default: ``\"{{ DOCKER_REGISTRY }}overhangio/openedx-ecommerce-worker:{{ TUTOR_VERSION }}\"``)\n- ``ECOMMERCE_MYSQL_DATABASE`` (default: ``\"ecommerce\"``)\n- ``ECOMMERCE_MYSQL_USERNAME`` (default: ``\"ecommerce\"``)\n- ``ECOMMERCE_CURRENCY`` (default: ``\"USD\"``)\n- ``ECOMMERCE_OAUTH2_KEY`` (default: ``\"ecommerce\"``)\n- ``ECOMMERCE_API_TIMEOUT`` (default: ``5``)\n- ``ECOMMERCE_WORKER_JWT_ISSUER`` (default: ``\"ecommerce-worker\"``)\n- ``ECOMMERCE_EXTRA_PIP_REQUIREMENTS`` (default: ``[]``)\n\nYou will need to modify the ``ECOMMERCE_PAYMENT_PROCESSORS`` parameter to configure your payment providers credentials. By default, it is equal to::\n\n cybersource:\n merchant_id: SET-ME-PLEASE\n flex_shared_secret_key_id: SET-ME-PLEASE\n flex_shared_secret_key: SET-ME-PLEASE\n soap_api_url: https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor/CyberSourceTransaction_1.140.wsdl\n transaction_key: SET-ME-PLEASE\n flex_run_environment: cybersource.environment.sandbox\n paypal:\n cancel_checkout_path: /checkout/cancel-checkout/\n client_id: SET-ME-PLEASE\n client_secret: SET-ME-PLEASE\n error_url: /checkout/error/\n mode: sandbox\n receipt_url: /checkout/receipt/\n\nWe suggest you modify this configuration, save it to ``ecommerce-config.yml`` and then load it with::\n\n tutor config save --set \"ECOMMERCE_PAYMENT_PROCESSORS=$(cat ecommerce-config.yml)\"\n\nCybersource\n~~~~~~~~~~~\n\nTo enable the `Cybersource <https://cybersource.com>`__ payment processor, two keys need to be generated. In your Cybersource account, go to \"Payment Configuration\" \ud83e\udc06 \"Key Management\" \ud83e\udc06 \"Generate key\". Create the following keys:\n\n- SOAP API key: use this key to define the ``transaction_key`` setting.\n- REST Shared secret: use the key ID and value to define ``flex_shared_secret_key_id`` and ``flex_shared_secret_key``, respectively.\n\nThe ``merchant_id`` setting corresponds to your Merchant ID.\n\nIf you are running in production, you need to change the ``flex_run_environment`` value in the configuration file as well. You should change the ``flex_run_environment`` value to ``cybersource.environment.production``\n\nOperations\n----------\n\nCreating a user\n~~~~~~~~~~~~~~~\n\nThe ecommerce user interface will be available at http://ecommerce.local.openedx.io for a local instance, and at ``ECOMMERCE_HOST`` (by default: ``http(s)://ecommerce.<yours lms host>``) in production. In order to run commands from the UI, a user with admin rights must be created. There are two ways to proceed. To create a brand new user in E-Commerce which will not exist in the LMS, run::\n\n tutor local run ecommerce ./manage.py createsuperuser\n\nThen login with this new user at: http://ecommerce.local.openedx.io/admin/\n\nTo re-use an existing LMS user, first go to http://ecommerce.local.openedx.io/login. You should be redirected to the LMS login page, then to the dashboard. Then this user must be made a staff/superuser in E-Commerce::\n\n tutor local run ecommerce ./manage.py shell -c \"from django.contrib.auth import get_user_model; get_user_model().objects.filter(email='USER@EMAIL.COM').update(is_staff=True, is_superuser=True)\"\n\nMake sure to replace ``USER@EMAIL.COM`` by the actual user email address. You should then be able to view the Oscar dashboard at http://ecommerce.local.openedx.io.\n\n\nCustom payment processors\n~~~~~~~~~~~~~~~~~~~~~~~~~\n\n\u26a0\ufe0f WARNING: as of Lilac (Tutor v12), Open edX no longer supports custom payment processors with E-Commerce. There is an ongoing conversation about how to resolve this issue which you can follow `here <https://discuss.openedx.org/t/urgent-ecommerce-in-lilac-custom-payment-processors-broken/5055>`__.\n\nImage customisation\n~~~~~~~~~~~~~~~~~~~\n\nE-Commerce implementations vary a lot from one country to another. If all you need are the Paypal, Cybersource and Stripe payment processors, then it should not be necessary to customize the tutor-ecommerce docker image, which contains the vanilla E-Commerce platform. However, if you need to run a fork of E-Commerce, or install extra requirements, then you should re-build the docker image. To do so, first set the appropriate settings::\n\n tutor config save \\\n --set 'ECOMMERCE_EXTRA_PIP_REQUIREMENTS=[\"git+https://github.com/myusername/myplugin\"]'\n\nThen, build the image, pointing to your fork if necessary::\n\n tutor images build ecommerce \\\n -a ECOMMERCE_REPOSITORY=https://github.com/myusername/ecommerce \\\n -a ECOMMERCE_VERSION=my/tag\n\nDevelopment\n~~~~~~~~~~~\n\nWhen running Tutor in development mode, the ecommerce service is accessible at http://ecommerce.local.openedx.io:8130.\n\nTo mount a local ecommerce repository in the ecommerce container, add an auto-mounted repository with::\n\n tutor mounts add /path/to/ecommerce\n\nRebuild the \"ecommerce\" Docker image::\n\n tutor images build ecommerce\n\nLaunch your platform again::\n\n tutor dev launch\n\nTo attach a debugger to the ecommerce service, run::\n\n tutor dev start ecommerce\n\nTroubleshooting\n---------------\n\nThis Tutor plugin is maintained by Muhammad Faraz Maqsood from `Edly <https://edly.io/>`__. Community support is available from the official `Open edX forum <https://discuss.openedx.org>`__. Do you need help with this plugin? See the `troubleshooting <https://docs.tutor.edly.io/troubleshooting.html>`__ section from the Tutor documentation.\n\nContributing\n------------\n\nPull requests are welcome! Please read the `\"contributing\" section from the Tutor documentation <https://docs.tutor.edly.io/tutor.html#contributing>`__.\n\nLicense\n-------\n\nThis work is licensed under the terms of the `GNU Affero General Public License (AGPL) <https://github.com/overhangio/tutor-ecommerce/blob/release/LICENSE.txt>`_.\n",
"bugtrack_url": null,
"license": "AGPLv3",
"summary": "A Tutor plugin for Open edX E-Commerce",
"version": "19.0.0",
"project_urls": {
"Code": "https://github.com/overhangio/tutor-ecommerce",
"Community": "https://discuss.openedx.org",
"Documentation": "https://docs.tutor.edly.io/",
"Homepage": "https://docs.tutor.edly.io/",
"Issue tracker": "https://github.com/overhangio/tutor-ecommerce/issues"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "1b13834fa6bb0cc5ca57fde520c08a6be312d1722559206d06067007ecf58c7c",
"md5": "4e77940c6b3e79569b5ae53db9471571",
"sha256": "64bd79e5e89d29f304455245eb61a1937e18b2c839035e15aa535ef8d256b977"
},
"downloads": -1,
"filename": "tutor_ecommerce-19.0.0.tar.gz",
"has_sig": false,
"md5_digest": "4e77940c6b3e79569b5ae53db9471571",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 27947,
"upload_time": "2024-12-16T20:55:30",
"upload_time_iso_8601": "2024-12-16T20:55:30.300679Z",
"url": "https://files.pythonhosted.org/packages/1b/13/834fa6bb0cc5ca57fde520c08a6be312d1722559206d06067007ecf58c7c/tutor_ecommerce-19.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-16 20:55:30",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "overhangio",
"github_project": "tutor-ecommerce",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "tutor-ecommerce"
}