Web Forms :: PayPal Web Payments Standard Submission?

Feb 21, 2011

I have PayPal Web Payment standard successfully integrated in an ecomerce solution I'm developing. My problem is this, I want to store details of the order being placed before it is sent to PayPal but only if it is sent and not if the just fill in everything in the shopping cart and then leave the page. There are 3 ways I can think of how this might be acheived but I'm not sure how to implement them.

1. Put some code in the page_unload that stores the data fi the page the browser is being transferred to is the paypal site. However I don't a way to determine what the next page is going to be.

2. Submit the the information to PayPal from the code behind. I'm sure this should be possible but I don't know how to do it and haven't managed to find a good articles on it.

3. Assign a javascript function to the onclick on PayPal submit button that calls a servside function using PageMethods. However this just seems like a bit a bodge introduces a whole array of other problems.

View 4 Replies


Similar Messages:

Put The Simplest PayPal Button / "Website Payments Standard Integration Guide"?

Jan 12, 2010

I am completing a website on which a single object is sold. I want to put the simplest PayPal button. I created the code of the button using the instructions on pp19 to 21 of "Website Payments Standard Integration Guide".

The code that was created was :

<code>
<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="123456789">
<input type="image" src="https://www.paypal.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.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1">
</form>
</code>
(I have altered the value value just for this post)

The HTML of the payment page is :

<code>
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Page05.aspx.vb" Inherits="Page05" %>
<!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">
<head id="Head1" runat="server">
<title>Page05</title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" /><link href="Eng05.css" type="text/css" rel="Stylesheet" />
</head>
<body>
<form id="Form5" method="post" runat="server">
<a id="ankera-p5"></a>
<div id="container">
<div id="inner_container">
<p>THE "ANY SMALL AD" WEB SITE</p>
<p>How to pay</p>

xxxxxxxx

<p><a href="Page11.aspx#ankera-p11" >Back to Services page</a></p>
<p><a href="Default.aspx#ankera-p1" >Back to home page</a></p>
<p></p>
</div> <!-- End of inner container -->
</div> <!-- End of container -->
</form>
</body>
</html>
</code>

I pasted in the button code where I have put "xxxxx", but it's all a mess and I can't seem to get the button to appear.

View 2 Replies

Online Payments Using Paypal NVP Api

Jan 17, 2011

I am developing a website with online payment. Payment is done using Paypal NVP Api. There is need of a facility to store customers credit card details(not in database) once they register to Website.There onwards whenever they order these details will be fetched, Customer need not enter their card details for every order. So is there any facility to create a profile n store credit card details of customer, as it is there for recurring payments?

View 1 Replies

C# - PayPal - ExpressCheckout And Recurring Payments

Oct 27, 2010

I'm trying to get PayPal's ExpressCheckout working with Recurring Payments. I've got the first two stages (the calls to SetExpressCheckout and GetExpressCheckoutDetails) but CreateRecurringPaymentsProfile fails with the error below. I'm using a modified version of Paypal's sample code, but I suspect I'm (not) setting an encoder value. Anyone used this before? The error:

