Python interface to PayPal - urllib.urlencode non-ASCII characters failing

前端 未结 3 2131
粉色の甜心
粉色の甜心 2021-01-31 19:10

I am trying to implement PayPal IPN functionality. The basic protocol is as such:

  1. The client is redirected from my site to PayPal\'s site to complete payment. He l
3条回答
  •  佛祖请我去吃肉
    2021-01-31 20:06

    I know it's a bit late to chime in here, but the best solution I found was to not even parse what they were giving back. In django (don't know what you're using) I was able to get the raw request they sent, which I passed back verbatim. Then it was just a matter of putting the cmd key onto that.

    This way it never matters what encoding they send you, you're just sending it right back.

提交回复
热议问题