Skip to main content

eWay payment module for django-oscar (Rapid 3.0)

Project description

eWay Payment for Oscar

https://travis-ci.org/snowball-one/django-oscar-eway.png?branch=master https://coveralls.io/repos/snowball-one/django-oscar-eway/badge.png?branch=master

Disclaimer: The integration to the eWay API defined in this project is incomplete and currently only provides the Token Payment using eWay’s Rapid 3.0 API. We haven’t had the need or time to provide any other part(s) of the API, yet. Contributions to extend the functionality are more than welcome.

Installation

You can install django-oscar-eway directly from github by running:

$ pip install django-oscar-eway

After you have successfully installed it, you should add the app to your INSTALLED_APPS:

INSTALLED_APPS = (
    ...
    'eway',
)

and provide the eWay-specific settings in your settings.py:

EWAY_API_KEY = "YOUR API KEY"
EWAY_PASSWORD = "YOUR API PASSWORD"
EWAY_USE_SANDBOX = True
EWAY_CURRENCY = "AUD"

To obtain access to their developer sandbox, head over to their developer site and create an account.

Finally, you have to apply the migrations provided by the package to your project’s database. These are necessary for logging of eWay communication during the payment process and will make tracking down errors easier:

$ ./sandbox/manage.py migrate eway

Integrate eWay In The Checkout

The simplest way to integrate your project’s checkout with eWay is to use the EwayPaymentDetailMixin to extend your PaymentDetailView. All you need to do is create a new PaymentDetailView in your checkout app, import the mixin and add it to the view class. It should now look similar to this:

from oscar.apps.checkout.views import PaymentDetailsView as OscarPaymentDetailsView
from eway.rapid.mixins import EwayPaymentDetailMixin

class PaymentDetailsView(EwayPaymentDetailMixin, OscarPaymentDetailsView):
    template_name = 'checkout/payment_details.html'

In addition to that you need to hook up the view that is called by the eWay response redirect. A default URL can be defined by adding the following line to your URL patterns:

urlpatterns = patterns('',
    ...
    url(r'^checkout/eway/', include('eway.rapid.urls')),
    ...
)

Now it’s time to try it out and see if it works :)

Further Documentation

This package is still in its early stages. We’ll try and provide more documentation soon. Until then, feel free to raise an issue or ask questions on the django-oscar mailing list.

Contributing

Your need more functionality, found a bug or simply want to help us make this package better? Create a fork, make your changes and open a pull request. We’ll be thankful for it!

License

The package is released under the new BSD license.

Changelog

0.1.0

  • Initial version of the project.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-oscar-eway-0.1.0.tar.gz (51.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_oscar_eway-0.1.0-py2.py3-none-any.whl (47.8 kB view details)

Uploaded Python 2Python 3

File details

Details for the file django-oscar-eway-0.1.0.tar.gz.

File metadata

File hashes

Hashes for django-oscar-eway-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0cf2d92a1e7bc888c9e740dc42cf19d1dc5049bbc9601318ff2628e99c699ee7
MD5 f0d7f65f4e861baba39af30ea526bf25
BLAKE2b-256 f57e2214187ff1972c6a5e53c45adeb36b69ac01ca926ade22d6ff9b68bfe896

See more details on using hashes here.

File details

Details for the file django_oscar_eway-0.1.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for django_oscar_eway-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 073d06b0958543582d38fbfd03e3a1115cfb48a8e8d0bee989517afc7b432e7d
MD5 f195a3992ad07ff0b54cdebce347b03a
BLAKE2b-256 25551b656e62544855d74755e6f957e650132fa739fa8cce89c50c7e6a3d26f6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page