// TIMESTAMP: 2010-10-27T09:57:47Z
// CORRELATIONID: ad2b2da33c672
// ACK: Failure
// VERSION: 51.0
// BUILD: 1553277
// L_ERRORCODE0: 11502
// L_SHORTMESSAGE0: Invalid Token
// L_LONGMESSAGE0: The token is invalid
// L_SEVERITYCODE0: Error
The code I'm using is:
/// This returns true
public bool SetExpressCheckout(string amt, ref string token, ref string retMsg)
{
string host = "www.paypal.com";
if (bSandbox) {
pendpointurl = "https://api-3t.sandbox.paypal.com/nvp";
host = "www.sandbox.paypal.com";
}
string baseUrl = "http://" + HttpContext.Current.Request.Url.Authority;
string[] returnUrlParts = WebConfigurationManager.AppSettings["PaypalReturnUrl"].Split('?'),
cancelUrlParts = WebConfigurationManager.AppSettings["PaypalCancelUrl"].Split('?');
string returnURL = baseUrl + VirtualPathUtility.ToAbsolute(returnUrlParts[0]) + (returnUrlParts.Length > 1 ? '?' + returnUrlParts.Skip(1).Aggregate((itms, itm) => itms + itm) : string.Empty),
cancelURL = baseUrl + VirtualPathUtility.ToAbsolute(cancelUrlParts[0]) + (cancelUrlParts.Length > 1 ? '?' + cancelUrlParts.Skip(1).Aggregate((itms, itm) => itms + itm) : string.Empty);
NVPCodec encoder = new NVPCodec();
encoder["METHOD"] = "SetExpressCheckout";
encoder["RETURNURL"] = returnURL;
encoder["CANCELURL"] = cancelURL;
encoder["AMT"] = amt;
//encoder["PAYMENTACTION"] = "SALE";
encoder["CURRENCYCODE"] = "GBP";
encoder["NOSHIPPING"] = "1";
encoder["L_BILLINGTYPE0"] = "RecurringPayments";
encoder["L_BILLINGAGREEMENTDESCRIPTION0"] = "Subscription for MySite";
string pStrrequestforNvp = encoder.Encode();
string pStresponsenvp = HttpCall(pStrrequestforNvp);
NVPCodec decoder = new NVPCodec();
decoder.Decode(pStresponsenvp);
string strAck = decoder["ACK"].ToLower();
if (strAck != null && (strAck == "success" || strAck == "successwithwarning")) {
token = decoder["TOKEN"];
string ECURL = "https://" + host + "/cgi-bin/webscr?cmd=_express-checkout" + "&token=" + token;
retMsg = ECURL;
return true;
} else {
retMsg = "ErrorCode=" + decoder["L_ERRORCODE0"] + "&" +
"Desc=" + decoder["L_SHORTMESSAGE0"] + "&" +
"Desc2=" + decoder["L_LONGMESSAGE0"];
return false;
}
}
/// This returns true
public bool GetExpressCheckoutDetails(string token, ref string PayerId, ref string retMsg)
{
if (bSandbox) {
pendpointurl = "https://api-3t.sandbox.paypal.com/nvp";
}
NVPCodec encoder = new NVPCodec();
encoder["METHOD"] = "GetExpressCheckoutDetails";
encoder["TOKEN"] = token;
string pStrrequestforNvp = encoder.Encode();
string pStresponsenvp = HttpCall(pStrrequestforNvp);
NVPCodec decoder = new NVPCodec();
decoder.Decode(pStresponsenvp);
string strAck = decoder["ACK"].ToLower();
if (strAck != null && (strAck == "success" || strAck == "successwithwarning")) {
return true;
} else {
retMsg = "ErrorCode=" + decoder["L_ERRORCODE0"] + "&" +
"Desc=" + decoder["L_SHORTMESSAGE0"] + "&" +
"Desc2=" + decoder["L_LONGMESSAGE0"];
return false;
}
}
// This fails and returns false with the following in the decoder result
// TIMESTAMP: 2010-10-27T09:57:47Z
// CORRELATIONID: ad2b2da33c672
// ACK: Failure
// VERSION: 51.0
// BUILD: 1553277
// L_ERRORCODE0: 11502
// L_SHORTMESSAGE0: Invalid Token
// L_LONGMESSAGE0: The token is invalid
// L_SEVERITYCODE0: Error
public bool CreateRecurringPaymentsProfileCode(string token, string amount, string profileDate, string billingPeriod, string billingFrequency, ref string retMsg)
{
NVPCallerServices caller = new NVPCallerServices();
IAPIProfile profile = ProfileFactory.createSignatureAPIProfile();
profile.APIUsername = this.APIUsername;
profile.APIPassword = this.APIPassword;
profile.APISignature = this.APISignature;
profile.Environment = "sandbox";
caller.APIProfile = profile;
string host = "www.paypal.com";
if (bSandbox) {
pendpointurl = "https://api-3t.sandbox.paypal.com/nvp";
host = "www.sandbox.paypal.com";
}
NVPCodec encoder = new NVPCodec();
encoder["VERSION"] = "51.0";
// Add request-specific fields to the request.
encoder["METHOD"] = "CreateRecurringPaymentsProfile";
encoder["TOKEN"] = token;
encoder["AMT"] = amount;
encoder["PROFILESTARTDATE"] = profileDate; //Date format from server expects Ex: 2006-9-6T0:0:0
encoder["BILLINGPERIOD"] = billingPeriod;
encoder["BILLINGFREQUENCY"] = billingFrequency;
encoder["L_BILLINGTYPE0"] = "RecurringPayments";
encoder["DESC"] = "Subscription for MySite";
// Execute the API operation and obtain the response.
string pStrrequestforNvp = encoder.Encode();
string pStresponsenvp = caller.Call(pStrrequestforNvp);
NVPCodec decoder = new NVPCodec();
decoder.Decode(pStresponsenvp);
//return decoder["ACK"];
string strAck = decoder["ACK"];
bool success = false;
if (strAck != null && (strAck == "Success" || strAck == "SuccessWithWarning")) {
success = true; // check decoder["result"]
} else {
success = false;
}
StringBuilder buffer = new StringBuilder();
for (int i = 0; i < decoder.Keys.Count; i++) {
buffer.AppendFormat("{0}: {1}", decoder.Keys[i], decoder.GetValues(i).Aggregate((vals, val) => vals + "----" + val));
}
retMsg = buffer.ToString();
return success;// returns false
}
If it helps, the code which is calling it is :
NVPAPICaller ppapi = new NVPAPICaller();
NVPCodec decoder = new NVPCodec();
string retMsg = string.Empty,
token = Convert.ToString(Session["token"]),
finalPaymentAmount = "15",
payerId = Convert.ToString(Session["payerId"] ?? string.Empty); // set from SetExpressCheckout
bool shippingSuccess = ppapi.GetExpressCheckoutDetails(token, ref payerId, ref retMsg);
if (shippingSuccess) {
payerId = Session["payerId"].ToString();
btnConfirm.Enabled = false;
bool paymentSuccess = ppapi.CreateRecurringPaymentsProfileCode(token, finalPaymentAmount, DateTime.Now.ToString("yyyy-M-DTH:m:s"), "Year", "1", ref retMsg);
// but paymentSuccess is false

View 1 Replies

Paypal Website Payments Pro Integration Using C#?

Nov 27, 2010

I need to implement checkout process using paypal website payments pro. I need solution/sample code for website payment pro with ASP.net/C#.

View 2 Replies

Paypal Accept Credit Card Payments?

Feb 17, 2010

I am creating my first e-commerce site.I have a nonprogramming ?; Does Paypal accept credit card payments or should i use a third party gateway to accept credit card payments?

View 2 Replies

SSL Certificate Type Required For PayPal HTTPS Web Service (Payments Pro SOAP / NVP)

Feb 25, 2011

We set up a paypal gateway on our site using paypal NVP API: Our IIS web server is set up for SSL, though I just created a cert on the locally machine. When we load HTTPS the browser gives a warning about security before the page will load. I know a local cert won't cut it for SSL, so I think we need a verisign cert? [URL] Is this correct? How can I know that the cert I am getting will get along with paypal and elimante any security warnings for the user.

View 1 Replies

Can Paypal Standard Be Incorporated Into Tailspin Spyworks At The Time Of Checkout?

Oct 28, 2010

I just took at quick look at Tailspin Spyworks and I think I would like to try the project. However, I did some looking around within the project and also did some google search on "Tailspin Spyworks and Paypal" but didn't really find anything. What I would want is to have a product page that displays as Tailspin does. When the customer wants to checkout that it takes them to paypal and when the user is done in paypal I come back to my site and receive the PayPal "Instant Payment Notification". My two questions are:

1) Does the Tailspin project allow the use of the Paypal checkout?
2) If the answer to question is Yes, does the project cover the Instant Payment Notification also?

