2
Answers

Integrating Paypal Test account in asp.net mvc

Photo of Shibly  Sadik

Shibly Sadik

9y
948
1
I have developed a simple asp.net application and added paypal payment method.
 
<add key="business" value="shiblyjkkniu@gmail.com" />
<add key="isSandbox" value="true" />
<add key="currency_code" value="USD" />
<add key="return" value="http://localhost/PayPal/RedirectFromPaypal" />
<add key="cancel_return" value="http://localhost/PayPal/CancelFromPaypal" />
<add key="notify_url" value="http://localhost/PayPal/NotifyFromPaypal" />

<add key="test_url" value="https://www.sandbox.paypal.com/cgi-bin/webscr" />
<add key="Prod_url" value="https://www.paypal.com/cgi-bin/webscr" />
 
But i am getting the error:
 
We cannot process this transaction because there is a problem with the PayPal email address supplied by the seller. Please contact the seller to resolve the problem. If this payment is for an eBay listing, you can contact the seller via the "Ask Seller a Question" link on the listing page. When you have the correct email address, payment can be made at www.paypal.com. 
 I think my business test account is verified but still getting the error??
what should i do?

Answers (2)

0
Photo of Shibly  Sadik
NA 139 47.5k 9y
Thanks for your answersir..please look at my code below:
 
//Model 
public class PayPalModel
{
[Key]
public string cmd { get; set; }
public string business { get; set; }
public string no_shipping { get; set; }
public string @return { get; set; }
public string cancel_return { get; set; }
public string notify_url { get; set; }
public string currency_code { get; set; }
public string item_name { get; set; }
public string amount { get; set; }
public string actionURL { get; set; }
public PayPalModel(bool useSandbox)
{
this.cmd = "_xclick ";
this.business =
ConfigurationManager.AppSettings
["business "];
this.cancel_return =
ConfigurationManager.AppSettings
["cancel_return "];
this.@return =
ConfigurationManager.AppSettings
["return "];
if (useSandbox)
{
this.actionURL =
ConfigurationManager.AppSettings
["test_url"];
}
else
{
this.actionURL =
ConfigurationManager.AppSettings
["Prod_url"];
}
this.notify_url =
ConfigurationManager.AppSettings
["notify_url "];
this.currency_code =
ConfigurationManager.AppSettings
["currency_code "];
}
}
 
//Controller 
 
public ActionResult ValidateCommand(string
product, string totalPrice)
{
bool useSandbox =
Convert.ToBoolean
(ConfigurationManager.AppSettings
[" IsSandbox "]);
var paypal = new PayPalModel
(useSandbox);
paypal.cmd = "_xclick";
paypal.item_name = product;
paypal.amount = totalPrice;
return View(paypal);
}
 
Where is the problem?? 
0
Photo of Blackbarbie Bb
NA 104 5 9y
Long back i have written in c#
 

Before testing my code, I log in the PayPal Developer Central and then I launch the SandBox for the seller’s email

( sparkingboss@si.com ).

I would like to get some help to find out why my code is not working in the PayPal SandBox.

It returns an error message:

“We cannot process this transaction because there is a problem with the PayPal email address supplied by the seller. Please contact the seller to solve the problem.”

The strange thing is that I used the same variables and its values and the same email addresses in the PayPalTech – Testing page ( http://paypaltech.com/Stephen/test/index.htm ) and it works.

Here is the relevant code:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

// Create the PayPal redirect location for Buy Now

string redirect = "";

redirect += "https://www.sandbox.paypal.com/cgi-bin/webscr?busines=sparkingboss@si.com";

redirect += "&cmd=_xclick";

redirect += "&invoice=" + orderId;

redirect += "&item_name=" + productName;

redirect += "&item_number=" + productID;

redirect += "&amount=" + price;

redirect += "&quantity=" + quantity;

redirect += "&currency_=USD";

redirect += "&return=http://83.35.154.61/SI/PDT_CustomerReturn.aspx";

redirect += "&cancel_return=http://83.35.154.61/SI/Cancel.aspx";

redirect += "&rm=2";// means method=POST

redirect += "notify_url=http://83.35.154.61/SI/IpnHandler.aspx"; //receive IPN

redirect += "&no-shipping=1"; // not asked for shipping details

redirect += "&first_name=" + firstname;

redirect += "&last_name=" + lastname;

//redirect += "&email=" + email;

redirect += "&email=stephen@a_web_site.com";

// Redirect to the payment page

Response.Redirect(redirect);

 
hope it would resolve your problem,ensure u have properly provided amount,price string as formatted in their code