{ "info": { "author": "David Winterbottom", "author_email": "david.winterbottom@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: Unix", "Programming Language :: Python" ], "description": "====================================\nAvalara integration for django-oscar\n====================================\n\nThis package provides integration between Avalara_ and Oscar_. Avalara is a\nservice that provides accurate sales tax calculations in the US.\n\n.. _Avalara: http://avalara.com\n.. _Oscar: http://oscarcommerce.com\n\nUseful documentation:\n\n* `Avalara docs `_\n\nStatus:\n\n.. image:: https://secure.travis-ci.org/tangentlabs/django-oscar-avalara.png?branch=master\n :target: http://travis-ci.org/#!/tangentlabs/django-oscar-avalara\n\nInstallation\n============\n\nInstall from PyPI::\n\n $ pip install django-oscar-avalara\n\nor Github::\n\n $ pip install git+https://github.com/tangentlabs/django-oscar-avalara.git\n\nthen add ``'avalara'`` to ``INSTALLED_APPS``.\n\nSpecify the following settings:\n\n* ``AVALARA_ACCOUNT_NUMBER``\n* ``AVALARA_LICENSE_KEY`` \n* ``AVALARA_COMPANY_CODE`` \n\nYou should have been provided with these details when you signed up with Avalara.\n\nWhen not in production, set ``AVALARA_TEST_MODE = True`` to make requests\nto the Avalara development server.\n\nThis package uses a named logger ``'avalara'`` so it is normally useful to\ndefine handlers to this logger.\n\nUsage\n=====\n\nTo integrate Avalara into checkout, you need to override two methods from the\ncheckout view class ``PaymentDetailsView``.\n\nFirst override ``build_submission`` to apply taxes to the basket and shipping\nmethod:\n\n.. code:: python\n\n from oscar.apps.checkout import views\n from django.contrib import messages\n from django.template import loader\n\n import avalara\n\n class PaymentDetailsView(views.PaymentDetailsView):\n\n ...\n\n def build_submission(self, **kwargs):\n submission = super(PaymentDetailsView, self).build_submission(**kwargs)\n\n # Fetch and apply taxes to submission dict\n try:\n avalara.apply_taxes_to_submission(submission)\n except avalara.InvalidAddress, e:\n msg = loader.render_to_string(\n 'avalara/messages/invalid_address.html',\n {'error': e.message})\n messages.error(self.request, msg, extra_tags=\"safe noicon\")\n\n return submission\n\nHere we are passing the submission dict to ``apply_taxes_to_submission`` which\nwill look up the appropriate taxes and apply them in place to the basket and\nshipping method instances.\n\nWe also watch out for ``InvalidAddress`` exceptions which will be raised if\nAvalara is unable to find a tax jurisdiction for the passed shipping address.\n\nFinally, override ``handle_successful_order`` to submit the placed order to\nAvalara:\n\n.. code:: python\n\n from oscar.apps.checkout import views\n from django.contrib import messages\n from django.template import loader\n\n import avalara\n\n class PaymentDetailsView(views.PaymentDetailsView):\n\n ...\n\n def handle_successful_order(self, order):\n response = super(PaymentDetailsView, self).handle_successful_order(\n order)\n\n # Submit tax information to Avalara\n try:\n avalara.submit(order)\n except Exception:\n # Tax can be re-submitted later so we swallow all possible\n # exceptions and log them.\n logger.error(\"Unable to submit tax information for order %s\",\n order.number, exc_info=True)\n\n return response\n\nHere we pass the order instance to ``submit`` which will submit the tax\ninformation to Avalara for reporting. We also catch and log any exception as\nwe don't want order placement to show an error screen. If there is a problem\ntalking to Avalara, we can manually resubmit the order later on.\n\nContributing\n============\n\nClone the repo, create a virtualenv and run::\n\n make install\n\nto install all dependencies. Run the tests with::\n\n ./runtests.py\n\nThere is a sandbox site that you can browse and use to test the Avalara\nintegration. Create it using::\n\n make sandbox\n\nand browse it after::\n\n cd sandbox\n ./manage.py runserver\n\nNote that you will need to have test credentials for Avalara in a private\n``integration.py`` module.\n\nChangelog\n=========\n\n0.2.1\n-----\n\nFix a few issues with submitting orders.\n\n0.2\n---\n\nSupport Oscar 1.0 and solve a cache key issue.\n\n0.1.1\n-----\n\nPatch release to limit support to ``django-oscar>=0.6,<1.0``.\n\n0.1\n---\n\nInitial version - supports ``django-oscar>=0.6``.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/django-oscar/django-oscar-avalara", "keywords": "Taxes,Avalara", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "django-oscar-avalara", "package_url": "https://pypi.org/project/django-oscar-avalara/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-oscar-avalara/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/django-oscar/django-oscar-avalara" }, "release_url": "https://pypi.org/project/django-oscar-avalara/0.2.1/", "requires_dist": null, "requires_python": null, "summary": "Avalara integration for django-oscar", "version": "0.2.1" }, "last_serial": 1359387, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "60027c6e30ba66a5f9819d61eacff31c", "sha256": "47daffd8fdfb32edb139b334bee72c1b9e3e0d11786571c2c9a2aba452a9c29d" }, "downloads": -1, "filename": "django-oscar-avalara-0.1.tar.gz", "has_sig": false, "md5_digest": "60027c6e30ba66a5f9819d61eacff31c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8280, "upload_time": "2014-09-26T14:48:28", "url": "https://files.pythonhosted.org/packages/7c/eb/e6e4af7ea0a3a7dec2e7c759a476cb93cef93ae92ea3a51d9a8e517320b8/django-oscar-avalara-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "dc80a0070ad7d69ba17b1bcc734f4c39", "sha256": "4a3870cc18da056277f4da70b011d74be36f6ccac116a06c7e83488532f305de" }, "downloads": -1, "filename": "django-oscar-avalara-0.1.1.tar.gz", "has_sig": false, "md5_digest": "dc80a0070ad7d69ba17b1bcc734f4c39", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8327, "upload_time": "2014-12-10T21:22:33", "url": "https://files.pythonhosted.org/packages/ed/c7/947f043f23c09572190d469f73145eb7fb5b38b6e5a258bbe9f4f286be0f/django-oscar-avalara-0.1.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "5e1a15fdd27c8e7399942e84299e93ef", "sha256": "25b6b47122d198131aa23550f8061d10d6235f3d1b77c3c92606268e85f46a2e" }, "downloads": -1, "filename": "django-oscar-avalara-0.2.tar.gz", "has_sig": false, "md5_digest": "5e1a15fdd27c8e7399942e84299e93ef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8385, "upload_time": "2014-12-10T22:23:36", "url": "https://files.pythonhosted.org/packages/b4/f9/9840729eb341e0208857a6c5fbfdb2d5420224a1988222443ac50f8a8f7a/django-oscar-avalara-0.2.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "a011c22582a7dc1c97d49ff48b00d583", "sha256": "10d71081ce4c8ca4697a1eac6059f95747c8ae1da24db724ffa29f4e99f10a85" }, "downloads": -1, "filename": "django-oscar-avalara-0.2.1.tar.gz", "has_sig": false, "md5_digest": "a011c22582a7dc1c97d49ff48b00d583", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8526, "upload_time": "2014-12-23T22:34:43", "url": "https://files.pythonhosted.org/packages/92/b5/45b3b7bd363e8d5b8df958a340d4f2c7c6df123804bc7bef409957bc4d6e/django-oscar-avalara-0.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a011c22582a7dc1c97d49ff48b00d583", "sha256": "10d71081ce4c8ca4697a1eac6059f95747c8ae1da24db724ffa29f4e99f10a85" }, "downloads": -1, "filename": "django-oscar-avalara-0.2.1.tar.gz", "has_sig": false, "md5_digest": "a011c22582a7dc1c97d49ff48b00d583", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8526, "upload_time": "2014-12-23T22:34:43", "url": "https://files.pythonhosted.org/packages/92/b5/45b3b7bd363e8d5b8df958a340d4f2c7c6df123804bc7bef409957bc4d6e/django-oscar-avalara-0.2.1.tar.gz" } ] }