View 2 Replies

Web Forms :: Form Email Data Submission By User Submission

Jan 15, 2010

I was able to find examples throughout the internet that more or less accomplished what I needed to be done, but now I have run into some problems. I need to be emailed the form data when the users submits it and then the user needs to be redirected to a thank you page, in this case "thanks.asp". I have been unable to get the form to redirect users to the thanks page, and in my efforts I think I might have messed the email process up as well.

[Code]....

View 14 Replies

PayPal Test Example Is Not Working - Getting Error / Unable To Send To PayPal

Nov 1, 2010

I was having trouble getting my shopping cart to connect to paypal. So I wrote a simple webform that has one button and one label. If I comment out the response.redirect(url) and look at the content that get written to Lable1.Text it looks find. Also, if I copy the content of the label and paste it into my web browser it goes to Paypal and displays correctly.

However, if I uncomment the response.redirect(url) I get the following error: ERROR: Unable to Send to PayPal - Thread was being aborted.

I am testing from localhost??? Should I be able to test this from localhost?

I have put ??? where my Sandbox email address is.....I don't know if letting other see that or not is an issue....otherwise I would have left it in for someone to try this code.

[Code]....


This is what displays in the lable1.text when response.redirect is commented out

[URL]

View 2 Replies

Data Submission During Form Submission

Oct 30, 2010

i have a form which has two textboxes and a submit button.on entering data and submitting data gets stored in the database.but if i again refresh the page the same data again gets stored.How should this be prevented?

View 3 Replies

C# - Paypal API And Paypal's Sample Code?

Oct 30, 2010

https://www.x.com/community/ppx/code_samples

The sample code returns ACK, but where is the proper response?

For example
Getbalance, sample code returns ACK
https://cms.paypal.com/cms_content/US/en_US/files/developer/nvp_GetBalance_cs.txt

but the document shows it returns other values?
https://www.x.com/docs/DOC-1186

