royalcyber
asked on
Paypal parameter passing problem through hidden fields
I am trying to integrated paypal in my commerce website using the following code. But the problem is that when I completed the payment in Paypal website, it does not return to the "retun_url" that I have provided in the hidden field of the form. Is there any other way to pass the return_url and cancel_url as parameter to the paypal website. Any help in this regard will be highly appriciated
<script type="text/javascript">
function putValues(form){
form.quantity_1.value = 1;
form.amount_1.value = 100;
form.submit();
}
</script>
<form method="post" action="https://www.sandbox.paypal.com/us/cgi-bin/webscr">
<input type="hidden" name="cmd" value="_cart"/>
<input type="hidden" name="upload" value="1"/>
<input type="hidden" name="business" value="sales@royalcyber.co m"/>
<input type="hidden" name="item_name_1" value="Aggregated items"/>
<input type="hidden" name="amount_1" value="3.00"/>
<input type="hidden" name="return_url" value="<%retrunurl%>"/>
<input type="hidden" name="cancel_url" value="="<%cancelurl%>"/>
<input type="submit" value="Make Payment" onclick="putValues(this.fo rm)">
<script type="text/javascript">
function putValues(form){
form.quantity_1.value = 1;
form.amount_1.value = 100;
form.submit();
}
</script>
<form method="post" action="https://www.sandbox.paypal.com/us/cgi-bin/webscr">
<input type="hidden" name="cmd" value="_cart"/>
<input type="hidden" name="upload" value="1"/>
<input type="hidden" name="business" value="sales@royalcyber.co
<input type="hidden" name="item_name_1" value="Aggregated items"/>
<input type="hidden" name="amount_1" value="3.00"/>
<input type="hidden" name="return_url" value="<%retrunurl%>"/>
<input type="hidden" name="cancel_url" value="="<%cancelurl%>"/>
<input type="submit" value="Make Payment" onclick="putValues(this.fo
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Now I passed the parameters as in the following, but still I am unable to return to the given "return_url" after when I complete my payment on paypal test website.
<input type="hidden" name="return_url" value="http://www.royalcyber.com"/>
<input type="hidden" name="cancel_url" value="http://www.royalcyber.com"/>
Actully when I complete my payment on payal test website, then payal shows me a a message that payment has successfully been made, and there is a button "Continue", when I hover my mouse pointer over the "Continue" button, a message containing the next page url like "https://www.sandbox.paypal.com/us/cgi-bin/webscr?cmd=_yahoo-toolbar&return_url=&caller=" is shown on the status bar. where return_url is empty in the url.
Any help will be greatly appriciated
<input type="hidden" name="return_url" value="http://www.royalcyber.com"/>
<input type="hidden" name="cancel_url" value="http://www.royalcyber.com"/>
Actully when I complete my payment on payal test website, then payal shows me a a message that payment has successfully been made, and there is a button "Continue", when I hover my mouse pointer over the "Continue" button, a message containing the next page url like "https://www.sandbox.paypal.com/us/cgi-bin/webscr?cmd=_yahoo-toolbar&return_url=&caller=" is shown on the status bar. where return_url is empty in the url.
Any help will be greatly appriciated
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I am now going to put my problem at paypal forum
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Ya of course dear I will post the solution as soon as I get
ASKER
I have found the answer. the parameters must be 'cancel_return', and 'return'
ASKER
Thanks to all who helped me
ASKER
<input type="hidden" name="return_url" value="<%=retrunurl%>"></i
<input type="hidden" name="cancel_url" value="<%=cancelurl%>"></i
Any help in this regard will be highly appriciated..