Django app for integrating WepPay payment flow into an oscar e-commerce framework based site.
Right now only the NORMAL payment method is available.
This django app provides the necessary views and functionality for integrate a WSDL WebPay payment service into adjango-oscar based site.
This package has been only tested against the chilean WebPay service.
Important notes about payment flow
Operation InitTransaction: Initializes a transaction in Webpay. In response to the invocation, a Token is generated, which uniquely represents a transaction. It is important to consider that once this method is invoked, the delivered Token has a reduced life span of 5 minutes, after which the Token is expired and can not be used in a payment.
Operation getTransactionResult: Corresponds to the operation after the init Transaction. Allows you to obtain the result of the transaction once Webpay has resolved your financial authorization
Operation acknowledgeTransaction: If the invocation is not performed within 30 seconds (regardless of the result delivered by the getTransactionResult method), Webpay will reverse the transaction, assuming that the trade was unable to report its result, thus preventing cardholder payment.
Settings
In order to use this you must provide some configurations, you can setup the methods you want to use, the methods are: NORMAL, NORMAL_MALL, CAPTURE or ONECLICK.
# Configuration example
WEBPAY_RETURN_IP_ADDRESS = '127.0.0.1' # Ip address of the host hosting the e-commerce site.
WEBPAY_RETURN_PORT = 8000 # Port where the server is listening for?
WEBPAY_NORMAL = {
'ACTIVE_ENVIRON': 'INTEGRATION', # INTEGRATION, PRODUCTION or CERTIFICATION
# This values determines which url is used
# from the 'ENVIRONMENTS' setting.
'ENVIRONMENTS': { # Map the service urls to the active environment value.
'INTEGRATION': 'https://webpay3gint.transbank.cl/WSWebpayTransaction/cxf/WSWebpayService?wsdl',
'CERTIFICATION': 'https://webpay3gint.transbank.cl/WSWebpayTransaction/cxf/WSWebpayService?wsdl',
'PRODUCTION': 'https://webpay3g.transbank.cl/WSWebpayTransaction/cxf/WSWebpayService?wsdl',
},
# The following settings are self explanatory.
'PRIVATE_KEY': '~/webpay_dev_certs/integracion_normal/597020000541.key',
'PUBLIC_CERT': '~/webpay_dev_certs/integracion_normal/597020000541.crt',
'WEBPAY_CERT': '~/webpay_dev_certs/integracion_normal/tbk.pem',
'COMMERCE_CODE': '597020000541'
}
Redirecting to WebpayPaymentDetailsView
Add the following:
if payment_method.lower() == 'webpay':
return redirect('webpay-redirect')
to the PaymentDetailsView.get method.
Including urls
Add to your urls configuration:
url(r'^checkout/', include('oscar_webpay.urls')),
url(r'^dashboard/webpay/', include(webpay_dashboard.urls))
Modifying dependencies
If you are experiencing some problems getting this to work properly, try to modify some dependencies according to this:
Metadata
Release files for django-oscar-webpay 0.4.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-oscar-webpay-0.4.3.tar.gz | 68.7 kB | Without provenance | Details for django-oscar-webpay-0.4.3.tar.gz |
Release files / django-oscar-webpay-0.4.3.tar.gz
| Download URL | django-oscar-webpay-0.4.3.tar.gz |
|---|---|
| Size | 68.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
80339d770ed4c9d53c4de15bcae1a951d6f4359839ad061b11d4f1388fb6d664
|
|
BLAKE2b-256 checksum How to use checksums |
6dd7a8b07f816a74d2cb4c26fbf4557513c066efc492b76ab72092e2510dede3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-oscar-webpay 0.4.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.