View 1 Replies

How To Process Credit Card Payments

Aug 22, 2010

i have a web app.. and need to process credit card payments. recommend the best payment gateway provider that is easy to implement?

View 3 Replies

C# - How To Receive Payments From NopCommerce Shop

Jul 7, 2010

The setup was incredibly easy. The shop was up and running (Local server, for now!) But then I am confused. When the user will purchase a product from my shop, how will I receive the payment?

I searched a lot in order to setup my credit card/accounnt/paypal information in the Admin area, but I couldnt find anything...

View 3 Replies

Process Payments And Receive Amounts For Purchase The Store Has Made?

Jun 2, 2010

I am building a website for a small store. I want to know the concepts of payment methods.

I mean how to process payments and receive amounts for purchase the store has made.

View 4 Replies

Web Forms :: Asp.net 3.5 Form Submission

Feb 10, 2010

point me to a source where I can learn to create a form using dropdown, radio buttons, and other controls and then have web users submit information to me via email or post to SQL database so that it can be used. Do I need to be looking for sources via other languages such as php or javascript or can this be done easily using asp.net and visual studio.

View 3 Replies

Web Forms :: Form Submission Not Working On IE

Sep 6, 2010

I am a beginner in ASP.NET. I coded for contact and enquiry forms submission (data is submitted to access db & then mailed to desired client) , its working fine on all browsers except IE! Both forms data is submitted to tblForms table of [URL] /contact/default.aspx

<asp:TextBox ID="txtName" Text="Name" maxlength="50" CssClass="text_field" runat="server"></asp:TextBox>

View 2 Replies

Web Forms :: Send Email On Form Submission

Aug 5, 2010

I am building a simple support call system and part of the system requires that the engineer go in and update any calls he/she is working on. What I was wanted to do was make it so that when the engineer types in all his info and then hits update, the formview not only posts the data he/she has added to the database but also then sends an email to the user with the updated details.

View 2 Replies

Web Forms :: Validate Form In Database After Submission?

Feb 16, 2011

After submitting a form, i would like to read that it is actually there, before giving my succesfully submitted message. How would i go about checking that in the easiest way?

View 4 Replies

Web Forms :: Form Submission - Get The Posted Variables

Jul 6, 2010

If I were using PHP I could submit a form to a new page, or the same page, and get the posted variables by doing something such as $_POST['txtVariable'], how do I do the same thing in ASP.NET? And is it possible to have more than one form per page?

View 4 Replies

Web Forms :: Display Data Before Submission (Confirm)

Nov 14, 2010

I want to be able to display what end-users entered prior to submitting data to sql server DB. How do I accomplish this task? Currently, I have a textbox1 and submit button. Upon Submit button, I have the following code running.

[Code]....

Before submission, I want end-users to view whatever data they entered on Textbox1. Sort of like, confirmation page.

View 3 Replies

Web Forms :: FileUpload Control Don't Work On First Submission?

Feb 13, 2011

I'm having a problem with the FileUpload control in ASP.NET. It requires two postbacks to server in order to upload the file. In other words, after I select the file and click upload the page reloads but do nothing. Then I reselect the file and click upload then it works.

In my code I put a check for FileUpload.HasFile and it always fails (return false) on the first postback.

View 4 Replies

Web Forms :: Multiple Click Causes Duplicate Form Submission?

Mar 19, 2010

I am having problem with multiple clicks on submit button. Multiple clicks cause duplicate record insertion in database. On the form, I have used validation controls. Also I have to make some validations at server side, so I can't use javascript to prevent multiple clicks.

View 15 Replies

Web Forms :: How To Generate A Unique Random Number On A Form Submission

Sep 24, 2010

I want to generate a unique random number everytime a user submits a form. As the form is submited the data of the form should be placed in a database and a unique random number should be generated so that the user can later use this unique random number to reterieve his details from the database that refer to his unique random id. The unique random number should be atleast 9 digits long.

View 3 Replies

Web Forms :: Framework Stops Submission Dead In Tracks Before Code Can Run

Jan 6, 2011

Ever since we have moved to the 4.0 framework one of my apps now reports errors when users enter punctuation into the form. Which is a good thing, I do have a function in place that replaces all apostrophes with a double apostrophe but decided to beef it up by applying the httpUtility.htmlencode to the textboxes before I send it to a confirmation page that then emails the page to me and the person submitting the form. The problem is that the checks I have put into place to sanitize the textboxes don't fire because the 4.0 framework stops the submission dead in its tracks before the code can be ran. I have set the ValidateRequest="false" in the page tag but still no luck in getting sanitization to run. Is there something I am missing? From all I have read it should have worked.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved