overhangio / tutor-ecommerce

Ecommerce plugin for Tutor
GNU Affero General Public License v3.0
17 stars 50 forks source link

feat: upgrade to Palm #42

Closed regisb closed 1 year ago

regisb commented 1 year ago

Hey @Faraz32123 did you actually run the ecommerce service? I'm seeing an error on due to an incorrect setting:

$ tutor local start ecommerce
...
tutor_local-ecommerce-1  |     from ecommerce.extensions.urls import urlpatterns as extensions_patterns
tutor_local-ecommerce-1  |   File "/openedx/ecommerce/./ecommerce/extensions/urls.py", line 11, in <module>
tutor_local-ecommerce-1  |     url(r'^api/', include(('ecommerce.extensions.api.urls', 'api'))),
tutor_local-ecommerce-1  |   File "/openedx/venv/lib/python3.8/site-packages/django/urls/conf.py", line 34, in include
tutor_local-ecommerce-1  |     urlconf_module = import_module(urlconf_module)
tutor_local-ecommerce-1  |   File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
tutor_local-ecommerce-1  |     return _bootstrap._gcd_import(name[level:], package, level)
tutor_local-ecommerce-1  |   File "/openedx/ecommerce/./ecommerce/extensions/api/urls.py", line 6, in <module>
tutor_local-ecommerce-1  |     url(r'^v2/', include(('ecommerce.extensions.api.v2.urls', 'v2'))),
tutor_local-ecommerce-1  |   File "/openedx/venv/lib/python3.8/site-packages/django/urls/conf.py", line 34, in include
tutor_local-ecommerce-1  |     urlconf_module = import_module(urlconf_module)
tutor_local-ecommerce-1  |   File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
tutor_local-ecommerce-1  |     return _bootstrap._gcd_import(name[level:], package, level)
tutor_local-ecommerce-1  |   File "/openedx/ecommerce/./ecommerce/extensions/api/v2/urls.py", line 26, in <module>
tutor_local-ecommerce-1  |     from ecommerce.extensions.api.v2.views import webhooks as webhooks_views
tutor_local-ecommerce-1  |   File "/openedx/ecommerce/./ecommerce/extensions/api/v2/views/webhooks.py", line 17, in <module>
tutor_local-ecommerce-1  |     stripe.api_key = settings.PAYMENT_PROCESSOR_CONFIG['edx']['stripe']['secret_key']
tutor_local-ecommerce-1  | KeyError: 'stripe'
Faraz32123 commented 1 year ago

Hey @Faraz32123 did you actually run the ecommerce service? I'm seeing an error on due to an incorrect setting:

$ tutor local start ecommerce
...
tutor_local-ecommerce-1  |     from ecommerce.extensions.urls import urlpatterns as extensions_patterns
tutor_local-ecommerce-1  |   File "/openedx/ecommerce/./ecommerce/extensions/urls.py", line 11, in <module>
tutor_local-ecommerce-1  |     url(r'^api/', include(('ecommerce.extensions.api.urls', 'api'))),
tutor_local-ecommerce-1  |   File "/openedx/venv/lib/python3.8/site-packages/django/urls/conf.py", line 34, in include
tutor_local-ecommerce-1  |     urlconf_module = import_module(urlconf_module)
tutor_local-ecommerce-1  |   File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
tutor_local-ecommerce-1  |     return _bootstrap._gcd_import(name[level:], package, level)
tutor_local-ecommerce-1  |   File "/openedx/ecommerce/./ecommerce/extensions/api/urls.py", line 6, in <module>
tutor_local-ecommerce-1  |     url(r'^v2/', include(('ecommerce.extensions.api.v2.urls', 'v2'))),
tutor_local-ecommerce-1  |   File "/openedx/venv/lib/python3.8/site-packages/django/urls/conf.py", line 34, in include
tutor_local-ecommerce-1  |     urlconf_module = import_module(urlconf_module)
tutor_local-ecommerce-1  |   File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
tutor_local-ecommerce-1  |     return _bootstrap._gcd_import(name[level:], package, level)
tutor_local-ecommerce-1  |   File "/openedx/ecommerce/./ecommerce/extensions/api/v2/urls.py", line 26, in <module>
tutor_local-ecommerce-1  |     from ecommerce.extensions.api.v2.views import webhooks as webhooks_views
tutor_local-ecommerce-1  |   File "/openedx/ecommerce/./ecommerce/extensions/api/v2/views/webhooks.py", line 17, in <module>
tutor_local-ecommerce-1  |     stripe.api_key = settings.PAYMENT_PROCESSOR_CONFIG['edx']['stripe']['secret_key']
tutor_local-ecommerce-1  | KeyError: 'stripe'

Hi. @regisb , I actually run the plugin, but I had to change ecommerce-config.yml file, which contains { "cybersource": { "flex_shared_secret_key": "SET-ME-PLEASE", "flex_shared_secret_key_id": "SET-ME-PLEASE", "merchant_id": "SET-ME-PLEASE", "soap_api_url": "https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor/CyberSourceTransaction_1.140.wsdl", "transaction_key": "SET-ME-PLEASE" }, "paypal": { "cancel_checkout_path": "/checkout/cancel-checkout/", "client_id": "sett", "client_secret": "set", "error_url": "/checkout/error/", "mode": "sandbox", "receipt_url": "/checkout/receipt/" }, "stripe": { "country": "US", "publishable_key": "set", "secret_key": "set", "webhook_endpoint_secret": "set", } } I should have updated the readme file.

regisb commented 1 year ago

Right! Instead, I added a dummy entry to the ecommerce settings. We'll see whether that's enough. I also managed to remove the "common" key, which is not necessary as far as I understand.