Skip to main content

Payment integration of AsiaPay (PayDollar) to use on django-oscar

Project description

Payment integration of AsiaPay’s PayDollar.



  • Django
  • django-oscar

If you want to install the latest stable release from PyPi:

$ pip install django-oscar-asiapay

If you feel adventurous and want to install the latest commit from GitHub:

$ pip install -e git://

Add django-oscar-asiapay to your INSTALLED_APPS:


Hook this app into your

urlpatterns = patterns('',
    url(r'^asiapay/', include('asiapay.urls')),

Run the South migrations:

./ migrate asiapay


Please make sure you have installed django-oscar (up and running). You can easily customize oscar by overwriting its apps. Please check oscar’s docs if you don’t know what I’m talking about.

To use AsiaPay please check the directory oscar_integration_example.

Basically the OscarPaymentDetailsView has been overwritten, so the user will be re-directed to AsiaPay after confirming the checkout. We’ve customized the preview.html template:

<form method="post" action="{{ asiapay_url }}">
        {% csrf_token %}
        <input type="hidden" name="merchantId" value="{{ merchant_id }}">
        <input type="hidden" name="currCode" value="{{ currency_code }}">
        <input type="hidden" name="orderRef" value="{{ order_number }}">
        <input type="hidden" name="amount" value="{{ order_total.incl_tax }}">
        <input type="hidden" name="successUrl" value="{{ success_url }}">
        <input type="hidden" name="failUrl" value="{{ fail_url }}">
        <input type="hidden" name="errorUrl" value="{{ error_url }}">
        <input type="hidden" name="lang" value="{{ asiapay_lang }}">
        <input type="hidden" name="payType" value="{{ asiapay_paytype }}">
        <img src="" alt="{% trans "AsiaPay" %}" />
        <button id='place-order' type="submit" class="btn btn-primary btn-block js-disable-on-click" data-loading-text="{% trans "Sending..." %}">{% trans "Submit" %}</button>



URL to connect to AsiaPay. Testing url:

Production url:


Default: ‘702’

Currency you want to use. Please check the PayDollar Integration Guide.


Default: ‘E’

Language of the payment page.

  • ‘C’: Traditional Chinese
  • ‘E’: English
  • ‘F’: French
  • ‘G’: German
  • ‘J’: Japanese
  • ‘R’: Russian
  • ‘S’: Spanish
  • ‘T’: Thai
  • ‘V’: Vietnamese
  • ‘X’: Simplified Chinese


Use this setting to test a response from AsiaPay locally. We can recommend ngrok to mask localhost.


Default: True

Use https (True) or http (False) to construct reponse urls.


Default: ‘N’

Paytype you want to use. Please check the PayDollar Integration Guide.


Default: reverse(‘checkout:thank-you’)

URL to redirect to after successful transaction. Use for example:



ASIAPAY_SUCCESS_REDIRECT = reverse_lazy('your_url_name')


Default: reverse(‘basket:summary’)

URL to redirect to after failed transaction. Use for example:



ASIAPAY_SUCCESS_REDIRECT = reverse_lazy('your_url_name')


Check the issue tracker on github for milestones and features to come.

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-asiapay-0.4.0.tar.gz (15.7 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page