如何接收发送到2checkout api的参数?

时间:2013-05-20 16:56:37

标签: return-value shopping-cart 2checkout

我正在开发购物车,这是一个测试链接

https://www.2checkout.com/checkout/purchase?sid=my_sid&mode=2CO&li_0_type=product&li_0_price=1.00&li_0_quantity=1&li_0_name=Example+Product+Name&li_0_tangible=N&li_1_type=product&li_1_price=1.00&li_1_quantity=1&li_1_name=Example2+Product2+Name2&li_1_tangible=N&card_holder_name=name_here&street_address=full+adress+here&country=my_country&city=my_city&zip=00200&email=hjbhjb@ewfew.com&phone=011&state=my_state&x_receipt_link_url=http://www.my site.net/checkout.php

返回方法是直接退货,因此买家仍然在购买完整页面,而参数被发送到返回页面

现在的问题是:这是我的页面的正确返回URL吗?如果我错了,请纠正我

?sid=my_sid&mode=2CO&li_0_type=product&li_0_price=1.00&li_0_quantity=1&li_0_name=Example+Product+Name&li_0_tangible=N&li_1_type=product&li_1_price=1.00&li_1_quantity=1&li_1_name=Example2+Product2+Name2&li_1_tangible=N&card_holder_name=name_here&street_address=full+adress+here&country=my_country&city=my_city&zip=00200&email=hjbhjb@ewfew.com&phone=011&state=my_state&x_receipt_link_url=http://www.my site.net/checkout.php&hashSecretWord=my_secret_word&hashSid=hash_id&hashTotal=hash_total&hashOrder=hash_order

1 个答案:

答案 0 :(得分:1)

不应将参数附加到您的返回网址。返回URL(已批准的URL)应该是应用程序中将处理返回参数的路径或脚本的绝对路径。 Direct Return passback method通过将返回参数发布到批准的URL,同时由2Checkout的服务器提取HTML并显示给买方来工作。如果您在使用此返回方法时遇到问题,请确保在重定向买方之前您的页面输出的字符数至少为255个,否则返回过程将失败。我们也可以帮助您解决遇到的任何问题。只需通过您的帐号联系techsupport@2co.com,我们将很乐意为您提供帮助。