| Line 94... |
Line 94... |
| 94 |
* JDK since they can change at any time. This behaviour was changed in
|
94 |
* JDK since they can change at any time. This behaviour was changed in
|
| 95 |
* JAVA 1.4 to return instances of javax.net.ssl.HttpsURLConnection.
|
95 |
* JAVA 1.4 to return instances of javax.net.ssl.HttpsURLConnection.
|
| 96 |
* However, it appears, that to allow clients with JDK 1.4 and earlier,
|
96 |
* However, it appears, that to allow clients with JDK 1.4 and earlier,
|
| 97 |
* HDFC favours the use of the deprecated class.
|
97 |
* HDFC favours the use of the deprecated class.
|
| 98 |
*/
|
98 |
*/
|
| 99 |
System.setProperty("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");
|
99 |
System.setProperty("https.protocols", "TLSv1");
|
| 100 |
|
100 |
|
| 101 |
try {
|
101 |
try {
|
| 102 |
// URL of CGI-Bin script.
|
102 |
// URL of CGI-Bin script.
|
| 103 |
url = new URL("https://api.secure.ebs.in/api/1_0");
|
103 |
url = new URL("https://api.secure.ebs.in/api/1_0");
|
| 104 |
// URL connection channel.
|
104 |
// URL connection channel.
|
| Line 258... |
Line 258... |
| 258 |
* JDK since they can change at any time. This behaviour was changed in
|
258 |
* JDK since they can change at any time. This behaviour was changed in
|
| 259 |
* JAVA 1.4 to return instances of javax.net.ssl.HttpsURLConnection.
|
259 |
* JAVA 1.4 to return instances of javax.net.ssl.HttpsURLConnection.
|
| 260 |
* However, it appears, that to allow clients with JDK 1.4 and earlier,
|
260 |
* However, it appears, that to allow clients with JDK 1.4 and earlier,
|
| 261 |
* HDFC favours the use of the deprecated class.
|
261 |
* HDFC favours the use of the deprecated class.
|
| 262 |
*/
|
262 |
*/
|
| 263 |
System.setProperty("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");
|
263 |
System.setProperty("https.protocols", "TLSv1");
|
| 264 |
|
264 |
|
| 265 |
try {
|
265 |
try {
|
| 266 |
// URL of CGI-Bin script.
|
266 |
// URL of CGI-Bin script.
|
| 267 |
url = new URL("https://api.secure.ebs.in/api/1_0");
|
267 |
url = new URL("https://api.secure.ebs.in/api/1_0");
|
| 268 |
// URL connection channel.
|
268 |
// URL connection channel.
|
| Line 327... |
Line 327... |
| 327 |
|
327 |
|
| 328 |
return resultMap;
|
328 |
return resultMap;
|
| 329 |
}
|
329 |
}
|
| 330 |
|
330 |
|
| 331 |
public static void main(String[] args){
|
331 |
public static void main(String[] args){
|
| 332 |
//TODO: The following call has been deprecated now. Need to create a payment object to make this call now.
|
332 |
Payment p = new Payment();
|
| 333 |
// capturePayment(30450.00, "2412653");
|
333 |
p.setGatewayPaymentId("30573297");
|
| - |
|
334 |
p.setAmount(20);
|
| 334 |
|
335 |
|
| 335 |
// <output transactionId="4793507" paymentId="2411078" amount="25005" dateTime="2011-05-16 09:03:15" mode="TEST" referenceNo="4" transactionType="Captured" status="Processing" />";
|
- |
|
| 336 |
|
- |
|
| 337 |
// <output errorCode="2" error="Invalid Account ID/Secret Key" />
|
- |
|
| 338 |
// <output errorCode="12" error="This payment is failed" />
|
336 |
capturePayment(p);
|
| 339 |
// <output errorCode="13" error="This payment is captured already" />
|
- |
|
| 340 |
}
|
337 |
}
|
| 341 |
}
|
338 |
}
|