|
Hi,
In our site I am trying to integrate the CITI Bank payment gateway .For canceling a payment we need to send the post request from merchant site to payment gateway site .For this I am using the web request method , I am posting the parameters to the payment gateway server using the web request but not getting the web response , it is giving the error as The remote server returned an error: (500) Internal Server Error . I am not understanding whether the problem is with the web request or I am not sending the request properly to the gateway . Can anyone please let me know is there any other way to post the request from server to server other than web request method .
Thanks in advance
|
|
|
|
|
vnr wrote: The remote server returned an error: (500) Internal Server Error
If you are sending web request as per their code functionality then its not your error.Sometimes if you are not sending all the parameters which the gateway needs then this error may occur..!
Sometimes the http request waits for particular time to get the response from the server and if it did not get any response this error may occur..!
Here is the sample method for authorize .net for gateway hope it helps..!
private string CreditCardCheck()
{
String strPost = "x_login=" + loginID + "&x_tran_key=" + trans_Key ;
StreamWriter myWriter = null;
string url ="https://secure.authorize.net/gateway/transact.dll";
HttpWebRequest objRequest = (HttpWebRequest)WebRequest.Create(url);
objRequest.Method = "POST";
objRequest.ContentLength = strPost.Length;
objRequest.ContentType = "application/x-www-form-urlencoded";
try
{
myWriter = new StreamWriter(objRequest.GetRequestStream());
myWriter.Write(strPost);
}
catch (Exception ex)
{
logger.Error(ex.Message);
}
finally
{
myWriter.Close();
}
HttpWebResponse objResponse = (HttpWebResponse)objRequest.GetResponse();
using (StreamReader sr =
new StreamReader(objResponse.GetResponseStream()))
{
result = sr.ReadToEnd();
string[] responsedetails = result.Split('|');
TrasactionId = responsedetails[6].ToString();
sr.Close();
}
if (result.ToLower().Contains("invalid") || result.ToLower().Contains("inactive"))
{
return "CreditCardis notvalid";
}
return TrasactionId ;
}
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
I have an application in which,
The aspx Page is dicided in to two[Left pane & Right Pane]
In Left pane the Function[say to calculate 2 nmbrs,CALCULATE Button]
On Clicking the CALCULATE Button the function calls the java script..and the result should be shown in the Right pane,I mean the page has to be refreshed and the rsult should be shown in the same page..
Please help on this!!!!!!!!!
|
|
|
|
|
This is Fairly simple. What is your challenge here ? What have you tried so far ? Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
wt this link refers to? is thr any coding provided for this problem i too have the same problem
|
|
|
|
|
So write a function in javascript which reads the two numbers from the controls,calculate the sum and assign to the control in right pane.
And call this function at onClick event of Button.Cheers!!
Brij
|
|
|
|
|
what shuld we do if it is a large text?
|
|
|
|
|
i mean i my case i have to show a big paragraph thn shld i also write a funct n call?
|
|
|
|
|
Its upto your requirement.If it is to be done at client side then no issues, you can apply the same way Cheers!!
Brij
|
|
|
|
|
u plz help me how to do in asp.net is it possible to do?
|
|
|
|
|
Post your code with your specific requirement,I'll surely help if I could Cheers!!
Brij
|
|
|
|
|
You can use AJAX Update Panel for the same.
1. In left panel Put all the control inside UpdatePanel1 ( Say UpdatePanel1) and lets do what ever you want to do.
2. In right Panel Put the result control inside another updatepanel (Say Updatepanel2 ) , Set the UpdatePanel2's Properties "UpdateMode="Conditional" .
3. In Left panel, when you are writing the code for result, write UpdatePanel2.Update()
That's all.
Please let me know if you need any more help.
Thanks !
Abhijit
|
|
|
|
|
can any one help me in getting the data by clicking any particular button the respective data should be appeared in a frame.
|
|
|
|
|
What is the problem you are facing?OnClick event of the button,you can fetch data and can show it on the page,where you want. Cheers!!
Brij
|
|
|
|
|
acc to my requiremnt i cant use i frame so am using frame set which is working i have a tree view in left side of my pge. while clicking any button of tree view i should get data in right of my frame. the full page shld not get redirected. The tree view and the buttons on shld be visible always. this is my prob. which code shld i use nw help me. hw to fetch the data and put in our selected place?.can v redirect the page in a single to other frame?
|
|
|
|
|
Then better if you use AJAX.Use update panel, to update the portion of the page that you want to update on the click event of the page.
for sample of Updatepanels ,Have a lookCheers!!
Brij
|
|
|
|
|
Is this not possible in asp.net? what if my seniors say that v shuld not use AJAX thn hw would be the solution?
|
|
|
|
|
sowjanya3 wrote: what if my seniors say that v shuld not use AJAX thn hw would be the solution?
You have make them understood,that you will have to use AJAX else the whole page will get refreshed.
One more way to use callback,But It's complex and creates problems sometimes.Cheers!!
Brij
|
|
|
|
|
What I understood from your point, you want to show some data in Iframe on button click. As I frame is a different page, you can pass the data easily by Query String.
Like on Button Click
Response.Redirect("/Test.aspx?id=10&name=abc");
and You set the IFrame Target with Test.aspx and on that page Load, you can easily read those data and can display on the page,
Hope this will help you !!
|
|
|
|
|
acc to my requiremnt i cant use i frame so am using frame set which is working i have a tree view in left side of my pge. while clicking any button of tree view i should get data in right of my frame. the full page shld not get redirected. The tree view and the buttons on shld be visible always. this is my prob. which code shld i use nw help me
|
|
|
|
|
sowjanya3 wrote: acc
sowjanya3 wrote: pge
sowjanya3 wrote: prob
sowjanya3 wrote: shld
sowjanya3 wrote: nw
Hi, Please do not use this kind of short from ( Chat Language ) while asking any question. Please ask the question in proper way so that every one can understand easily.
Can you please rephrase your question, that you are looking for
Thanks !
Abhijit
|
|
|
|
|
AJAX allows you to update portions of the page without interfering with the whole I know the language. I've read a book. - _Madmatt
|
|
|
|
|
how we can do that? can u help me by giving sample coding?
my main goal is as we click a button on left frame the data has to appeared on right frame
|
|
|
|
|
Try here[^] I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hi,I think you can get the data when some event happens. e.g. onmouseover event, onkeydown event...
modified 27-May-14 4:51am.
|
|
|
|