Login

Tag "paypal"

Snippet List

Paypal form with better sandbox support

This is a class I use instead of the default PayPalPaymentsForm in django-paypal. I wanted to use the Paypal sandbox on my development site and the real Paypal site on my production site. Currently, if you want to output the Paypal form with the sandbox you have to call the sandbox() method on the form, rather than the render() method. Using this class instead of the default PayPalPaymentsForm, you can just set PAYPAL_DEBUG to True in the settings file and the form will take you through to the sandbox instead. Don't forget to set the sandbox merchant account's business email address as PAYPAL_RECEIVER_EMAIL too.

  • paypal
Read More

Encrypted paypal buttons

Function and usage in views and template with django-paypal to have encrypted paypal buttons with a cart(adding multiple elements). All credits go to Jon Atkinson, http://jonatkinson.co.uk/paypal-encrypted-buttons-django/ I just added it here with a complete implementation using a cart(his example didnt include it). I know there is some redundancy in the data passed to the dict and the submit form, i'm just not sure what can i take out, the paypal docs are not clear about it, if you test this code without some of the data and it works, please tell me. The key parts are the cmd _s-xclick and again the cmd '_cart' both are needed.

  • paypal
  • encrypted button
  • cart
Read More

Django Paypal

This is a snippet to use Paypal with python. This modifies Mike Atlas's geocept Paypal library. (Which was not working, for me at least) and adds recurring payments. I would try to write an article explaining how to use this and update the snippet.

  • paypal
  • payments
  • payment-processors
Read More

Accepting and processing PayPal IPN messages (including using App Engine)

PayPal's [https://www.paypal.com/ipn](IPN mechanism) is ridiculously easy to consume. You can tell PayPal to POST every single transaction on your account to a URL somewhere, then set up a handler at that URL which processes those transactions in some way. Security is ensured by POSTing the incoming data back to PayPal for confirmation that the transaction is legitimate. These classes are probably over-engineered, but they were a fun experiment in creating class-based generic views.

  • appengine
  • paypal
  • payment
  • ipn
Read More

4 snippets posted so far.