[英]Paypal sandbox url opens my documents
當我單擊應該重定向到貝寶的按鈕時,我一直遇到問題,它打開了我的文檔。 它在運行之前,但是當我將代碼傳輸到另一台PC時,發生了錯誤。 救命!
這是aspx.cs中的代碼
受保護的無效btnPayOnline_Click(對象發送者,EventArgs e){
string url = "";
string business = "business@yahoo.com";
string description = "Buy";
string country = "PH";
string currency = "PHP";
string amount = Label1.Text;
url += "https://www.sandbox.paypal.com/cgi-bin/webscr" +
"?cmd=" + "_xclick" +
"&business=" + business +
"&amount=" + amount +
"&lc=" + country +
"&item_name=" + description +
"¤cy_code=" + currency +
"&bn=" + "PP%2dBuyNowBF";
System.Diagnostics.Process.Start("explorer.exe", url);
}
這是aspx代碼:
我真的看不出問題是什么
您的程序將啟動文件夾資源管理器(從而顯示默認的本地目錄),而不是Web瀏覽器。
用iexplore.exe
替換explorer.exe
應該可以解決您的問題。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.