i want to know about paypall system and how to implement in my project ? can any body help me ?
i m implementing a project which needs the paypal module and kindly suggest me some source code . thanks and regards ?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Kunal VaishyaPosted Jul 3, 2012, 4:13 AM
https://www.paypal.com/cgi-bin/webscr?cmd=_wp-standard-integration-outside
Here mentioned many variation of accounts to be created.
Kunal VaishyaPosted Jul 3, 2012, 4:13 AM
Transaction Request
TRXTYPE=S&TENDER=C&ACCT=5105105105105100&EXPDATE=1209&CVV2=123&AMT=99.00
&FIRSTNAME=John&LASTNAME=Smith&STREET=123 Main St.&CITY=SanHose
&STATE=CA&ZIP=12345&COMMENT1=Reservation&USER=MyUser&PWD=MyPassword
&VENDOR=MyVendor&PARTNER=MyPartner
Transaction Response
RESULT=0&PNREF=EFHP0D426A53&RESPMSG=APPROVED&AUTHCODE=25TEST&
AVSADDR=Y&AVSZIP=N&CVV2MATCH=Y
protected void btnSubmit_Click(object sender, EventArgs e)
{
try
{
string PayPalRequest = "TRXTYPE=S" //S - sale transaction
+ "&TENDER=C" //C - Credit card
+ "&ACCT=" + txtCardNumber.Text //card number
+ "&EXPDATE=" + ddlMonth.SelectedValue +
ddlYear.SelectedValue.Substring(2, 2)
+ "&CVV2=" + txtCvv.Text //card validation value (card security code)
+ "&AMT=" + txtAmount.Text
+ "&COMMENT1=My Product Sale"
+ "&USER=" + ConfigurationManager.AppSettings["USER"]
+ "&VENDOR=" + ConfigurationManager.AppSettings["VENDOR"]
+ "&PARTNER=" + ConfigurationManager.AppSettings["PARTNER"]
+ "&PWD=" + ConfigurationManager.AppSettings["PWD"];
// Create an instance of PayflowNETAPI.
PayflowNETAPI PayflowNETAPI = new PayflowNETAPI();
// RequestId is a unique string that is required for each & every transaction.
// The merchant can use her/his own algorithm to generate
// this unique request id or use the SDK provided API to generate this
// as shown below (PayflowUtility.RequestId).
string PayPalResponse = PayflowNETAPI.SubmitTransaction
(PayPalRequest, PayflowUtility.RequestId);
//place data from PayPal into a namevaluecollection
NameValueCollection RequestCollection =
GetPayPalCollection(PayflowNETAPI.TransactionRequest);
NameValueCollection ResponseCollection = GetPayPalCollection(PayPalResponse);
//show request
lblResult.Text = "
PayPal Payflow Pro transaction request
";
lblResult.Text += ShowPayPalInfo(RequestCollection);
//show response
lblResult.Text += "
PayPal Payflow Pro transaction response
";
lblResult.Text += ShowPayPalInfo(ResponseCollection);
//show transaction errors if any
string TransErrors = PayflowNETAPI.TransactionContext.ToString();
if (TransErrors != null && TransErrors.Length > 0)
{
lblResult.Text += "
Transaction Errors: " + TransErrors;
}
//show transaction status
lblResult.Text += "
Status: " + PayflowUtility.GetStatus(PayPalResponse);
}
catch (Exception ex)
{
lblError.Text = ex.Message.ToString();
}
}
private NameValueCollection GetPayPalCollection(string payPalInfo)
{
//place the responses into collection
NameValueCollection PayPalCollection =
new System.Collections.Specialized.NameValueCollection();
string[] ArrayReponses = payPalInfo.Split('&');
for (int i = 0; i < ArrayReponses.Length; i++)
{
string[] Temp = ArrayReponses[i].Split('=');
PayPalCollection.Add(Temp[0], Temp[1]);
}
return PayPalCollection;
}
private string ShowPayPalInfo(NameValueCollection collection)
{
string PayPalInfo = "";
foreach (string key in collection.AllKeys)
{
PayPalInfo += "
" +
key + ": " + collection[key];
}
return PayPalInfo;
}
}
Satyapriya NayakPosted Jul 3, 2012, 2:56 AM
Please refer the below links
http://www.codeproject.com/KB/aspnet/paypal_c_aspnet.aspx
http://www.codeproject.com/KB/aspnet/UsePayPalPaymentInASPNET.aspx
http://www.codeproject.com/Articles/152280/Online-Credit-Card-Transaction-in-ASP-NET-Using-Pa
http://www.dotnetfunda.com/articles/article928-online-payments-using-paypal-integration-with-aspnet.aspx
Thanks