Click here to Skip to main content
15,895,859 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
this is my code,i had implemented paypal but i cant able to retrieve user details after paying
VB
'Pay pal process Refer for what are the variable are need to send http://www.paypalobjects.com/IntegrationCenter/ic_std-variable-ref-buy-now.html

Dim redirectUrl As String = ""

'Mention URL to redirect content to paypal site
redirectUrl += "https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_xclick&business=" & Email

'First name I assign static based on login details assign this value
redirectUrl += "&first_name=" & Name

'Product Name
redirectUrl += "&item_name=" & "Tour Package"

'Product Amount
redirectUrl += "&amount=" & Totalprice

'Business contact paypal EmailID
redirectUrl += "&business=" & Email
'  redirectUrl = +"&address_street=" & Address
'redirectUrl = +"&address_city=" & City
'Quantiy of product, Here statically added quantity 1
redirectUrl += "&quantity=1"

'If transactioin has been successfully performed, redirect SuccessURL page- this page will be designed by developer
redirectUrl += "&return=" + ConfigurationManager.AppSettings("SuccessURL").ToString()
redirectUrl += "&rm=2"
'If transactioin has been failed, redirect FailedURL page- this page will be designed by developer
redirectUrl += "&cancel_return=" + ConfigurationManager.AppSettings("FailedURL").ToString()

Response.Redirect(redirectUrl)
Posted
Comments
F-ES Sitecore 5-Oct-15 7:41am    
Consult paypal's site, they have complete examples you can look at.

1 solution

I'd recommend you to read PayPal documentation[^] and download sample code[^].

Note: string concatenation (used by you) is incorrect.
Why? String[^] is immutable! Please, refer this: Why strings are immutable and what are the implications of it?[^]
 
Share this answer
 
Comments
SathishRam 6-Oct-15 7:41am    
thanxs
Maciej Los 6-Oct-15 10:50am    
You're very welcome ;)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900