What might cause this ('True', 'buy') error? django-paypal

68 Views Asked by At

Im new to django-paypal and im trying to figure out how to run it. But this is error is preventing me to continue. What have I overlooked? My view code simply are copypasted in the documentation of django paypal.

Request Method: GET Request URL:
Django Version: 1.6 Exception Type: KeyError Exception Value:
('True', 'buy') Exception Location: /home/kevcal/.virtualenvs/paypalshit/local/lib/python2.7/site-packages/paypal/standard/forms.py in get_image, line 143 Python Executable: /home/kevcal/.virtualenvs/paypalshit/bin/python Python Version: 2.7.6 Python Path:
['/home/kevcal/channelfix/resources/paypalshit', '/home/kevcal/.virtualenvs/paypalshit/lib/python2.7', '/home/kevcal/.virtualenvs/paypalshit/lib/python2.7/plat-i386-linux-gnu', '/home/kevcal/.virtualenvs/paypalshit/lib/python2.7/lib-tk', '/home/kevcal/.virtualenvs/paypalshit/lib/python2.7/lib-old', '/home/kevcal/.virtualenvs/paypalshit/lib/python2.7/lib-dynload', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-i386-linux-gnu', '/usr/lib/python2.7/lib-tk', '/home/kevcal/.virtualenvs/paypalshit/local/lib/python2.7/site-packages', '/home/kevcal/.virtualenvs/paypalshit/lib/python2.7/site-packages'] Server time: Mon, 22 Dec 2014 15:20:02 +0000

views.py

from django.conf import settings
from django.shortcuts import render, render_to_response


from paypal.standard.forms import PayPalPaymentsForm

def view_that_asks_for_money(request):

    # What you want the button to do.
    paypal_dict = {
        "business": settings.PAYPAL_RECEIVER_EMAIL,
        "amount": "10000000.00",
        "item_name": "name of the item",
        "invoice": "unique-invoice-id",
        "return_url": "https://www.example.com/your-return-location/",
        "cancel_return": "https://www.example.com/your-cancel-location/",

    }

    # Create the instance.
    form = PayPalPaymentsForm(initial=paypal_dict)
    context = {"form": form}
    return render_to_response("paypal.html", context)

paypal.html

<h1>Show me the money!</h1>
<!-- writes out the form tag automatically -->
{{ form.render }}
0

There are 0 best solutions below