2

I'm looking for an example of creating encrypted forms for paypal from appEngine running python. I've seen a lot of things that are in the neighborhood, but not the right address:

Here's the general info over on PayPal's site for generating the encrypted form. Basically the form data is encrypted and sent over to paypal so that it can't be tampered with.

This great article talks about doing this very thing in django. The trouble is that is relies on M2Crypto and that doesn't run on AppEngine.

There's a library that is based on the previous article but supposed to be hacked to run on app engine. When you poke around class PayPalEncryptedPaymentsForm they are using M2Crypto.

This lead me to try to verify that you can't use M2Crypto on AppEngine.

Turns out during this search I found this article about using PyCrypto instead of M2Crypto. There's a bunch of caveats in the article that aren't in my areas of expertise. I'm hoping that someone out there has made a run at using PyCrypto for PayPal's Encrypted Website Payments and can shed some light with an example.

Thanks.

Community
  • 1
  • 1
troppoli
  • 558
  • 6
  • 13
  • Have you looked at pycrypto? That's provided on App Engine. – Nick Johnson Apr 18 '12 at 00:06
  • I did to the extent i mention in the last paragraph with the link to the article about using PyCrypto instead of M2Crypto. – troppoli Apr 19 '12 at 18:19
  • If GAE includes support for Python extension modules, you could use [`python-ewp`](https://github.com/nathan-osman/python-ewp). It requires nothing more than a C compiler and the OpenSSL headers. – Nathan Osman May 10 '16 at 04:52

1 Answers1

1

I can't help with GAE crypto but maybe a different solution could help: Why don't you use express checkout API to negotiate a server2server token used to redirect user on to the PayPal payment process?

Paolo Casciello
  • 7,982
  • 1
  • 43
  • 42
  • I was thinking I was forced into not using express checkout to be able to accept credit cards.... but it looks like I can set paypal optional and just do express checkout... thanks. – troppoli Apr 19 '12 at 18:14