{ "info": { "author": "Jonatas Baldin", "author_email": "jonatas.baldin@gmail.com", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "# Wirecard\nA Python wrapper for the [Wirecard REST API](https://document-center.wirecard.com/display/PTD/REST+API). Only supports credit card payments with 3D secure enrolment.\n\n[![CircleCI](https://circleci.com/gh/Flickswitch/wirecard.svg?style=svg)](https://circleci.com/gh/Flickswitch/wirecard)\n\n\nAll examples below use Wirecard test data. You can find them in the links below:\n- [API Credentials](https://document-center.wirecard.com/display/PTD/Credit+Card#CreditCard-TestCredentials)\n- [3D Credit Card](https://document-center.wirecard.com/display/PTD/Appendix+K%3A+Test+Access+Data+and+Credentials)\n\n## Setting up environment variables\n```bash\nexport WIRECARD_USERNAME='70000-APILUHN-CARD'\nexport WIRECARD_PASSWORD='8mhwavKVb91T'\nexport WIRECARD_MERCHANT_ACCOUNT_ID='33f6d473-3036-4ca5-acb5-8c64dac862d1'\nexport WIRECARD_API_URL='https://api-test.wirecard.com/engine/rest/payments'\nexport WIRECARD_ORIGIN_IP='127.0.0.1'\n```\n\n## Using it\n```python\nfrom wirecard import AccountHolder, Card, RequestedAmount, Wirecard\n\n\ncard = Card(\n account_number='4012000300001003',\n expiration_month='01',\n expiration_year='2023',\n security_code='003',\n _type='visa',\n)\naccount_holder = AccountHolder(\n first_name='John',\n last_name='Doe',\n)\nrequested_amount = RequestedAmount(\n amount='10.99',\n currency='ZAR',\n)\n\nw = Wirecard()\n\nresult = w.check_3d_enrollment(card, account_holder, requested_amount)\n\n# If everything is fine, you should redirect the user to the ACS page\n# https://document-center.wirecard.com/display/PTD/Payment+Features#PaymentFeatures-ACSHTTPSRedirect\n\n# Here's a Django View Example\ntransaction_id = result.get('payment').get('transaction-id')\nacs_url = result.get('payment').get('three-d').get('acs-url')\npareq = result.get('payment').get('three-d').get('pareq')\n\ncontext = {\n 'acs_url': acs_url,\n 'pareq': pareq,\n 'term_url': 'https://your_callback_url',\n 'md': f'{\"transaction_id\": {transaction_id}, \"cvv\": {card.security_code}}',\n}\n\nreturn render(\n request,\n 'acs_template.html',\n context,\n)\n\n# The bank successfully calls your callback\n# Here's a Django View Example\npares = request.POST.get('PaRes')\nmd = json.loads(request.POST.get('MD', 'null'))\n\nparent_transaction_id = md['transaction_id']\ncvv = md['cvv']\n\nw = Wirecard()\nresult = w.authorize_and_capture_payment(pares, parent_transaction_id, cvv)\n```\n\nInstead of using environment variables, you can initialize the `Wirecard` with the necessary information:\n```python\nw = Wirecard(\n username='70000-APILUHN-CARD',\n password='8mhwavKVb91T',\n merchant_account_id='33f6d473-3036-4ca5-acb5-8c64dac862d1',\n url='https://api-test.wirecard.com/engine/rest/payments',\n)\n```\n\n## Exceptions\n- `WirecardFailedInit`: raised when the initialization of `Wirecard` fails\n- `WirecardInvalidCard`: raised when an invalid card is given to `Card`\n- `WirecardInvalidRequestedAmount`: raised when an invalid card is given to `RequestedAmount`\n- `WirecardFailedTransaction`: raised when any communication with the Wirecard platform fails\n- `WirecardInvalidResponse`: Raised when Wirecard fails to return JSON\n\n## Testing\nInstall [poetry](https://github.com/sdispater/poetry).\n\n```bash\n$ poetry install\n$ poetry run pytest\n```\n\n## License\n[MIT](https://github.com/flickswitch/wirecard/blob/master/LICENSE).\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Flickswitch/wirecard", "keywords": "", "license": "", "maintainer": "Jonatas Baldin", "maintainer_email": "jonatas.baldin@gmail.com", "name": "wirecard", "package_url": "https://pypi.org/project/wirecard/", "platform": "", "project_url": "https://pypi.org/project/wirecard/", "project_urls": { "Homepage": "https://github.com/Flickswitch/wirecard", "Repository": "https://github.com/Flickswitch/wirecard" }, "release_url": "https://pypi.org/project/wirecard/0.2.5/", "requires_dist": [ "glom (>=19.2,<20.0)", "requests (>=2.21,<3.0)" ], "requires_python": ">=3.6,<4.0", "summary": "A Python wrapper for the Wirecard REST API.", "version": "0.2.5" }, "last_serial": 4962882, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "d70eb75460601653aacecf6d741c3697", "sha256": "dbffe729727d43ade72d1779961ef06a95b3e9e174c7268bb5fbe01d5e9e47b0" }, "downloads": -1, "filename": "wirecard-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "d70eb75460601653aacecf6d741c3697", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 9079, "upload_time": "2019-03-01T09:54:52", "url": "https://files.pythonhosted.org/packages/e8/5b/8ce562e92f642a38fc33c8dbc23a7f27755b94bc0a3b00735de8852cd280/wirecard-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d9c9fbc4505ff10ea67053101d67f2f6", "sha256": "70fdfd791c1446722f40bf976d8268db51851f4a233ab9f9ae45fbe67e26daf9" }, "downloads": -1, "filename": "wirecard-0.1.0.tar.gz", "has_sig": false, "md5_digest": "d9c9fbc4505ff10ea67053101d67f2f6", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 2957, "upload_time": "2019-03-01T09:54:54", "url": "https://files.pythonhosted.org/packages/0e/ff/57be1aa5be15b33a310797e87660fb7ba79cba21cd0ef02985f3d3465907/wirecard-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "94638ada5f2877b2fd765a5ee9b008e5", "sha256": "d3379ed0ad2656d8b5b0bac90608d52b81b3a62e2629167b22dbc7c8ad932868" }, "downloads": -1, "filename": "wirecard-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "94638ada5f2877b2fd765a5ee9b008e5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 9118, "upload_time": "2019-03-01T09:59:52", "url": "https://files.pythonhosted.org/packages/78/ce/fd0a18744b56a6b9e612bc33441ebe3730e7668e34ad6614cb5d0be4f8b8/wirecard-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f2552bfa2933a9cc1254d5e4e0559c5e", "sha256": "68330a257467f14cfd25ca4cc9f76e2b5a0038508fb16559b82b50956220080d" }, "downloads": -1, "filename": "wirecard-0.1.1.tar.gz", "has_sig": false, "md5_digest": "f2552bfa2933a9cc1254d5e4e0559c5e", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 3014, "upload_time": "2019-03-01T09:59:53", "url": "https://files.pythonhosted.org/packages/61/72/df4ec288bf52aef6766b352d175a779a1d3860f3cc54812b874b69f9a7a7/wirecard-0.1.1.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "cf9e4fe4e62c1609a8d774460fee9a46", "sha256": "8856a195ed02346673b46f9852cb6c00bb3ca806aa11c03f898fa24de62c9203" }, "downloads": -1, "filename": "wirecard-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "cf9e4fe4e62c1609a8d774460fee9a46", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 11850, "upload_time": "2019-03-06T14:26:58", "url": "https://files.pythonhosted.org/packages/08/c7/cd60adf2d9c3e84edfe4d5cc2fd552290ee3c1f0140b249ade710729ef8a/wirecard-0.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "08c8887b674882bf79a4ce6070e93374", "sha256": "080747a209e5c87607ff0e5cd28027db4e77a347ddd0f8b6509a27a929c19c18" }, "downloads": -1, "filename": "wirecard-0.2.1.tar.gz", "has_sig": false, "md5_digest": "08c8887b674882bf79a4ce6070e93374", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 5186, "upload_time": "2019-03-06T14:26:59", "url": "https://files.pythonhosted.org/packages/1e/a4/ba2c83e61136064dcc22872b58866da5c19c6127ba77303f303667474044/wirecard-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "c0fa3b6b65c26600c62140a1f7fc2c9d", "sha256": "4bf8ab9e6c02bffbf93bd2db3c59196451d2cc995924d84cc7f3d9804364a02b" }, "downloads": -1, "filename": "wirecard-0.2.2-py3-none-any.whl", "has_sig": false, "md5_digest": "c0fa3b6b65c26600c62140a1f7fc2c9d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 11879, "upload_time": "2019-03-14T08:30:28", "url": "https://files.pythonhosted.org/packages/1b/6d/da969f855715c6951fe510abc5a8d8aa0234e54c2eb594d22bceb64c2d76/wirecard-0.2.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "49bbd3e8c64ad1e46f60b4c0e0f51c86", "sha256": "11cb1b0827b80e516bd5f38bc4c820ebd291ac7a6d0e5af8eee7d0fa8246336d" }, "downloads": -1, "filename": "wirecard-0.2.2.tar.gz", "has_sig": false, "md5_digest": "49bbd3e8c64ad1e46f60b4c0e0f51c86", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 5194, "upload_time": "2019-03-14T08:30:29", "url": "https://files.pythonhosted.org/packages/2b/b3/98dde223f39755127a82947adb6c1fd2ebdc6e3851f62057a147c6d255eb/wirecard-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "d9c7462f3acf26c4afdebe941245ea1a", "sha256": "a9661fe986c5372ce304cbad520283282f2e5b48cfa93df28731654e4afc02da" }, "downloads": -1, "filename": "wirecard-0.2.3-py3-none-any.whl", "has_sig": false, "md5_digest": "d9c7462f3acf26c4afdebe941245ea1a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 12058, "upload_time": "2019-03-18T08:49:48", "url": "https://files.pythonhosted.org/packages/e7/53/30512026332e3ffb8c907b028cb8fd28cc0455d80fbd697400c11f930309/wirecard-0.2.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e35fb3d0073e555beb7278d6f9dde583", "sha256": "dd2c1f503b31a1fdfd6219d857b3e74c81f464196dc84809717677458e67a5ec" }, "downloads": -1, "filename": "wirecard-0.2.3.tar.gz", "has_sig": false, "md5_digest": "e35fb3d0073e555beb7278d6f9dde583", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 5251, "upload_time": "2019-03-18T08:49:50", "url": "https://files.pythonhosted.org/packages/47/9c/26008db5b1ab42c71b1d2a79e9effb26387dfd74d7cf1c5a65312d2ba76e/wirecard-0.2.3.tar.gz" } ], "0.2.4": [ { "comment_text": "", "digests": { "md5": "1b22753083bb61cddf63d617870dc556", "sha256": "5b32f274a3d17938e74a30946581900b9227cf0fa7925409b65f79674e8e821d" }, "downloads": -1, "filename": "wirecard-0.2.4-py3-none-any.whl", "has_sig": false, "md5_digest": "1b22753083bb61cddf63d617870dc556", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 14299, "upload_time": "2019-03-19T13:28:44", "url": "https://files.pythonhosted.org/packages/ba/24/04e59736fcde53ffc0167151e5e07b17e86632fbef33769d66f09913aec8/wirecard-0.2.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "86fba5bec3a599422986490ce006353c", "sha256": "70a43a80a46ce8b7e807d420717e4d9aa1d9f389bf4e38bc8c8aaca65124972f" }, "downloads": -1, "filename": "wirecard-0.2.4.tar.gz", "has_sig": false, "md5_digest": "86fba5bec3a599422986490ce006353c", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 5774, "upload_time": "2019-03-19T13:28:45", "url": "https://files.pythonhosted.org/packages/0a/f2/30a22ba643054437fdc49214b4e9201fc3172904d3c46482cf8fc6b8361c/wirecard-0.2.4.tar.gz" } ], "0.2.5": [ { "comment_text": "", "digests": { "md5": "0d56d7ddd909e41c0ec413d45883d4d5", "sha256": "bf5569a10a02abf8b32674266684024a57bd2f49cfc92c5cede20865c7cf0750" }, "downloads": -1, "filename": "wirecard-0.2.5-py3-none-any.whl", "has_sig": false, "md5_digest": "0d56d7ddd909e41c0ec413d45883d4d5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 14311, "upload_time": "2019-03-20T10:02:53", "url": "https://files.pythonhosted.org/packages/9e/8e/f2ae46a2a4fe316f4c9d58305d0602ecdf476588bf397871556f196f610e/wirecard-0.2.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d1a3849218c5150c0da9073364bdd1a9", "sha256": "7ab71c98affa1e80121d3a039bd8a4a532b855a9e6f23cc4d75bda9317101f46" }, "downloads": -1, "filename": "wirecard-0.2.5.tar.gz", "has_sig": false, "md5_digest": "d1a3849218c5150c0da9073364bdd1a9", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 5772, "upload_time": "2019-03-20T10:02:54", "url": "https://files.pythonhosted.org/packages/ba/22/da15c443854153cc38c3fd6825a038ac9026926547a3f41348f4eac847fb/wirecard-0.2.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0d56d7ddd909e41c0ec413d45883d4d5", "sha256": "bf5569a10a02abf8b32674266684024a57bd2f49cfc92c5cede20865c7cf0750" }, "downloads": -1, "filename": "wirecard-0.2.5-py3-none-any.whl", "has_sig": false, "md5_digest": "0d56d7ddd909e41c0ec413d45883d4d5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 14311, "upload_time": "2019-03-20T10:02:53", "url": "https://files.pythonhosted.org/packages/9e/8e/f2ae46a2a4fe316f4c9d58305d0602ecdf476588bf397871556f196f610e/wirecard-0.2.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d1a3849218c5150c0da9073364bdd1a9", "sha256": "7ab71c98affa1e80121d3a039bd8a4a532b855a9e6f23cc4d75bda9317101f46" }, "downloads": -1, "filename": "wirecard-0.2.5.tar.gz", "has_sig": false, "md5_digest": "d1a3849218c5150c0da9073364bdd1a9", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 5772, "upload_time": "2019-03-20T10:02:54", "url": "https://files.pythonhosted.org/packages/ba/22/da15c443854153cc38c3fd6825a038ac9026926547a3f41348f4eac847fb/wirecard-0.2.5.tar.gz" } ] }