我正在使用django meerchant进行paypal支付http://readthedocs.org/docs/django-merchant/en/latest/offsite/paypal.html。。。在
我的观点是这样的:
pay_pal = get_integration("pay_pal")
pay_pal.add_fields({
"business": client.paypal_id,
"item_name": product.name,
"invoice": inst.trans_code,
"notify_url": settings.BASE_DNS + str(client.id) + '/book/'+str(inst.id) +'/success/?booksaved=1',
"return_url": settings.BASE_DNS + str(client.id) + '/book/'+str(inst.id) +'/success/?booksaved=1',
"cancel_return": settings.BASE_DNS + str(client.id) + '/?booksaved=0',
"amount": inst.book_charged})
return render_to_response("pay_pay.html", {"obj": pay_pal, "product": product.name, "amount": inst.totalcost},context_instance=RequestContext(request))
我的模板支付_支付.html在
^{pr2}$我的问题是我如何改变它,使它将改变到贝宝网站,而不是沙盒.贝宝站点?在
提前谢谢。。。在
根据文档,您可以在调用
get_integration
(pay_pal = get_integration("pay_pal", test_mode=False)
)时指定test_mode参数,也可以在设置文件中设置MERCHANT_TEST_MODE。此外,您可能还需要更改PAYPAL_TEST
设置。在另外,我不与django merchant合作,也不知道这是否可行,这只是文档中的假设。在
相关问题 更多 >
编程相关推荐