0
當我的網站將重定向到貝寶時,我在貝寶上收到錯誤「缺少一些信息..」。 以下是HTML頁面和代碼背後從那裏控制轉到後面payapl需要多個項目的paypal集成幫助
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>PayPal Payment Detail</title>
<script type="text/javascript" language="javascript">
function submitform() {
var frm = this.document.getElementById('confirmOrder1');
frm.submit();
}
</script>
</head>
<body onload="submitform();">
<form name="confirmOrder1" runat="server" id="confirmOrder1" method="post">
<input type="hidden" runat="server" id="cmd" name="cmd" />
<input type="hidden" runat="server" id="business" name="business" />
<input type="hidden" name="no_shipping" runat="server" id="no_shipping" />
<input type="hidden" name="return" id="return" runat="server" />
<input type="hidden" name="cancel_return" id="cancel_return" runat="server" />
<input type="hidden" name="notify_url" runat="server" id="notify_url" />
<input type="hidden" name="currency_code" runat="server" id="currency_code" />
<input type="hidden" runat="server" id="item_name_1" name="item_name_1" value="Item 1" />
<input type="hidden" runat="server" id="amount_1" name="amount_1" value="20" />
<input type="hidden" runat="server" id="item_name_2" name="item_name_2" value="Item 2" />
<input type="hidden" runat="server" id="amount_2 name="amount_2" value="20" />
<input type="hidden" name="tax" id="tax" value="0" />
<input type="hidden" name="upload" value="1" />
<%--<input type="hidden" runat="server" id="item_name" name="item_name" value="Item 1" />
<input type="hidden" runat="server" id="amount" name="amount" value="20.00" />--%>
<%--<input type="submit" value="Buy!" />--%>
<div style="text-align: center;">
<h4>
We are redirecting you to paypal
<br />
It will take some time meanwhile do not refresh ,go to back or close page</h4>
</div>
</form>
</body>
和代碼就像
cmd.Value = "_cart"; // set for multiple items or cart
//cmd.Value = "_xclick"; // set for single item
business.Value = System.Configuration.ConfigurationManager.AppSettings["BusinessAccountKey"];
bool useSandbox = Convert.ToBoolean(System.Configuration.ConfigurationManager.AppSettings["UseSandbox"]);
if (useSandbox)
confirmOrder1.Action = "https://www.sandbox.paypal.com/cgi-bin/webscr";
else
confirmOrder1.Action = "https://www.paypal.com/cgi-bin/webscr";
cancel_return.Value = clsAppConfig.CancelURL; //System.Configuration.ConfigurationManager.AppSettings["CancelURL"];
@return.Value = clsAppConfig.ReturnURL; // +"&PaymentId=" + paypalParams.FindByText("PaymentId").Value;
notify_url.Value = clsAppConfig.NotifyURL; // +"?PaymentId=" + paypalParams.FindByText("PaymentId").Value;
currency_code.Value = System.Configuration.ConfigurationManager.AppSettings["CurrencyCode"];
它非常適用於1個項目,但對於多項目我是得到錯誤,請任何人都可以建議我我在這裏失蹤..?
謝謝 Arun。
我已經更改了代碼,但是什麼是 ? –
它的產品數量,你正在添加到PayPal的購物車,即如果他們購買了2 x產品1在您的網站上,您需要通過支付朋友 – Bobby
是的,我也增加了數量,並檢查仍然沒有工作我失蹤的任何參數這裏.. –