This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

unable to get response from payment website

 
preethi Ayyappan
Ranch Hand
Posts: 518
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

i am trying to post some parameters to a payment website like the following. If i run a jsp, that will pass the parameters to the controller and from the controller i am trying to post the values received from the jsp and trying to get the reponse in the same controller. But i dont know how to find whether the controller gets connected with the payment websit and request has been sent from my end. I dont whether my code is correct and i am following the correct procedure. please assist me to do this. i am posting the code also.




When i try to print the variable "line", I am getting null.

Thanks
 
Lester Burnham
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Start here: Don't println to a Socket. It's most likely not what's causing the problem, but you're doing that by way of the "readLine" method and need to fix that.
 
Richard Robbins
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi preethi,
When I'm doing a quick check to verify that a POST has been received by the server, I tend to simplify my code, for instance only sending one variable. The payment module should have an API function you can call (it should send a simple "OK" type of response) simply to verify that you're making the call correctly. If your code isn't working, I'd recommend that you try one of those two options.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic