Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » Django
  • » 2 paypal forms in a view with django-paypal [RSS Feed]

#1 Nov. 30, 2010 13:25:35

Alexandre G.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

2 paypal forms in a view with django-paypal


Hi! I like to show 2 different paypal forms using django-paypal, this is my
code:

def payments(request):
paypal_dict = {
'amount': None,
'business': settings.PAYPAL_RECEIVER_EMAIL,
'item_name': None,
'notify_url': settings.PAYPAL_NOTIFY,
'return_url': settings.PAYPAL_RETURN,
'cancel_return': settings.PAYPAL_CANCEL,
}
paypal_dict.update({'amount': '1', 'item_name': 'Anual suscription')
suscription_form = PayPalPaymentsForm(initial=paypal_dict)

paypal_dict.update({'amount': '0.01', 'item_name': 'Buy 5 coins')
five_form = PayPalPaymentsForm(initial=paypal_dict)

return render_to_response("forms/paypal.html", {'five_form': five_form,
'suscription_form': suscription_form})

<http://pastebin.com/VKfqhapb>It always show two forms but with the last one
(five_form) but the update() works perfectly.

--
@agonzalezro <http://twitter.com/agonzalezro>
Please, don't send me files with extensions: .doc, .docx, .xls, .xlsx, .ppt
and/or .pptx

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#2 Nov. 30, 2010 13:32:11

Venkatraman S.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

2 paypal forms in a view with django-paypal


2010/11/30 Alexandre González <agonzale...@gmail.com>

> It always show two forms but with the last one (five_form) but the update()
> works perfectly.
>

Try dcramer or johnboxall version of django-paypal - dcramer's is no more
maintained i guess.

On a different note : were you able to add multiple items to the dict?
Also, i hear Encrypted form is better than PayPalPaymentsForm.

-V-

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#3 Dec. 6, 2010 19:27:26

Alexandre G.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

2 paypal forms in a view with django-paypal


I'm using johnboxall django-paypal, I solved this problem creating a view
that only shows the form, and after it load this forms with 3 ajax
petitions.

Anyway, thanks for your help :)

On Tue, Nov 30, 2010 at 14:31, Venkatraman S <venka...@gmail.com> wrote:

> 2010/11/30 Alexandre González <agonzale...@gmail.com>
>
>> It always show two forms but with the last one (five_form) but the
>> update() works perfectly.
>>
>
> Try dcramer or johnboxall version of django-paypal - dcramer's is no more
> maintained i guess.
>
> On a different note : were you able to add multiple items to the dict?
> Also, i hear Encrypted form is better than PayPalPaymentsForm.
>
> -V-
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
>http://groups.google.com/group/django-users?hl=en.
>



--
@agonzalezro <http://twitter.com/agonzalezro>
Please, don't send me files with extensions: .doc, .docx, .xls, .xlsx, .ppt
and/or .pptx

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

  • Root
  • » Django
  • » 2 paypal forms in a view with django-paypal [RSS Feed]

Board footer

Moderator control

Enjoy the 24th of August
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support