I. Form submission
Function paypalsubmit (){
VaR paypalform;
VaR formmain;
VaR paypalendingurl = "<% = hosturl %> PAY/paypalending. aspx ";
VaR paypalcancelurl = "<% = hosturl %> PAY/paypalcancel. aspx"
If (window. Navigator. appname. tolowercase (). indexof ("Microsoft")>-1 ){
Paypalform = Document. formpaypal;
Formmain = Document. form1;
Paypalform. All. Item ("cmd"). value = "_ xclick ";
Paypalform. All. Item ("business"). value = "youraccount@163.com ";
Paypalform. All. Item ("return"). value = paypalendingurl + "? PayPal = 1 & langtypeid = <% = langtypeid %> ";
Paypalform. All. Item ("undefinded_quantity"). value = "1 ";
VaR itemname = '<% = paypalitemnumber %> ';
If (itemname. length> 4)
{
Paypalform. All. Item ("item_name"). value = "<% = paypalitemnumber %> ";
}
Paypalform. All. Item ("item_number"). value = "<% = paypalitemnumber %> ";
Paypalform. All. Item ("no_shipping"). value = "2 ";
Paypalform. All. Item ("cancel_return"). value = paypalendingurl + "? PayPal = 2 & langtypeid = <% = langtypeid %> ";
Paypalform. All. Item ("no_note"). value = "0 ";
Paypalform. All. Item ("payer_id"). value = formmain. All. Item ("uccheckoutresult_lblordernumber"). innertext;
Paypalform. All. Item ("Custom"). value = formmain. All. Item ("uccheckoutresult_lblordernumber"). innertext;
Paypalform. All. Item ("invoice"). value = "<% = invoice %>"; // ticket
Paypalform. All. Item ("yy_url"). value = paypalendingurl + "? PayPal = 3 & langtypeid = <% = langtypeid %> ";
Paypalform. All. Item ("currency_code"). value = "<% = cartcurrency %> ";
Paypalform. All. Item ("amount"). value = 200.99;
Paypalform. All. Item ("bn"). value = "Web. shop.0.4 ";
Paypalform. Submit ();
}
Else {
Paypalform = Document. Forms ["formpaypal"];
Formmain = Document. Forms ["form1"];
Paypalform. elements ["cmd"]. value = "_ xclick ";
Paypalform. elements ["business"]. value = "youraccountemail@163.com ";
Paypalform. elements ["return"]. value = paypalendingurl + "? PayPal = 1 & langtypeid = <% = langtypeid %> ";
Paypalform. elements ["item_number"]. value = "<% = paypalitemnumber %> ";
Paypalform. elements ["undefinded_quantity"]. value = "1 ";
VaR itemname2 = '<% = paypalitemnumber %> ';
If (itemname2.length> 4)
{
Paypalform. elements ["item_name"]. value = "<% = paypalitemnumber %> ";
}
Paypalform. elements ["no_shipping"]. value = "2 ";
Paypalform. elements ["cancel_return"]. value = paypalendingurl + "? PayPal = 2 & langtypeid = <% = langtypeid %> ";
Paypalform. elements ["no_note"]. value = "0 ";
If (formmain. elements ["uccheckoutresult_txtordernumber"]! = NULL)
{
Paypalform. elements ["payer_id"]. value = formmain. elements ["uccheckoutresult_txtordernumber"]. value;
}
Else
{
Paypalform. elements ["payer_id"]. value = "";
}
If (formmain. elements ["uccheckoutresult_txtordernumber"]! = NULL)
{
Paypalform. elements ["Custom"]. value = formmain. elements ["uccheckoutresult_txtordernumber"]. value;
}
Else
{
Paypalform. elements ["Custom"]. value = "";
}
Paypalform. elements ["invoice"]. value = "<% = invoice %>"; // ticket
Paypalform. elements ["yy_url"]. value = paypalendingurl + "? PayPal = 3 & langtypeid = <% = langtypeid %> ";
Paypalform. elements ["currency_code"]. value = "<% = cartcurrency %> ";
If (formmain. elements ["uccartinfo_txtlevelingamount"]! = NULL)
{
Levelingamount = formmain. elements ["uccartinfo_txtlevelingamount"]. value;
}
Paypalform. elements ["amount"]. value = 100.99;
Paypalform. elements ["bn"]. value = "Web. shop.0.4 ";
Paypalform. Submit ();
}
}
-------------------
C # can also be submitted using the server code
Private void button#click (Object sender, system. eventargs E)
{
String postdata = "";
Postdata + = "currency_code = USD ";
Postdata + = "& cmd = _ xclick ";
Postdata + = & Business = youraccountemail@163.com;
Postdata + = "& upload = 1 ";
Postdata + = "& cancel_return =" + hosturl + "Pay/paypalending. aspx ";
Postdata + = "& item_name = wowgn000255555 ";
Postdata + = "& quantity = 1 ";
Postdata + = "& amount = 280.23 ";
Postdata + = "& no_shipping = 2 ";
Byte [] DATA = encoding. ASCII. getbytes (postdata );
Response. Redirect ("https://www.paypal.com/cgi-bin/webscr? "+ Postdata );
}
<Form ID = "formpaypal" name = "formpaypal" onsubmit = "Return check ()" Action = "https://www.paypal.com/cgi-bin/webscr"
Method = "Post">
<Input id = "cmd" type = "hidden" name = "cmd"> <input type = "hidden" name = "redirect_cmd"> <input type = "hidden" name = ""Business"> <input type = "hidden" name = "return"> <input type = "hidden" name = "undefinded_quantity"> <input type = "hidden" name =" item_name "> <input type =" hidden"
Name = "item_number"> <input type = "hidden" name = "no_shipping"> <input type = "hidden" name = "cancel_return"> <input type = "hidden" Name = "no_note"> <input type = "hidden" name = "payer_id"> <input type = "hidden" name = "Custom"> <input type = "hidden" name = "hidm"> "invoice"> <input type = "hidden"
Name = "first_name"> <input type = "hidden" name = "last_name"> <input type = "hidden" name = "address1"> <input type = "hidden" Name = "address2"> <input type = "hidden" name = "city"> <input type = "hidden" name = "state"> <input type = "hidden" name = "city ""Zip"> <input type = "hidden" name = "yy_url"> <Input
Type = "hidden" name = "amount"> <input type = "hidden" name = "currency_code"> <input type = "hidden" name = "bn"> <input type = "hidden" name = "LC" value = "us">
</Form>
Submit JS
I. Form submission
Function paypalsubmit (){
VaR paypalform;
VaR formmain;
VaR paypalendingurl = "<% = hosturl %> PAY/paypalending. aspx ";
VaR paypalcancelurl = "<% = hosturl %> PAY/paypalcancel. aspx"
If (window. Navigator. appname. tolowercase (). indexof ("Microsoft")>-1 ){
Paypalform = Document. formpaypal;
Formmain = Document. form1;
Paypalform. All. Item ("cmd"). value = "_ xclick ";
Paypalform. All. Item ("business"). value = "youraccount@163.com ";
Paypalform. All. Item ("return"). value = paypalendingurl + "? PayPal = 1 & langtypeid = <% = langtypeid %> ";
Paypalform. All. Item ("undefinded_quantity"). value = "1 ";
VaR itemname = '<% = paypalitemnumber %> ';
If (itemname. length> 4)
{
Paypalform. All. Item ("item_name"). value = "<% = paypalitemnumber %> ";
}
Paypalform. All. Item ("item_number"). value = "<% = paypalitemnumber %> ";
Paypalform. All. Item ("no_shipping"). value = "2 ";
Paypalform. All. Item ("cancel_return"). value = paypalendingurl + "? PayPal = 2 & langtypeid = <% = langtypeid %> ";
Paypalform. All. Item ("no_note"). value = "0 ";
Paypalform. All. Item ("payer_id"). value = formmain. All. Item ("uccheckoutresult_lblordernumber"). innertext;
Paypalform. All. Item ("Custom"). value = formmain. All. Item ("uccheckoutresult_lblordernumber"). innertext;
Paypalform. All. Item ("invoice"). value = "<% = invoice %>"; // ticket
Paypalform. All. Item ("yy_url"). value = paypalendingurl + "? PayPal = 3 & langtypeid = <% = langtypeid %> ";
Paypalform. All. Item ("currency_code"). value = "<% = cartcurrency %> ";
Paypalform. All. Item ("amount"). value = 200.99;
Paypalform. All. Item ("bn"). value = "Web. shop.0.4 ";
Paypalform. Submit ();
}
Else {
Paypalform = Document. Forms ["formpaypal"];
Formmain = Document. Forms ["form1"];
Paypalform. elements ["cmd"]. value = "_ xclick ";
Paypalform. elements ["business"]. value = "youraccountemail@163.com ";
Paypalform. elements ["return"]. value = paypalendingurl + "? PayPal = 1 & langtypeid = <% = langtypeid %> ";
Paypalform. elements ["item_number"]. value = "<% = paypalitemnumber %> ";
Paypalform. elements ["undefinded_quantity"]. value = "1 ";
VaR itemname2 = '<% = paypalitemnumber %> ';
If (itemname2.length> 4)
{
Paypalform. elements ["item_name"]. value = "<% = paypalitemnumber %> ";
}
Paypalform. elements ["no_shipping"]. value = "2 ";
Paypalform. elements ["cancel_return"]. value = paypalendingurl + "? PayPal = 2 & langtypeid = <% = langtypeid %> ";
Paypalform. elements ["no_note"]. value = "0 ";
If (formmain. elements ["uccheckoutresult_txtordernumber"]! = NULL)
{
Paypalform. elements ["payer_id"]. value = formmain. elements ["uccheckoutresult_txtordernumber"]. value;
}
Else
{
Paypalform. elements ["payer_id"]. value = "";
}
If (formmain. elements ["uccheckoutresult_txtordernumber"]! = NULL)
{
Paypalform. elements ["Custom"]. value = formmain. elements ["uccheckoutresult_txtordernumber"]. value;
}
Else
{
Paypalform. elements ["Custom"]. value = "";
}
Paypalform. elements ["invoice"]. value = "<% = invoice %>"; // ticket
Paypalform. elements ["yy_url"]. value = paypalendingurl + "? PayPal = 3 & langtypeid = <% = langtypeid %> ";
Paypalform. elements ["currency_code"]. value = "<% = cartcurrency %> ";
If (formmain. elements ["uccartinfo_txtlevelingamount"]! = NULL)
{
Levelingamount = formmain. elements ["uccartinfo_txtlevelingamount"]. value;
}
Paypalform. elements ["amount"]. value = 100.99;
Paypalform. elements ["bn"]. value = "Web. shop.0.4 ";
Paypalform. Submit ();
}
}
-------------------
C # can also be submitted using the server code
Private void button#click (Object sender, system. eventargs E)
{
String postdata = "";
Postdata + = "currency_code = USD ";
Postdata + = "& cmd = _ xclick ";
Postdata + = & Business = youraccountemail@163.com;
Postdata + = "& upload = 1 ";
Postdata + = "& cancel_return =" + hosturl + "Pay/paypalending. aspx ";
Postdata + = "& item_name = wowgn000255555 ";
Postdata + = "& quantity = 1 ";
Postdata + = "& amount = 280.23 ";
Postdata + = "& no_shipping = 2 ";
Byte [] DATA = encoding. ASCII. getbytes (postdata );
Response. Redirect ("https://www.paypal.com/cgi-bin/webscr? "+ Postdata );
}
<Form ID = "formpaypal" name = "formpaypal" onsubmit = "Return check ()" Action = "https://www.paypal.com/cgi-bin/webscr"
Method = "Post">
<Input id = "cmd" type = "hidden" name = "cmd"> <input type = "hidden" name = "redirect_cmd"> <input type = "hidden" name = ""Business"> <input type = "hidden" name = "return"> <input type = "hidden" name = "undefinded_quantity"> <input type = "hidden" name =" item_name "> <input type =" hidden"
Name = "item_number"> <input type = "hidden" name = "no_shipping"> <input type = "hidden" name = "cancel_return"> <input type = "hidden" Name = "no_note"> <input type = "hidden" name = "payer_id"> <input type = "hidden" name = "Custom"> <input type = "hidden" name = "hidm"> "invoice"> <input type = "hidden"
Name = "first_name"> <input type = "hidden" name = "last_name"> <input type = "hidden" name = "address1"> <input type = "hidden" Name = "address2"> <input type = "hidden" name = "city"> <input type = "hidden" name = "state"> <input type = "hidden" name = "city ""Zip"> <input type = "hidden" name = "yy_url"> <Input
Type = "hidden" name = "amount"> <input type = "hidden" name = "currency_code"> <input type = "hidden" name = "bn"> <input type = "hidden" name = "LC" value = "us">
</Form>
Submit JS