|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
JScript - General - Question - Asp Paypal
Hi there
I'm trying to introduce PayPal to my website. I've write the following form to send the values to PayPal: <form action="https://www.sandbox.paypal.com/us/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_cart"> <input type="hidden" name="token" value=""> <input type="hidden" name="upload" value="1"> <input type="hidden" name="business" value="<%=paypalref%>"> <input type="hidden" name="currency_code" value="GBP"> <input type="hidden" name="PAYMENTACTION" value="Sale"> <input type="hidden" name="callback" value="<%=callback%>"> <input type="hidden" name="RETURNURL" value="http://www.mywebsite.com/confirmation.asp?orderid=<%=myquery%>"> <input type="hidden" name="CANCELURL" value="http://www.mywebsite.com/cancelation.asp?orderid=<%=myquery%>"> <input type="hidden" name="item_name_<%=amount%>" value="<%=strProdName%>"> <input type="hidden" name="amount_<%=amount%>" value="<%=formatNumber(intProdPrice,2)%>"> <input type="image" name="submit" src="https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif" /> </form> The problem is when the payment is done it doesn't return to my website page. Is there anyone could help me please? Thanks
__________________
If this help you please show your gratitude by adding reputation points. Thanks JonyBravo |
|
#2
|
||||
|
||||
|
I've not used this before, but I can see that you are specifying a url to rteturn to via the returnurl. What happens when you run this code, does it redirect you anywhere when paypal has finished?
In the documentation you were given does it specify what you need to call the text box, have you given it the correct name? Also, is the address that you are passing a legal address? Is there anything on your page which may be re-directing the user to another page, ie checking for the value of a session variable? Code:
<input type="hidden" name="RETURNURL" value="http://www.mywebsite.com/confirmation.asp?orderid=<%=myquery%>"> |
|
#3
|
||||
|
||||
|
What that does is assign a url to a "return to website" button at the end of the PayPal transaction, which you have to click to return to that page you specified. I think the only way to have it automatically return to your site is to upgrade your account. I could be wrong but I'm pretty sure I'm right.
|
|
#4
|
||||
|
||||
|
PayPal's Sandbox server can assist you in debugging this. Log in and watch your transactions. What's happening?
__________________
Scripting problems? Windows questions? Ask the Windows Guru! Stay up to date with all of my latest content. Follow me on Twitter! Help us help you! Post your exact error message with these easy tips! |
|
#5
|
|||
|
|||
|
Thank you very much for your responses. I'm following the script given by the paypal website but it isn't working. I'm using the PayPal's Sandbox server to test the script. I know this is not the right forum for paypal questions but because the quality of the developers that uses this forum I was hoping I would find here an paypal expert.
Thanks you very much again |
|
#6
|
|||
|
|||
|
I might be wrong but I believe the field name should be return_url and not RETURNURL. Likewise I think it is cancel_url, not CANCELURL.
Try this and see if it works: Code:
<input type="hidden" name="return_url" value="http://www.mywebsite.com/confirmation.asp?orderid=<%=myquery%>"> |
|
#7
|
||||
|
||||
|
I just checked my own working code, and name should simply be "return", not "return_url" or "returnurl".
|
![]() |
| Viewing: ASP Free Forums > Programming > ASP Development > JScript - General - Question - Asp Paypal |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|