| Line 238... |
Line 238... |
| 238 |
minMaxAmounts.add(Double.parseDouble(Float.toString(minMax.get("MAX"))));
|
238 |
minMaxAmounts.add(Double.parseDouble(Float.toString(minMax.get("MAX"))));
|
| 239 |
return minMaxAmounts;
|
239 |
return minMaxAmounts;
|
| 240 |
}
|
240 |
}
|
| 241 |
|
241 |
|
| 242 |
@Override
|
242 |
@Override
|
| 243 |
public String initializeHdfcPayment(long merchantPaymentId) throws PaymentException, TException {
|
243 |
public String initializeHdfcPayment(long merchantPaymentId, boolean isMobile) throws PaymentException, TException {
|
| 244 |
logger.info("Initializing HDFC payment with id: " + merchantPaymentId);
|
244 |
logger.info("Initializing HDFC payment with id: " + merchantPaymentId);
|
| 245 |
in.shop2020.payment.domain.Payment payment = paymentHandler.getPayment(merchantPaymentId);
|
245 |
in.shop2020.payment.domain.Payment payment = paymentHandler.getPayment(merchantPaymentId);
|
| 246 |
String redirectURL;
|
246 |
String redirectURL;
|
| 247 |
try {
|
247 |
try {
|
| 248 |
redirectURL = HdfcPaymentHandler.initializeHdfcPayment(payment, this);
|
248 |
redirectURL = HdfcPaymentHandler.initializeHdfcPayment(payment, this, isMobile);
|
| 249 |
} catch (Exception e) {
|
249 |
} catch (Exception e) {
|
| 250 |
throw new PaymentException(102, "Error while initiliazing payment. Check service log for more details.");
|
250 |
throw new PaymentException(102, "Error while initiliazing payment. Check service log for more details.");
|
| 251 |
}
|
251 |
}
|
| 252 |
return redirectURL;
|
252 |
return redirectURL;
|
| 253 |
}
|
253 |
}
|
| 254 |
|
254 |
|
| 255 |
@Override
|
255 |
@Override
|
| 256 |
public String doHdfcPaymentForDigitalOrder(long merchantPaymentId, long rechargeOrderId, String phone) throws PaymentException, TException {
|
256 |
public String doHdfcPaymentForDigitalOrder(long merchantPaymentId, long rechargeOrderId, String phone, boolean isMobile) throws PaymentException, TException {
|
| 257 |
logger.info("Initializing HDFC payment with id: " + merchantPaymentId);
|
257 |
logger.info("Initializing HDFC payment with id: " + merchantPaymentId);
|
| 258 |
in.shop2020.payment.domain.Payment payment = paymentHandler.getPayment(merchantPaymentId);
|
258 |
in.shop2020.payment.domain.Payment payment = paymentHandler.getPayment(merchantPaymentId);
|
| 259 |
TransactionClient tc = new TransactionClient();
|
259 |
TransactionClient tc = new TransactionClient();
|
| 260 |
String redirectURL;
|
260 |
String redirectURL;
|
| 261 |
RechargeOrder rechargeOrder;
|
261 |
RechargeOrder rechargeOrder;
|
| 262 |
try {
|
262 |
try {
|
| 263 |
rechargeOrder = tc.getClient().getRechargeOrder(rechargeOrderId);
|
263 |
rechargeOrder = tc.getClient().getRechargeOrder(rechargeOrderId);
|
| 264 |
redirectURL = HdfcPaymentHandler.initializeHdfcPayment(payment, rechargeOrder, phone, this);
|
264 |
redirectURL = HdfcPaymentHandler.initializeHdfcPayment(payment, rechargeOrder, phone, this, isMobile);
|
| 265 |
} catch (Exception e) {
|
265 |
} catch (Exception e) {
|
| 266 |
throw new PaymentException(102, "Error while initiliazing payment. Check service log for more details.");
|
266 |
throw new PaymentException(102, "Error while initiliazing payment. Check service log for more details.");
|
| 267 |
}
|
267 |
}
|
| 268 |
|
268 |
|
| 269 |
return redirectURL;
|
269 |
return redirectURL;
|
| 270 |
}
|
270 |
}
|
| 271 |
|
271 |
|
| 272 |
@Override
|
272 |
@Override
|
| 273 |
public String initializeHdfcEmiPayment(long merchantPaymentId) throws PaymentException, TException {
|
273 |
public String initializeHdfcEmiPayment(long merchantPaymentId, boolean isMobile) throws PaymentException, TException {
|
| 274 |
logger.info("Initializing HDFC payment with id: " + merchantPaymentId);
|
274 |
logger.info("Initializing HDFC payment with id: " + merchantPaymentId);
|
| 275 |
in.shop2020.payment.domain.Payment payment = paymentHandler.getPayment(merchantPaymentId);
|
275 |
in.shop2020.payment.domain.Payment payment = paymentHandler.getPayment(merchantPaymentId);
|
| 276 |
String redirectURL;
|
276 |
String redirectURL;
|
| 277 |
try {
|
277 |
try {
|
| 278 |
redirectURL = HdfcEmiPaymentHandler.initializeHdfcPayment(payment, this);
|
278 |
redirectURL = HdfcEmiPaymentHandler.initializeHdfcPayment(payment, this);
|