Payments Pro Form Action

140 views
Skip to first unread message

Nick

unread,
Jun 14, 2011, 11:20:19 AM6/14/11
to django...@googlegroups.com
Hi there,

Please forgive me if this is a naive question, but I'm rather new to Paypal and somewhat new to Django and I've had some trouble getting answers...

Going through the tutorial to get Website Payments Pro working. The payment.html template for WPP doesn't have any form action, and the form that the buy_my_item view generates does nothing to remedy this. I'm getting a prompt for credit card information, etc, but when I click, the page does nothing.

Is there something I'm doing wrong?

With much gratitude,

Nick

Nick

unread,
Jun 19, 2011, 6:37:39 PM6/19/11
to django...@googlegroups.com
Worked it out. The templates in README don't seem to work, but the ones that are set as the default (payment.html, confirmation.html) work well.

Josh Cartmell

unread,
Jun 14, 2011, 1:04:05 PM6/14/11
to django...@googlegroups.com

If no form action is specifed then the form will submit to the url of the page it is on.
Django forms do not automatically generate the opening and closing <form> html tags so you have to wrap them in it yourself. For example:
<form action="" method="post">{% csrf_token %}
{{ form.as_p }}
</form>

Would submit the form to the current url using post. Are you trying something similar?

Regards,
Josh

> --
> You received this message because you are subscribed to the Google Groups "django-paypal" group.
> To view this discussion on the web visit https://groups.google.com/d/msg/django-paypal/-/TjA1IdXOHPAJ.
> To post to this group, send email to django...@googlegroups.com.
> To unsubscribe from this group, send email to django-paypa...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/django-paypal?hl=en.

Nick

unread,
Jun 20, 2011, 3:09:57 AM6/20/11
to django...@googlegroups.com
I had been literally copying the templates for WPP in the README, but they weren't working out. The default templates bundled with the code worked, though.
Reply all
Reply to author
Forward
0 new messages