django-paypal空订单摘要/价格

时间:2012-02-23 09:37:24

标签: django paypal django-paypal

希望将paypal支付整合到我的paypal应用程序中,但遇到了障碍。我安装了dcramer版本的django-paypal,并按照WPP(支付专业版)的说明进行操作。

在我看来,我在示例中遵循了相同的项目细节:

def buy_my_item(request):
  item = {"amt": "10.00",             # amount to charge for item
          "inv": "inventory",         # unique tracking variable paypal
          "custom": "tracking",       # custom tracking variable for you
          "cancelurl": "http://myapp/url",  # Express checkout cancel url
          "returnurl": "http://myapp/url"}  # Express checkout return url

  kw = {"item": item,                            # what you're selling
        "payment_template": "payment.html",      # template name for payment
        "confirm_template": "confirmation.html", # template name for confirmation
        "success_url": "/success/"}              # redirect location after success

  ppp = PayPalPro(**kw)
  return ppp(request)

我可以拨打paypal沙箱,并被重定向到买家付款页面。在那里,我注意到当我确实包含上面显示的金额时,买方的订单摘要是空的。

我错过了这里的任何步骤?

调试消息:

PayPal Request:
    {'amt': '10.00',
     'cancelurl': 'http://bar.com',
     'custom': 'tracking',
     'inv': 'inventory',
     'method': 'SetExpressCheckout',
     'noshipping': 1,
     'returnurl': 'http://foo.com'}

PayPal Response:
{'ack': 'Success',
 'build': '2571254',
 'correlationid': '2f119c4489c1b',
 'timestamp': '2012-02-23T11:00:43Z',
 'token': 'EC-13C49181MF5610640',
 'version': '54.0'}

0 个答案:

没有答案
相关问题