| Line 84... |
Line 84... |
| 84 |
addActionError("We are experiencing some problems. Please try later.");
|
84 |
addActionError("We are experiencing some problems. Please try later.");
|
| 85 |
log.error("Exception in createOrders function. Something went wrong.", e);
|
85 |
log.error("Exception in createOrders function. Something went wrong.", e);
|
| 86 |
return "shipping-redirect";
|
86 |
return "shipping-redirect";
|
| 87 |
}
|
87 |
}
|
| 88 |
|
88 |
|
| 89 |
if (paymentOption.equals(IPaymentService.EBS_MASTERCARD) || paymentOption.equals(IPaymentService.EBS_VISA) || paymentOption.equals(IPaymentService.EBS_VISA_ELECTRON)) {
|
89 |
if (paymentOption.equals(IPaymentService.HDFC_MASTERCARD) || paymentOption.equals(IPaymentService.HDFC_VISA) || paymentOption.equals(IPaymentService.HDFC_VISA_ELECTRON)) {
|
| 90 |
// User has selected Visa or MasterCard CC
|
90 |
// User has selected Visa or MasterCard CC
|
| 91 |
IPaymentService hdfcPaymentService = new HdfcPaymentService();
|
91 |
IPaymentService hdfcPaymentService = new HdfcPaymentService();
|
| 92 |
paymentId = hdfcPaymentService.createPayment(userinfo.getCartId(), userinfo.getUserId(), txnId, paymentOption);
|
92 |
paymentId = hdfcPaymentService.createPayment(userinfo.getCartId(), userinfo.getUserId(), txnId, paymentOption);
|
| 93 |
if (paymentId == IPaymentService.PAYMENT_NOT_CREATED) {
|
93 |
if (paymentId == IPaymentService.PAYMENT_NOT_CREATED) {
|
| 94 |
log.error("Unable to process payment through HDFC. Falling through to EBS.");
|
94 |
log.error("Unable to process payment through HDFC. Falling through to EBS.");
|
| Line 97... |
Line 97... |
| 97 |
log.info(this.redirectURL);
|
97 |
log.info(this.redirectURL);
|
| 98 |
return "success";
|
98 |
return "success";
|
| 99 |
}
|
99 |
}
|
| 100 |
}
|
100 |
}
|
| 101 |
|
101 |
|
| - |
|
102 |
if(paymentOption.equals(IPaymentService.HDFC_VISA))
|
| - |
|
103 |
paymentOption = IPaymentService.EBS_VISA;
|
| - |
|
104 |
else if(paymentOption.equals(IPaymentService.HDFC_MASTERCARD))
|
| - |
|
105 |
paymentOption = IPaymentService.EBS_MASTERCARD;
|
| 102 |
if(paymentOption.equals(IPaymentService.EBS_VISA_ELECTRON))
|
106 |
else if(paymentOption.equals(IPaymentService.HDFC_VISA_ELECTRON))
|
| 103 |
paymentOption = null; //Since we don't know the bank's name in this case, we'll let the user select the bank on the EBS page.
|
107 |
paymentOption = null; //Since we don't know the bank's name in this case, we'll let the user select the bank on the EBS page.
|
| 104 |
|
108 |
|
| 105 |
IPaymentService ebsPaymentService = new EbsPaymentService();
|
109 |
IPaymentService ebsPaymentService = new EbsPaymentService();
|
| 106 |
paymentId = ebsPaymentService.createPayment(userinfo.getCartId(), userinfo.getUserId(), txnId, paymentOption);
|
110 |
paymentId = ebsPaymentService.createPayment(userinfo.getCartId(), userinfo.getUserId(), txnId, paymentOption);
|
| 107 |
if(paymentId == IPaymentService.PAYMENT_NOT_CREATED){
|
111 |
if(paymentId == IPaymentService.PAYMENT_NOT_CREATED){
|