{ "info": { "author": "Pragmatic Mates", "author_email": "info@pragmaticmates.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.5", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7" ], "description": "django-trustpay\n===============\n\nDjango app for TrustPayClient payment gateway API.\n\nTested on Django 1.4.5.\n\n\nRequirements\n------------\n- Django\n\n\nRecommendations\n---------------\n- django-detective (It is useful, but no necessary. It tracks all site requests.)\n\n\n\nInstallation\n------------\n\n1. Install python library using pip: ``pip install django-trustpay``\n\n2. Add ``trustpay`` to ``INSTALLED_APPS`` in your Django settings file\n\n3. Add ``trustpay.urls`` to ``urls.py`` in your Django project\n\n4. Set ``HOST_URL`` to be your host name with http/https protocol prefix. For example: ``https://www.mysite.com``\n\n5. Set TrustPay settings. See below.\n\n6. Sync your database\n\n\n\nSettings\n--------\nTRUSTPAY_AID_TEST\n Client's AID for TEST environment.\n\nTRUSTPAY_AID_LIVE\n Client's AID for LIVE environment.\n\nTRUSTPAY_SECRET_KEY_TEST\n Client's Secret key for TEST environment.\n\nTRUSTPAY_SECRET_KEY_LIVE\n Client's Secret key for LIVE environment.\n\nTRUSTPAY_PAYMENT_SERVICE_URL_TEST\n TrustPay PAYMENT SERVICE URL for TEST environment. Default: ``'https://test.trustpay.eu/mapi/paymentservice.aspx'``\n\nTRUSTPAY_PAYMENT_SERVICE_URL_LIVE\n TrustPay PAYMENT SERVICE URL for LIVE environment. Default: ``'https://ib.trustpay.eu/mapi/paymentservice.aspx'``\n\nTRUSTPAY_CLIENT_REDIRECT_URL_TEST\n TrustPay CLIENT REDIRECT URL for TEST environment. Default: ``'https://test.trustpay.eu/mapi/pay.aspx'``\n\nTRUSTPAY_CLIENT_REDIRECT_URL_LIVE\n TrustPay CLIENT REDIRECT URL for LIVE environment. Default: ``'https://ib.trustpay.eu/mapi/pay.aspx'``\n\nTRUSTPAY_SUCCESS_RETURN_URL\n Success return URL. Default: ``u'%s%s' % (settings.HOST_URL, reverse_lazy('trustpay_success_return'))``\n\nTRUSTPAY_ERROR_RETURN_URL\n Error return URL. Default: ``u'%s%s' % (settings.HOST_URL, reverse_lazy('trustpay_error_return'))``\n\nTRUSTPAY_CANCEL_RETURN_URL\n Cancel return URL. Default: ``u'%s%s' % (settings.HOST_URL, reverse_lazy('trustpay_cancel_return'))``\n\nTRUSTPAY_NOTIFICATION_URL\n Notification URL. Default: ``u'%s%s' % (settings.HOST_URL, reverse_lazy('trustpay_notification'))``\n\nTRUSTPAY_NOTIFICATION_EMAIL\n Notification email. Default: ``ADMINS[0][0] or None``\n\n\nUsage\n-----\n\n\nPrepare payment data\n''''''''''''''''''''\nIn your checkout view prepare TrustPay payment data::\n\n trustpay_payment_data = {\n # required\n 'amount': 123.45,\n 'currency': trustpay.CURRENCY_EUR,\n 'reference': u'ORDER-123', # Don't put # sign in reference. It will be returned back as GET parameter.\n\n # not required\n 'language': get_language_code(request),\n 'country': trustpay.COUNTRY_SLOVAK_REPUBLIC,\n 'description': u'This is Trustpay test payment',\n 'customer_email': u'example@example.net'\n }\n\n\nand create TrustPay form with hidden fields and 'Pay' submit button::\n\n trustpayform = TrustPayClient(is_test=settings.DEBUG).get_form(**trustpay_payment_data)\n\n\nRender payment form\n'''''''''''''''''''\nPut TrustPay form to your template::\n\n {% include 'trustpay/helpers/form.html' with form=trustpayform submit_label='Pay with TrustPay' %}\n\n\nHandle return views\n'''''''''''''''''''\nBy default, ``SuccessReturnView``, ``ErrorReturnView``, ``CancelReturnView`` simply print request data and error message if any.\nYou should override templates ``trustpay/success_return.html``, ``trustpay/error_return.html`` and\n``trustpay/cancel_return.html`` or define your own return views. If you decide to use your own return views,\ndon't forget to set ``TRUSTPAY_SUCCESS_RETURN_URL``, ``TRUSTPAY_ERROR_RETURN_URL`` and ``TRUSTPAY_CANCEL_RETURN_URL``\nsettings.\n\n\nHandle notification view\n''''''''''''''''''''''''\n``trustpay.views.NotificationView`` stores every notification from TrustPay service to database.\nYou shouldn't have set BasicAuth or any other authentication on this view (``reverse('trustpay_notification')``),\nbecause TrustPay won't be able to access it.\n\nI recommend you to create a cron job which will handle each safe notification (with flag ``is_safe`` - it means\nthe payment request from merchant was signed and return signature is correct).\n\n\nHelpers\n'''''''\n``get_result_message(result_code)``\n returns result message by result code\n\n``get_language_code(request)``\n returns TrustPay supported language code by request\n\n\nConstants\n'''''''''\n``trustpay`` package contains all TrustPay supported currencies and countries.\n\n\nAuthors\n-------\n\nLibrary is by `Erik Telepovsky` from `Pragmatic Mates`_. See `our other libraries`_.\n\n.. _Pragmatic Mates: http://www.pragmaticmates.com/\n.. _our other libraries: https://github.com/PragmaticMates", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/PragmaticMates/django-trustpay", "keywords": "django trustpay payment gateway API", "license": "BSD License", "maintainer": "", "maintainer_email": "", "name": "django-trustpay", "package_url": "https://pypi.org/project/django-trustpay/", "platform": "", "project_url": "https://pypi.org/project/django-trustpay/", "project_urls": { "Homepage": "https://github.com/PragmaticMates/django-trustpay" }, "release_url": "https://pypi.org/project/django-trustpay/0.4.0/", "requires_dist": null, "requires_python": "", "summary": "Django app for Trustpay payment gateway API.", "version": "0.4.0" }, "last_serial": 4143719, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "a8637fb6ec8aab07edaeb07cdabb1ba1", "sha256": "d389e291baa059635aa864dc5cae18f5952775e0c1839d1c1d534e3a739c73d9" }, "downloads": -1, "filename": "django-trustpay-0.1.0.tar.gz", "has_sig": false, "md5_digest": "a8637fb6ec8aab07edaeb07cdabb1ba1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8827, "upload_time": "2014-01-24T15:06:53", "url": "https://files.pythonhosted.org/packages/0f/5d/07cfd6cf89b048351b15ca47de703469c09c104cb352ce04a66874944c66/django-trustpay-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "aa2eb3b47210d2f1e084debd2aa4ce74", "sha256": "269b084561f0947b321fc96acef2ad223b487cdd762438865c65955c7bdd2dab" }, "downloads": -1, "filename": "django-trustpay-0.2.0.tar.gz", "has_sig": false, "md5_digest": "aa2eb3b47210d2f1e084debd2aa4ce74", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8862, "upload_time": "2014-02-17T14:41:15", "url": "https://files.pythonhosted.org/packages/6e/da/17dcaba3bb60eceee52071cbedf88c522e74bd7e313cf9995561c6d05d77/django-trustpay-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "3d74fc738f88371e946abc4909c616ef", "sha256": "3ce3b745c7bcebad104458fc63f07697d6f642fce15a12d6309398f40f75d01d" }, "downloads": -1, "filename": "django-trustpay-0.2.1.tar.gz", "has_sig": false, "md5_digest": "3d74fc738f88371e946abc4909c616ef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8980, "upload_time": "2014-04-02T12:04:16", "url": "https://files.pythonhosted.org/packages/23/68/b4b1152004f0015b80aea7f64e29e5d5afa8d5b03c2221ffad52454005ce/django-trustpay-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "db775f672e03ae548b994b1e217665eb", "sha256": "a3f48f45b72738b58d2549db3f61b721ae8ec05777a731c434dfb42d83e1b566" }, "downloads": -1, "filename": "django-trustpay-0.2.2.tar.gz", "has_sig": false, "md5_digest": "db775f672e03ae548b994b1e217665eb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8983, "upload_time": "2014-04-02T16:52:07", "url": "https://files.pythonhosted.org/packages/7e/c4/f62f69709eb6331a8926fb04682d597ef8a558c11bb6290262b78fa503ee/django-trustpay-0.2.2.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "5e5231ddd768fe8678f0ec33a268cac2", "sha256": "35c3bdbebb6f7cc407b435e27e61e8233983f50c35b2d72a815759877d1626ab" }, "downloads": -1, "filename": "django-trustpay-0.3.0.tar.gz", "has_sig": false, "md5_digest": "5e5231ddd768fe8678f0ec33a268cac2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8899, "upload_time": "2015-05-21T08:24:29", "url": "https://files.pythonhosted.org/packages/0f/a5/f647f39ce3af0d768b72a7b9010b54b12833552505128518a0b4c85cf666/django-trustpay-0.3.0.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "b202337f5d89f33a2cf3a2e69f1a0b13", "sha256": "a86566ee20e2b62526d890bcc284b1838eab87c97c67f36186266b116bd31381" }, "downloads": -1, "filename": "django-trustpay-0.4.0.tar.gz", "has_sig": false, "md5_digest": "b202337f5d89f33a2cf3a2e69f1a0b13", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8933, "upload_time": "2018-08-07T11:08:17", "url": "https://files.pythonhosted.org/packages/6c/7a/e36a655e650c6e35819d660c95959fbf993c1fd8a10f7971f3d3eb393a22/django-trustpay-0.4.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b202337f5d89f33a2cf3a2e69f1a0b13", "sha256": "a86566ee20e2b62526d890bcc284b1838eab87c97c67f36186266b116bd31381" }, "downloads": -1, "filename": "django-trustpay-0.4.0.tar.gz", "has_sig": false, "md5_digest": "b202337f5d89f33a2cf3a2e69f1a0b13", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8933, "upload_time": "2018-08-07T11:08:17", "url": "https://files.pythonhosted.org/packages/6c/7a/e36a655e650c6e35819d660c95959fbf993c1fd8a10f7971f3d3eb393a22/django-trustpay-0.4.0.tar.gz" } ] }