想将贝宝支付集成到我的贝宝应用程序中,但遇到了障碍。我安装了 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 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'}