I'm using Skrill payment method in my asp.net web application.
When clicked on booking button it redirects to the Skrill for payments as:
protected void btnBook_Click(object sender, EventArgs e)
{
// Mastercard 5438311234567890
// Visa 4000001234567890
// Amex 371234500012340
string url = "https://pay.skrill.com/?";
// Merchant Details
url += "pay_to_email=" + "demoqco@sun-fish.com";
url += "&recipient_description=" + "Banquet Halls Booking System";
url += "&language=" + "EN";
url += "&status_url=" + "";
// Customer Details
url += "&country=" + "Pakistan";
// Payment Details
url += "&amount=" + string.Format("{0:0.00}", (double.Parse(lblGrandTotal.Text) / 110.00));
url += "¤cy=" + "USD";
url += "&amount2_description=" + Persons.Text + ":";
url += "&amount2=" + lblPersons.Text;
url += "&amount3_description=" + PerHeadRate.Text + ":";
url += "&amount3=" + lblPerHeadRate.Text;
url += "&amount4_description=" + Tax.Text + ":";
url += "&amount4=" + lblTax.Text + "%";
url += "&detail1_description=" + "Booking ID:";
url += "&detail1_text=" + objDLBkg.SelectLastBkID();
url += "&detail2_description=" + "Description:";
url += "&detail2_text=" + "View all bookings in your Account.";
url += "&detail3_description=" + "Banquet Hall:";
url += "&detail3_text=" + lblBqtName.Text;
url += "&detail4_description=" + "Booking Date:";
url += "&detail4_text=" + DateTime.Now.Date.ToString("MM/dd/yyyy");
// Split Gateway
url += "&payment_methods=" + "WLT,ACC";
Response.Redirect(url);
}
And shows error on redirect to Skrill:
JBWEB000065: HTTP Status 400 -
JBWEB000309: type JBWEB000067: Status report
JBWEB000068: message
JBWEB000069: description JBWEB000120: The request sent by the client was syntactically incorrect.
JBoss Web/7.5.9.Final-redhat-1
How I can solve it? Where I'm wrong?
I've figured out that there is a special character %
used in my redirect server-URL that's caused the error here:
url += "&amount4=" + lblTax.Text + "%";
Just removed %
character from URL and it worked.