{ "info": { "author": "Alan Justino da Silva", "author_email": "alan.justino@yahoo.com.br", "bugtrack_url": null, "classifiers": [ "Framework :: Django", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "Operating System :: OS Independent", "Topic :: Software Development" ], "description": "Django MoIP\n===========\n\nCAUTION: ITS STILL BEING IMPLEMENTED. READ THE FOLLOW AS A BIG TODO-LIST!\nFOR NOW, NO TEST WILL PASS\n\nAbout\n-----\n\nDjango MoIP is a pluggable application that implements MoIP using HTML and API integrations.\nIt is based on the [django-paypal](https://github.com/dcramer/django-paypal) work\nfrom John Boxall, David Cramer and Michael Thornhill (thank you!)\n\n\nUsing MoIP with the HTML integration + NIT\n------------------------------------------\n\nMoIP have an IPN (Instant Payment Notification), but it is called \"NIT\", from\nPortuguese \"Notifica\u00e7\u00e3o Instant\u00e2nea de Transa\u00e7\u00e3o\"\n\n1. Download the code from GitHub:\n\n git clone git://github.com/alanjds/django-moip.git\n\n1. Edit `settings.py` and add `django_moip.html.nit` to your `INSTALLED_APPS` \n and `MOIP_RECEIVER_EMAIL`:\n\n # settings.py\n ...\n INSTALLED_APPS = (... 'django_moip.integrations.html.nit', ...)\n ...\n MOIP_RECEIVER_EMAIL = \"yourmoipemail@example.com.br\"\n\n1. Create an instance of the `MoipPaymentForm` in the view where you would \n like to collect money. Call `render` on the instance in your template to \n write out the HTML.\n\n # views.py\n ...\n from django.conf import settings\n from django_moip.html.forms import MoipPaymentForm\n \n def view_that_asks_for_money(request):\n \n # What you want the button to do.\n moip_dict = {\n \"id_carteira\": settings.MOIP_RECEIVER_EMAIL,\n \"valor\": \"%.0f\" % (100 * 1234.0), # expects 2 decimal, no dot\n \"nome\": \"name of the item\",\n \"id_transacao\": \"unique-invoice-id\",\n }\n \n # Create the instance.\n form = MoipPaymentForm(initial=moip_dict)\n context = {\"form\": form}\n return render_to_response(\"payment.html\", context)\n \n \n \n ...\n