Click here to Skip to main content
15,904,877 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionConstant "from" email address Pin
Member 1286994519-Jan-17 23:15
Member 1286994519-Jan-17 23:15 
AnswerRe: Constant "from" email address Pin
Afzaal Ahmad Zeeshan19-Jan-17 23:31
professionalAfzaal Ahmad Zeeshan19-Jan-17 23:31 
QuestionExtract numbers with % sign from a string Pin
byka19-Jan-17 7:18
byka19-Jan-17 7:18 
AnswerRe: Extract numbers with % sign from a string Pin
Richard Deeming19-Jan-17 7:43
mveRichard Deeming19-Jan-17 7:43 
GeneralRe: Extract numbers with % sign from a string Pin
byka19-Jan-17 7:57
byka19-Jan-17 7:57 
GeneralRe: Extract numbers with % sign from a string Pin
Richard Deeming19-Jan-17 8:03
mveRichard Deeming19-Jan-17 8:03 
GeneralRe: Extract numbers with % sign from a string Pin
byka19-Jan-17 9:05
byka19-Jan-17 9:05 
QuestionRegarding paypal web service integration in any asp.net web application Pin
Tridip Bhattacharjee18-Jan-17 1:42
professionalTridip Bhattacharjee18-Jan-17 1:42 
now we have cart and when user click on check out button then we have a code which run and redirect user to paypal web site and from there user purchase.

now i like to show how we pass user selected product data and user details to paypal web site.
here is the sample code
C#
NameValueCollection data = new NameValueCollection();
data.Add("cmd", "_cart");
data.Add("business", "test@gmail.com");
data.Add("invoice", 1);

data.Add("item_name_1", "Audi part1");
data.Add("amount_1" , 200);

data.Add("item_name_1", "BMW part1");
data.Add("amount_1" , 300);

data.Add("item_name_2", "carriage");
data.Add("amount_2" , 500);

data.Add("item_name_2" , "insurance");
data.Add("amount_100" , 100);

data.Add("item_name_2", "VAT Amount");
data.Add("amount_2" , 100);                    

data.Add("country", "GB");
data.Add("currency_code", "GBP");
data.Add("cn", "How did you hear about us?");
data.Add("upload", "1");
data.Add("address_override", "1");

data.Add("first_name", "customer first name");
data.Add("last_name", "customer last name");
data.Add("address1", "customer address1");
data.Add("city", "customer city");
data.Add("state", "customer state");
data.Add("zip", "customer post code");

data.Add("return", "http://abc.mysite.net/catalogue/order/PayPalSuccess.aspx");
data.Add("cancel_return", "http://abc.mysite.net/catalogue/order/PayPalFailure.aspx");
data.Add("notify_url", "http://abc.mysite.net/catalogue/order/PayPalNotify.aspx");

HttpHelper.RedirectAndPOST(this.Page, "https://www.paypal.com/cgi-bin/webscr", data);


C#
public static void RedirectAndPOST(Page page, string destinationUrl, NameValueCollection data)
{
    //Prepare the Posting form
    string strForm = PreparePOSTForm(destinationUrl, data);

    //Add a literal control the specified page holding the Post Form, this is to submit the Posting form with the request.
    page.Controls.Add(new LiteralControl(strForm));
}


i am interested to know is there any web service paypal offer as a result we can use that and we can pass user and cart data to paypal by calling their web service as a result we can stay in our web site page and do not have to push user to paypal page.

basically i am looking for a way to pass information from my web site to paypal web site internally or silently by using their web service. so just redirect me to relevant paypal page or article which guide me how to use paypal web service if any exist.

please guide me. thanks
tbhattacharjee

AnswerRe: Regarding paypal web service integration in any asp.net web application Pin
Member 1078624118-Jan-17 1:58
Member 1078624118-Jan-17 1:58 
AnswerRe: Regarding paypal web service integration in any asp.net web application Pin
F-ES Sitecore18-Jan-17 3:12
professionalF-ES Sitecore18-Jan-17 3:12 
Questioncould not load file or assembly system.windows...The system cannot find the file specified Pin
Zeyad Jalil16-Jan-17 23:59
professionalZeyad Jalil16-Jan-17 23:59 
AnswerRe: could not load file or assembly system.windows...The system cannot find the file specified Pin
Ashwin. Shetty17-Jan-17 0:39
Ashwin. Shetty17-Jan-17 0:39 
GeneralRe: could not load file or assembly system.windows...The system cannot find the file specified Pin
Zeyad Jalil17-Jan-17 1:33
professionalZeyad Jalil17-Jan-17 1:33 
GeneralRe: could not load file or assembly system.windows...The system cannot find the file specified Pin
Ashwin. Shetty17-Jan-17 1:42
Ashwin. Shetty17-Jan-17 1:42 
GeneralRe: could not load file or assembly system.windows...The system cannot find the file specified Pin
Zeyad Jalil17-Jan-17 2:24
professionalZeyad Jalil17-Jan-17 2:24 
AnswerRe: could not load file or assembly system.windows...The system cannot find the file specified Pin
Richard Deeming17-Jan-17 2:45
mveRichard Deeming17-Jan-17 2:45 
GeneralRe: could not load file or assembly system.windows...The system cannot find the file specified Pin
Zeyad Jalil17-Jan-17 2:52
professionalZeyad Jalil17-Jan-17 2:52 
GeneralRe: could not load file or assembly system.windows...The system cannot find the file specified Pin
Richard Deeming17-Jan-17 2:56
mveRichard Deeming17-Jan-17 2:56 
GeneralRe: could not load file or assembly system.windows...The system cannot find the file specified Pin
Zeyad Jalil17-Jan-17 4:52
professionalZeyad Jalil17-Jan-17 4:52 
GeneralRe: could not load file or assembly system.windows...The system cannot find the file specified Pin
Richard Deeming17-Jan-17 4:56
mveRichard Deeming17-Jan-17 4:56 
GeneralRe: could not load file or assembly system.windows...The system cannot find the file specified Pin
Zeyad Jalil17-Jan-17 5:02
professionalZeyad Jalil17-Jan-17 5:02 
GeneralRe: could not load file or assembly system.windows...The system cannot find the file specified Pin
Richard Deeming17-Jan-17 5:07
mveRichard Deeming17-Jan-17 5:07 
AnswerRe: could not load file or assembly system.windows...The system cannot find the file specified Pin
ZurdoDev17-Jan-17 5:05
professionalZurdoDev17-Jan-17 5:05 
GeneralRe: could not load file or assembly system.windows...The system cannot find the file specified Pin
Zeyad Jalil17-Jan-17 5:09
professionalZeyad Jalil17-Jan-17 5:09 
AnswerRe: could not load file or assembly system.windows...The system cannot find the file specified Pin
Zeyad Jalil17-Jan-17 21:13
professionalZeyad Jalil17-Jan-17 21:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.