{ "info": { "author": "MyChoice2Pay", "author_email": "support@mychoice2pay.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "# MyChoice2Pay Django\n\n\n# Overview\n\nMyChoice2Pay Django provides integration access to the MyChoice2Pay API through django framework.\n\n\n# Requirements\n\n* [Django][django]\n* [MyChoice2Pay Python][mc2p-python]\n\n# Installation\n\nInstall using `pip`...\n\n pip install mc2p-django\n\nAdd `'django_mc2p'` to your `INSTALLED_APPS` setting.\n\n INSTALLED_APPS = (\n ...\n 'django_mc2p',\n ...\n )\n\nAdd django_mc2p urls:\n\n urlpatterns = patterns('',\n ...\n url(r'^mc2p/', include('django_mc2p.urls'))\n ...\n )\n\n# Configuration\n\nAfter execute migrations you must define KEY and SECRET KEY in administration site, section MyChoice2Pay Configuration.\n\nYou can obtain KEY and SECRET KEY from [MyChoice2Pay][mychoice2pay-site] site.\n\n# Quick Example\n\n### Basic transaction\n\n # Sending user to pay\n from django_mc2p import MC2PClient\n\n mc2p = MC2PClient()\n transaction = mc2p.Transaction({\n \"currency\": \"EUR\",\n \"order_id\": \"order id\",\n \"products\": [{\n \"amount\": 1,\n \"product\": {\n \"name\": \"Product\",\n \"price\": 50\n }\n }],\n \"notify_url\": \"https://www.example.com\" + reverse('mc2p-notify'),\n \"return_url\": \"https://www.example.com/your-return-url/\",\n \"cancel_return\": \"https://www.example.com/your-cancel-url/\"\n })\n transaction.save()\n transaction.pay_url # Send user to this url to pay\n\n # After user pay a notification will be sent to notify_url\n from django_mc2p.constants import MC2P_PAYMENT_DONE\n from django_mc2p.signals import notification_received\n\n def check_payment(sender, **kwargs):\n notification_data = sender\n if notification_data.type == MC2P_TYPE_TRANSACTION and notification_data.status == MC2P_PAYMENT_DONE:\n transaction = notification_data.transaction\n sale = notification_data.sale\n order_id = notification_data.order_id\n # Use transaction, sale and order_id to check all the data and confirm the payment in your system\n notification_received.connect(check_payment)\n\n### Basic subscription\n\n # Sending user to pay a subscription\n from django_mc2p import MC2PClient\n\n mc2p = MC2PClient()\n subscription = mc2p.Subscription({\n \"currency\": \"EUR\",\n \"order_id\": \"order id\",\n \"plan\": {\n \"name\": \"Plan\",\n \"price\": 5,\n \"duration\": 1,\n \"unit\": \"M\",\n \"recurring\": true\n },\n \"notify_url\": \"https://www.example.com\" + reverse('mc2p-notify'),\n \"return_url\": \"https://www.example.com/your-return-url/\",\n \"cancel_return\": \"https://www.example.com/your-cancel-url/\"\n })\n subscription.save()\n subscription.pay_url # Send user to this url to pay\n\n # After user pay a notification will be sent to notify_url\n from django_mc2p.constants import MC2P_PAYMENT_DONE\n from django_mc2p.signals import notification_received\n\n def check_payment(sender, **kwargs):\n notification_data = sender\n if notification_data.type == MC2P_TYPE_SUBSCRIPTION and notification_data.status == MC2P_PAYMENT_DONE:\n subscription = notification_data.subscription\n sale = notification_data.sale\n order_id = notification_data.order_id\n # Use subscription, sale and order_id to check all the data and confirm the payment in your system\n notification_received.connect(check_payment)\n\n[django]: https://www.djangoproject.com/\n[mc2p-python]: https://github.com/mc2p/mc2p-python\n[mychoice2pay-site]: https://www.mychoice2pay.com/\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/mc2p/mc2p-django/archive/v0.1.3.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/mc2p/mc2p-django", "keywords": "mychoice2pay,payments", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "mc2p-django", "package_url": "https://pypi.org/project/mc2p-django/", "platform": "", "project_url": "https://pypi.org/project/mc2p-django/", "project_urls": { "Download": "https://github.com/mc2p/mc2p-django/archive/v0.1.3.tar.gz", "Homepage": "https://github.com/mc2p/mc2p-django" }, "release_url": "https://pypi.org/project/mc2p-django/0.1.3/", "requires_dist": [ "django", "mc2p-python" ], "requires_python": "", "summary": "MyChoice2Pay Django Bindings", "version": "0.1.3" }, "last_serial": 3563841, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "909fc90343346653abcba7837e7dbc16", "sha256": "648404b46f2b64f6b12c614ff18e174690a7d9af4d7d1c86ed3b85f9d8359304" }, "downloads": -1, "filename": "mc2p_django-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "909fc90343346653abcba7837e7dbc16", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8963, "upload_time": "2017-09-11T14:18:18", "url": "https://files.pythonhosted.org/packages/11/09/5cfcc4876a6b63efa2d634d2f5f80eafba246c32aa064b35997643e0de0b/mc2p_django-0.1.0-py2.py3-none-any.whl" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "40e1da4b7294f7d295503828a3fa8d00", "sha256": "bfd2b64fa0f29549d133ae206ad37128ce90b4f44e4227ebd6c970f5435f6b27" }, "downloads": -1, "filename": "mc2p_django-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "40e1da4b7294f7d295503828a3fa8d00", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9415, "upload_time": "2017-12-04T15:59:48", "url": "https://files.pythonhosted.org/packages/99/88/fd86db9e0331e26959d88e34211af2c94a586ae1d4f90d6e7ceb7bc375e1/mc2p_django-0.1.1-py3-none-any.whl" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "40048af94a6e22edfcf86a022d6fa3e8", "sha256": "04455de04af6d0a37b01a3244c2f75230f2f92a758471c1e94e34154a427e3cd" }, "downloads": -1, "filename": "mc2p_django-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "40048af94a6e22edfcf86a022d6fa3e8", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9443, "upload_time": "2018-01-18T12:57:02", "url": "https://files.pythonhosted.org/packages/bd/b5/40f1f826a1a9313b0cb33f2d8e296fbba22866b6baef8d419a94a4fba1e1/mc2p_django-0.1.2-py2.py3-none-any.whl" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "2d4ae43cdd9115a343187d615740405e", "sha256": "afa2b3084dc00694e28ad02120998fd554cd99ccc7d4a7c40052899bac492488" }, "downloads": -1, "filename": "mc2p_django-0.1.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2d4ae43cdd9115a343187d615740405e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9481, "upload_time": "2018-02-08T14:12:53", "url": "https://files.pythonhosted.org/packages/f1/03/cdd95fcc018fa3bebc1bb1fd552df22686a57df3d51eb4952e32653bfa90/mc2p_django-0.1.3-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2d4ae43cdd9115a343187d615740405e", "sha256": "afa2b3084dc00694e28ad02120998fd554cd99ccc7d4a7c40052899bac492488" }, "downloads": -1, "filename": "mc2p_django-0.1.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2d4ae43cdd9115a343187d615740405e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9481, "upload_time": "2018-02-08T14:12:53", "url": "https://files.pythonhosted.org/packages/f1/03/cdd95fcc018fa3bebc1bb1fd552df22686a57df3d51eb4952e32653bfa90/mc2p_django-0.1.3-py2.py3-none-any.whl" } ] }