mmalik15
asked on
Paypal BuyNow button is not re directing to the paypal website
On my paypal account I have created a buynow button. Copied pasted the html on my webpage but after clicking the button, Its not getting redirected to the paypal website for the payment. I have tried the button in three browsers IE firefox and chrome, created a new buynow button but still no luck. I am using asp.net c# on windows 7. Any ideas why it could be happening?
How about pasting a source code here?
ASKER
here is the code thanks
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="M7Z2QNQMGJ6WS">
<input type="image" src="https://www.paypalobjects.com/en_US/GB/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal — The safer, easier way to pay online.">
<img alt="" border="0" src="https://www.paypalobjects.com/en_GB/i/scr/pixel.gif" width="1" height="1">
</form>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="M7Z2QNQMGJ6WS">
<input type="image" src="https://www.paypalobjects.com/en_US/GB/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal — The safer, easier way to pay online.">
<img alt="" border="0" src="https://www.paypalobjects.com/en_GB/i/scr/pixel.gif" width="1" height="1">
</form>
Works just fine by itself. Please paste here the source of the whole page (from the browser).
or try using this code instead:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="M7Z2QNQMGJ6WS">
<button><img src="https://www.paypalobjects.com/en_US/GB/i/btn/btn_buynowCC_LG.gif" border="0"></button>
<img alt="" border="0" src="https://www.paypalobjects.com/en_GB/i/scr/pixel.gif" width="1" height="1">
</form>
or try using this code instead:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="M7Z2QNQMGJ6WS">
<button><img src="https://www.paypalobjects.com/en_US/GB/i/btn/btn_buynowCC_LG.gif" border="0"></button>
<img alt="" border="0" src="https://www.paypalobjects.com/en_GB/i/scr/pixel.gif" width="1" height="1">
</form>
ASKER
I have attached the html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="utf-8" />
<meta name="cache-control" content="no-cache" />
<meta name="language" content="en" />
<title>Home - Life in the UK</title>
<meta name="keywords" content="Home" />
<meta name="description" content="Home" />
<link href='Skins/MyCustomSkin/Button.MyCustomSkin.css' rel="stylesheet" media=all type="text/css" />
<link type="text/css" rel="stylesheet" media="all" href='CSS/styles.css' />
<link type="text/css" rel="stylesheet" media="all" href='CSS/ac.css' />
</head>
<body >
<form method="post" action="Payment.aspx" id="form1">
<div class="aspNetHidden">
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKMTY1NDU2MTA1Mg9kFgJmD2QWAmYPZBYCAgEPFgIeB1Zpc2libGVoZGRlxFk2uPk2QIFcEQM4l6eOERw8zIkn7Vot9TBGL7/MvA==" />
</div>
<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['form1'];
if (!theForm) {
theForm = document.form1;
}
function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
}
}
//]]>
</script>
<div class="aspNetHidden">
<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWAwLZnfyXBQK3zebFCQKE9pjfCLvZYTCNL9BOqGvWxb1mnN6LUZG9c189IcQadwLMAGaG" />
</div>
<div id="Div1" style="padding-top: 8px;">
</div>
<div id="wrapp" >
<header id="header">
<div id="TopLinksLogin" class="TopLinksStyle">
<ul style="list-style-type:none; font-weight:bold;">
<li style="display:inline;">
<a id="lbtnRegister" class="NoUnderline" href="javascript:__doPostBack('ctl00$lbtnRegister','')">Register</a></li>
<li style="display:inline;"> | </li>
<li style="display:inline;">
<a id="lbtnLogin" href="javascript:__doPostBack('ctl00$lbtnLogin','')">Login</a></li>
</ul>
</div>
<h1><a href="http://localhost/LifeInTheUK/PL/Home.aspx" style=" vertical-align:bottom;" title="Life in the UK">Life in the UK</a></h1>
<nav>
<ul>
<li><a href='Home.aspx' > Home</a></li>
<li><a href='Register.aspx' > Register</a></li>
<li><a href='AboutTest.aspx' > About Test</a></li>
<li><a href='Book.aspx' > Study meterial</a></li>
<li><a href='FreeTest.aspx' > Free sample test</a></li>
<li><a href='Testimonials.aspx' > Customer testimonial</a></li>
</ul>
</nav>
<div class="clear"></div>
</header>
<div id="MainContent" style="padding-left: 0px; border: 1px; float:left;" class="LeftColumnRegister">
</div>
<div id="Div2" style=" border: 1px; float:left;" class="RightColumnRegister">
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="M7Z2QNQMGJ6WS">
<input type="image" src="https://www.paypalobjects.com/en_US/GB/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal — The safer, easier way to pay online.">
<img alt="" border="0" src="https://www.paypalobjects.com/en_GB/i/scr/pixel.gif" width="1" height="1">
</form>
</div>
<footer id="footer" >
<table cellspacing=0px cellpadding=0px style="font-weight: bold; text-align: center; font-family:Verdana;
width:40%; height:60%; padding-top:5px; margin-left:30%; margin-right: 30%; color: White; ">
<Br />
<tr>
<td>
<a href="http://localhost/LifeInTheUK/PL/Home.aspx">Home</a>
</td>
<td style="font-weight: bold;">
|
</td>
<td>
<a href="http://localhost/LifeInTheUK/PL/Register.aspx">Register</a>
</td>
<td style="font-weight: bold;">
|
</td>
<td>
<a href="http://localhost/LifeInTheUK/PL/FreeTest.aspx">Free Sample Test</a>
</td>
<td style="font-weight: bold;">
|
</td>
<td>
<a href="http://localhost/LifeInTheUK/PL/Sitemap.aspx">Site Map</a>
</td>
<td style="font-weight: bold;">
|
</td>
<td>
<a href="http://localhost/LifeInTheUK/PL/contactus.aspx">Contact US</a>
</td>
</tr>
<tr>
<td colspan=9 align=center style="font-size:10px; word-spacing:1px; padding-top:0px;">© Copyright 2011. practicelifeintheuktest.co.uk All Rights Reserved
</td>
</tr>
</table>
</footer>
</div>
</form>
</body>
</html>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.