mirumee / django-prices-vatlayer

Vatlayer API support for django-prices
BSD 3-Clause "New" or "Revised" License
15 stars 15 forks source link

Make HTTPS optional for fetching #6

Closed NyanKiyoshi closed 6 years ago

NyanKiyoshi commented 6 years ago

Hi!

A little issue when fetching the tax rates with DEBUG = False, if fetches tax rates but the user may not have a paid vat-layer account.

django.core.exceptions.ImproperlyConfigured: Access Restricted - Your current Subscription Plan does not support HTTPS Encryption.

cf. https://github.com/mirumee/django-prices-vatlayer/blob/245fd7571471c26cdf5f8aa0c8a5300a5c097915/django_prices_vatlayer/utils.py#L16-L17

Proposed solution

We could add a new settings key VATLAYER_USE_HTTPS set to False by default as the paid user may be looking to ensure HTTPS.

NyanKiyoshi commented 6 years ago

Any feedback?

maarcingebala commented 6 years ago

I agree we should add such setting since HTTPS is available only in paid plans.