Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 174555
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T13:32:35+00:00 2026-05-11T13:32:35+00:00

Has anyone setup django-paypal? Here is the link to it here ? I have

  • 0

Has anyone setup django-paypal? Here is the link to it here?

I have ‘myproject’ setup, and my folder sturecture looks like this:

myproject > paypal > (stdandard and pro folders)

to my settins.py file I added

INSTALLED_APPS = (     'myproject.paypal.standard',     'myproject.paypal.pro', ) 

in my url’s file for my account app I added:

urlpatterns += patterns('myproject.account.views',     (r'^payment-url/$', 'buy_my_item'),                    ) 

and in my account view I added:

from myproject.paypal.pro.views import PayPalPro from myproject.paypal.pro.forms import PaymentForm, ConfirmForm  def buy_my_item(request):     item = {'amt':'10.00',              # amount to charge for item             'inv':'1111',         # unique tracking variable paypal             'custom':'2222',       # custom tracking variable for you             'cancelurl':'http://127.0.0.1:8000/',   # Express checkout cancel url             'returnurl':'http://127.0.0.1:8000/'}   # Express checkout return url      kw = {'item':'item',                            # what you're selling            'payment_template': 'pro/payment.html',          # template to use for payment form            'confirm_template': ConfirmForm,  # form class to use for Express checkout confirmation            'payment_form_cls': PaymentForm,  # form class to use for payment            'success_url': '/success',               # where to redirect after successful payment            }      ppp = PayPalPro(**kw)     return ppp(request) 

— EDIT ——— Then, I added the pro and standard template folders to my projects template folder.

When I go to http://127.0.0.1:8000/account/payment-url/ and submit the form…

I get a ValueError : ‘dictionary update sequence element #0 has length 1; 2 is required’

Traceback:

File '...\accounts\views.py' in buy_my_item   655.     return ppp(request) File '...\paypal\pro\views.py' in __call__   115.                 return self.validate_payment_form() File '...\paypal\pro\views.py' in validate_payment_form   133.             success = form.process(self.request, self.item) File '...\paypal\pro\forms.py' in process 
  1. params.update(item)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T13:32:36+00:00Added an answer on May 11, 2026 at 1:32 pm

    In your code…

      'payment_form_cls': 'payment_form_cls',  # form class to use for payment 

    This must be a Form object that’s used for validation.

       'payment_form_cls': MyValidationForm,  # form class to use for payment 

    Edit

    http://github.com/johnboxall/django-paypal/tree/master

    Your request is supposed to include a notify-url, return-url and cancel-return. All three url’s YOU provide to Paypal.

    Paypal will send messages to these URL’s.

    Since Paypal will send messages to these URL’s, YOU must put them in your urls.py. You must write view functions for these three urls’. These urls will have your paypal responses sent to them.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Has anyone run into this error message before when using a timer on an
Has anyone encountered this oddity? I'm checking for the existence of a number of
Has anyone ever set up Cruise Control to build an OS X Cocoa/Objective-C project?
Has anyone tried installing SQL Server 2008 Developer on a machine that already has
Has anyone looked at Yahoo's ASTRA ? It's fairly nifty, but I had some
Has anyone been able to get an NHibernate-based project up and running on a
Has anyone built a website with IronPython and ASP.NET. What were your experiences and
Has anyone had any success running two different web servers -- such as Apache
Has anyone used the lockfile utility that ships with procmail in conjunction with NFS
Has anyone had a chance to dig into how F# Units of Measure work?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.