{ "info": { "author": "Leonid Suprun", "author_email": "mr.slay@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Topic :: Office/Business" ], "description": "Sofort\n======\n\n.. rubric:: Building brick to ease Sofort payments in your application.\n\nThis library is still in hard development so when in doubt, check original\nSofort Reference_.\n\n.. image:: https://travis-ci.org/spreecode/python-sofort.svg?branch=master\n :target: https://travis-ci.org/spreecode/python-sofort\n :alt: Build Status\n\n.. image:: https://coveralls.io/repos/github/spreecode/python-sofort/badge.svg?branch=master\n :target: https://coveralls.io/github/spreecode/python-sofort?branch=master\n :alt: Coverage\n\n.. image:: https://landscape.io/github/spreecode/python-sofort/master/landscape.svg?style=flat\n :target: https://landscape.io/github/spreecode/python-sofort/master\n :alt: Code Health\n\nInstallation\n------------\n\n::\n\n $ pip install git+https://github.com/spreecode/python-sofort.git\n\nUsage\n-----\n\n::\n\n import sofort\n import some_abstract_http_framework as webserver\n import some_abstract_data_storage as db\n\n client = sofort.Client(my_user_id, my_api_key, my_project_id,\n success_url='https://mysite.de/thanks.html',\n abort_url='https://mysite.de/abort_payment.html',\n notification_urls={\n 'default': 'https://mysite.de/notify.php?' + sofort.TRANSACTION_ID\n })\n\n payment_data = client.payment(\n 200,\n reasons=[\n 'Invoice 0001 payment',\n sofort.TRANSACTION_ID\n ]\n )\n\n db.save_transaction(payment_data.transaction)\n webserver.redirect(payment_data.payment_url)\n\nWhen payment is proccessed, client will be redirected to ``success_url`` and\nSofort server will send POST-request to ``notification_urls`` as soon as\ntransaction status will be changed. You can use ``sofort.TRANSACTION_ID`` in\nURL params, so notification url could be like this: ::\n\n 'http://mysite.de/notify.php?trn=' + sofort.TRANSACTION_ID\n\nit will be substituted to something like ::\n\n http://mysite.de/notify.php?trn=123456-321321-56A29EC6-066A\n\nSo you can catch transaction ID and check it's status (all responses are\nwrapped with Schematics_ models) ::\n\n >>> details = client.details('123456-321321-56A29EC6-066A')\n >>> details[0]._data\n {'amount': Decimal('234.00'),\n 'amount_refunded': Decimal('0.00'),\n 'costs': ,\n 'currency_code': u'EUR',\n 'email_customer': None,\n 'exchange_rate': Decimal('1.0000'),\n 'language_code': u'de',\n 'payment_method': u'su',\n 'phone_customer': None,\n 'project_id': 123456,\n 'reasons': [u'Invoice 52'],\n 'recipient': ,\n 'sender': ,\n 'status': u'untraceable',\n 'status_history_items': [],\n 'status_modified': datetime.datetime(2016, 2, 28, 10, 1, 52, tzinfo=),\n 'status_reason': u'sofort_bank_account_needed',\n 'su': ,\n 'test': True,\n 'time': datetime.datetime(2016, 2, 28, 10, 1, 52, tzinfo=),\n 'transaction': u'123456-321321-56A29EC6-066A',\n 'user_variables': None}\n\n\nTesting\n-------\n\n::\n\n $ pip install -e '.[test]' # to obtain mock library\n $ python setup.py test\n\nBe careful, transaction ID contains some sensitive data ::\n\n 123456-321321-56A29EC6-066A\n ^^^^^^ ^^^^^^\n | |\n User ID |\n Project ID\n\nOf course this data will be visible to customer on payment page, and it's\nalmost useless without API key. Still I think it's bad idea to store unmasked\ntransaction IDs in repo.\n\n.. _Reference: https://www.sofort.com/integrationCenter-eng-DE/content/view/full/2513\n.. _Schematics: https://github.com/schematics/schematics\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/spreecode/python-sofort", "keywords": "sofort", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "sofort", "package_url": "https://pypi.org/project/sofort/", "platform": "", "project_url": "https://pypi.org/project/sofort/", "project_urls": { "Homepage": "https://github.com/spreecode/python-sofort" }, "release_url": "https://pypi.org/project/sofort/0.4.3/", "requires_dist": null, "requires_python": "", "summary": "Sofort API", "version": "0.4.3" }, "last_serial": 3140722, "releases": { "0.4.1": [ { "comment_text": "", "digests": { "md5": "099cd92dc20cc35ad76b1f5623ce89b5", "sha256": "624ec8e10825159e3a543f4efd3d2e751254dbeaea424decf1eefe212f521af7" }, "downloads": -1, "filename": "sofort-0.4.1-py2-none-any.whl", "has_sig": false, "md5_digest": "099cd92dc20cc35ad76b1f5623ce89b5", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 10632, "upload_time": "2016-03-04T22:30:12", "url": "https://files.pythonhosted.org/packages/44/3c/153f6456b13cbb6920c84b28bea33a1c129591f333be4ddad15fe38c5ebe/sofort-0.4.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "147d9a1e559719dc29a6a2dae6e7b0fc", "sha256": "78c86ebd1ddc603e9728d42ceb68091da57880d7180b7943bb7ab48f55d250a3" }, "downloads": -1, "filename": "sofort-0.4.1.tar.gz", "has_sig": false, "md5_digest": "147d9a1e559719dc29a6a2dae6e7b0fc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8871, "upload_time": "2016-03-04T22:26:42", "url": "https://files.pythonhosted.org/packages/ef/7e/c997ef18409313317b1b7c207068fe3c3d4c765601ae3f8b5d1f82840530/sofort-0.4.1.tar.gz" } ], "0.4.3": [ { "comment_text": "", "digests": { "md5": "a77c4dc89c83708b770bf2280f49d2c3", "sha256": "e787895e2f2338d42c59dedf0b71180ee36227eee59e72462df990e0d22a44a5" }, "downloads": -1, "filename": "sofort-0.4.3-py3-none-any.whl", "has_sig": false, "md5_digest": "a77c4dc89c83708b770bf2280f49d2c3", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 10793, "upload_time": "2017-09-01T15:50:37", "url": "https://files.pythonhosted.org/packages/8d/85/b51f32001315aed58dc7db71fc558b0c14b2f311f18292854f2981826910/sofort-0.4.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "dcec24e4e35de7b52a776a413ad50ddc", "sha256": "1469bb66038ea1358e6801e877bf049967e44be0089720d5a25bb480d6770a6c" }, "downloads": -1, "filename": "sofort-0.4.3.tar.gz", "has_sig": false, "md5_digest": "dcec24e4e35de7b52a776a413ad50ddc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9597, "upload_time": "2017-09-01T15:46:31", "url": "https://files.pythonhosted.org/packages/6a/71/16ab7eafc49fbe719b27c19caa7f9854b63f826839f1e3f268dd36aee659/sofort-0.4.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a77c4dc89c83708b770bf2280f49d2c3", "sha256": "e787895e2f2338d42c59dedf0b71180ee36227eee59e72462df990e0d22a44a5" }, "downloads": -1, "filename": "sofort-0.4.3-py3-none-any.whl", "has_sig": false, "md5_digest": "a77c4dc89c83708b770bf2280f49d2c3", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 10793, "upload_time": "2017-09-01T15:50:37", "url": "https://files.pythonhosted.org/packages/8d/85/b51f32001315aed58dc7db71fc558b0c14b2f311f18292854f2981826910/sofort-0.4.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "dcec24e4e35de7b52a776a413ad50ddc", "sha256": "1469bb66038ea1358e6801e877bf049967e44be0089720d5a25bb480d6770a6c" }, "downloads": -1, "filename": "sofort-0.4.3.tar.gz", "has_sig": false, "md5_digest": "dcec24e4e35de7b52a776a413ad50ddc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9597, "upload_time": "2017-09-01T15:46:31", "url": "https://files.pythonhosted.org/packages/6a/71/16ab7eafc49fbe719b27c19caa7f9854b63f826839f1e3f268dd36aee659/sofort-0.4.3.tar.gz" } ] }