1
Answer

Difference b/w Webdriver and driver in selenium?

Guys help me...

Answers (1)

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