{ "info": { "author": "Thierry Jossermoz", "author_email": "thierry.jossermoz@oohlalabs.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "========\r\ndps-pxpy\r\n========\r\n\r\n.. image:: https://pypip.in/version/dps-pxpy/badge.svg\r\n :target: https://pypi.python.org/pypi/dps-pxpy/\r\n\r\n.. image:: https://pypip.in/format/dps-pxpy/badge.svg\r\n :target: https://pypi.python.org/pypi/dps-pxpy/\r\n\r\n.. image:: https://travis-ci.org/jthi3rry/dps-pxpy.svg?branch=master\r\n :target: https://travis-ci.org/jthi3rry/dps-pxpy\r\n\r\n.. image:: https://coveralls.io/repos/jthi3rry/dps-pxpy/badge.png?branch=master\r\n :target: https://coveralls.io/r/jthi3rry/dps-pxpy\r\n\r\n.. image:: https://pypip.in/py_versions/dps-pxpy/badge.svg\r\n :target: https://pypi.python.org/pypi/dps-pxpy/\r\n\r\n.. image:: https://pypip.in/license/dps-pxpy/badge.svg\r\n :target: https://pypi.python.org/pypi/dps-pxpy/\r\n\r\nThis package provides a Python low-level client for the `DPS Payment Express `_ API's.\r\nClients for both `PxPost `_\r\nand `PxFusion `_ are available.\r\n\r\nInstallation\r\n------------\r\n::\r\n\r\n pip install dps-pxpy\r\n\r\n\r\nUsage\r\n-----\r\n\r\nPxPost\r\n~~~~~~\r\n\r\nPxPost allows merchants to handle the entire lifecycle of payment transactions using HTTPS POST requests.\r\n\r\nFor a complete documentation of the PxPost API: https://www.paymentexpress.com/Technical_Resources/Ecommerce_NonHosted/PxPost.aspx\r\n\r\nClient\r\n``````\r\nInstantiate a client with your PxPost username and password::\r\n\r\n\r\n from dps.pxpost import PxPostClient\r\n\r\n client = PxPostClient(\"username\", \"password\")\r\n\r\n\r\nPxPostClient relies on the popular `requests `_.\r\n\r\nAuthorize\r\n`````````\r\n\r\nTo issue an authorization on a credit or debit card::\r\n\r\n response = client.authorize(amount=\"10.01\",\r\n input_currency=\"NZD\",\r\n card_number=\"4111111111111111\",\r\n card_holder_name=\"Holder Name\",\r\n date_expiry=\"1114\",\r\n cvc2=\"123\")\r\n\r\nYou can also use a DPS billing token::\r\n\r\n response = client.authorize(amount=\"10.01\",\r\n input_currency=\"NZD\",\r\n dps_billing_id=\"billingtoken\")\r\n\r\nOr, a custom billing token::\r\n\r\n response = client.authorize(amount=\"10.01\",\r\n input_currency=\"NZD\",\r\n billing_id=\"custombillingtoken\")\r\n\r\nComplete\r\n````````\r\n\r\nTo complete an authorization and transfer funds::\r\n\r\n response = client.complete(dps_txn_ref=\"reference\")\r\n\r\nPurchase\r\n````````\r\n\r\n``purchase`` is similar to ``authorize``, but funds are transferred immediately::\r\n\r\n response = client.purchase(amount=\"10.01\",\r\n input_currency=\"NZD\",\r\n card_number=\"4111111111111111\",\r\n card_holder_name=\"Holder Name\",\r\n date_expiry=\"1114\",\r\n cvc2=\"123\")\r\n\r\nYou can also use a DPS or custom billing token.\r\n\r\nRefund\r\n``````\r\n\r\nTo perform a complete or partial refund, use the dps transaction id returned by ``purchase`` or ``complete``::\r\n\r\n response = client.refund(dps_txn_ref=\"reference\",\r\n amount=\"5.01\",\r\n merchant_reference=\"reason for refund\")\r\n\r\nStatus\r\n``````\r\n\r\nTo query the status of a transaction, use your merchant transaction id (``authorize`` and ``purchase`` can take an optional ``txn_id`` used as a unique merchant reference)::\r\n\r\n response = client.status(txn_id=\"inv1234\")\r\n\r\n\r\nPxFusion\r\n~~~~~~~~\r\n\r\nPxFusion allows merchants to accept credit card details within a form on their own web page. The form posts sensitive data directly to DPS, which processes the transaction and redirects the user's browser to the merchant's website in a way that is totally transparent to the cardholder.\r\n\r\nFor a complete documentation of the PxFusion API: https://www.paymentexpress.com/Technical_Resources/Ecommerce_NonHosted/PxFusion.aspx\r\n\r\nClient\r\n``````\r\n\r\nInstantiate a client with your PxFusion username and password::\r\n\r\n from dps.pxfusion import PxFusionClient\r\n\r\n client = PxFusionClient(\"username\", \"password\")\r\n\r\nPxFusionClient relies on `suds-jurko `_ for SOAP requests and ships with `suds_requests `_ to take advantage of requests.\r\n\r\nTransaction\r\n```````````\r\n\r\nTo retrieve a session ID where funds are transferred immediately::\r\n\r\n response = client.purchase(amount=\"10.01\",\r\n currency=\"NZD\",\r\n return_url=\"https://yourdomain.com/pxfusion-callback\",\r\n txn_ref=\"ref\")\r\n\r\n\r\nYou can also issue authorizations::\r\n\r\n response = client.authorize(amount=\"10.01\",\r\n currency=\"NZD\",\r\n return_url=\"https://yourdomain.com/pxfusion-callback\",\r\n txn_ref=\"ref\")\r\n\r\nNote that completing an authorization transaction must be done via PxPost's ``complete``.\r\n\r\nAfter posting the payment details and session ID to the PxFusion endpoint (https://sec.paymentexpress.com/pxmi3/pxfusionauth), DPS redirects your customer to ``return_url`` with the session ID in the query string.\r\n\r\nStatus\r\n``````\r\n\r\nTo check the outcome of a transaction::\r\n\r\n response = client.status(transaction_id=\"sessionid\")\r\n\r\nCancellation\r\n````````````\r\n\r\nTo prevent a transaction from taking place::\r\n\r\n response = client.cancel(transaction_id=\"sessionid\")\r\n\r\n\r\nRunning Tests\r\n-------------\r\n\r\nGet a copy of the repository::\r\n\r\n git clone git@github.com:OohlaLabs/dps-pxpy.git .\r\n\r\nInstall `tox `_::\r\n\r\n pip install tox\r\n\r\nRun the tests::\r\n\r\n tox\r\n\r\nContributions\r\n-------------\r\n\r\nAll contributions and comments are welcome.\r\n\r\nChange Log\r\n----------\r\n\r\nv0.2.1\r\n~~~~~~\r\n* Switch to Semantic Versioning\r\n* Fix issue with parse_requirements for newer versions of pip (>=6.0.0)\r\n\r\nv0.2\r\n~~~~\r\n* Fix setup.py for distribution\r\n\r\nv0.1\r\n~~~~\r\n* Initial", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jthi3rry/dps-pxpy/", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "dps-pxpy", "package_url": "https://pypi.org/project/dps-pxpy/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/dps-pxpy/", "project_urls": { "Homepage": "https://github.com/jthi3rry/dps-pxpy/" }, "release_url": "https://pypi.org/project/dps-pxpy/0.2.1/", "requires_dist": null, "requires_python": null, "summary": "Python low-level client for DPS Payment Express PxPost and PxFusion API's", "version": "0.2.1" }, "last_serial": 1560957, "releases": { "0.2": [ { "comment_text": "", "digests": { "md5": "1e6dd666e6dc7b8e330b4fe7670670a7", "sha256": "1e7fb639ac1e47ed752b74138810b59b882d3ff37b8a1131306ae17e2685c420" }, "downloads": -1, "filename": "dps_pxpy-0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "1e6dd666e6dc7b8e330b4fe7670670a7", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 31424, "upload_time": "2014-11-10T00:00:24", "url": "https://files.pythonhosted.org/packages/2e/63/167964651c33669222ae06e941929d6de99684ebedf56937b6976ca5929d/dps_pxpy-0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e2a3aabb1da81c3fe201adf66b54001e", "sha256": "8aae8553f92fe6640405c82a4659c2c3d7ea8d76effa0151470f1fc0e85e3839" }, "downloads": -1, "filename": "dps-pxpy-0.2.tar.gz", "has_sig": false, "md5_digest": "e2a3aabb1da81c3fe201adf66b54001e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22409, "upload_time": "2014-11-10T00:00:21", "url": "https://files.pythonhosted.org/packages/5c/c3/bba9ae38c197cf53efcdc75f23399b5f95a05e20882e274a113b928ac862/dps-pxpy-0.2.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "484e538167d78bc25812da98084628db", "sha256": "e9de35632855af42824412acce84bfd000ac7de666d1abfea205184db7e939c9" }, "downloads": -1, "filename": "dps_pxpy-0.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "484e538167d78bc25812da98084628db", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 31554, "upload_time": "2015-01-29T23:26:37", "url": "https://files.pythonhosted.org/packages/62/73/cf6445ae5725b4028a6cbef0402eb6af14978ba825f9d7ded4c805331bde/dps_pxpy-0.2.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8678123a0f02c786d820ac7c742d2358", "sha256": "4dc65dbaa04d4baf482f7be0edd690bdf80a19d0a1118e92d5e0f765aa63c56b" }, "downloads": -1, "filename": "dps-pxpy-0.2.1.tar.gz", "has_sig": false, "md5_digest": "8678123a0f02c786d820ac7c742d2358", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22483, "upload_time": "2015-01-29T23:26:28", "url": "https://files.pythonhosted.org/packages/e5/31/bf69e8fdb128c2c97a2326c6d58cd8622ba3ab138061f1777fce392273ec/dps-pxpy-0.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "484e538167d78bc25812da98084628db", "sha256": "e9de35632855af42824412acce84bfd000ac7de666d1abfea205184db7e939c9" }, "downloads": -1, "filename": "dps_pxpy-0.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "484e538167d78bc25812da98084628db", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 31554, "upload_time": "2015-01-29T23:26:37", "url": "https://files.pythonhosted.org/packages/62/73/cf6445ae5725b4028a6cbef0402eb6af14978ba825f9d7ded4c805331bde/dps_pxpy-0.2.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8678123a0f02c786d820ac7c742d2358", "sha256": "4dc65dbaa04d4baf482f7be0edd690bdf80a19d0a1118e92d5e0f765aa63c56b" }, "downloads": -1, "filename": "dps-pxpy-0.2.1.tar.gz", "has_sig": false, "md5_digest": "8678123a0f02c786d820ac7c742d2358", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22483, "upload_time": "2015-01-29T23:26:28", "url": "https://files.pythonhosted.org/packages/e5/31/bf69e8fdb128c2c97a2326c6d58cd8622ba3ab138061f1777fce392273ec/dps-pxpy-0.2.1.tar.gz" } ] }