| Line 155... |
Line 155... |
| 155 |
this.redirectURL = ((HdfcEmiPaymentService)hdfcEmiPaymentService).getRedirectUrl();
|
155 |
this.redirectURL = ((HdfcEmiPaymentService)hdfcEmiPaymentService).getRedirectUrl();
|
| 156 |
log.info(this.redirectURL);
|
156 |
log.info(this.redirectURL);
|
| 157 |
return "success";
|
157 |
return "success";
|
| 158 |
}
|
158 |
}
|
| 159 |
} else {
|
159 |
} else {
|
| - |
|
160 |
if(paymentOption.equals(IPaymentService.HDFC_MASTERCARD_CREDIT) || paymentOption.equals(IPaymentService.HDFC_MASTERCARD_DEBIT) ||
|
| 160 |
if(paymentOption.equals(IPaymentService.HDFC_MASTERCARD) || paymentOption.equals(IPaymentService.HDFC_VISA) || paymentOption.equals(IPaymentService.HDFC_VISA_ELECTRON)) {
|
161 |
paymentOption.equals(IPaymentService.HDFC_VISA) || paymentOption.equals(IPaymentService.HDFC_VISA_ELECTRON)) {
|
| 161 |
// User has selected Visa or MasterCard CC
|
162 |
// User has selected Visa or MasterCard
|
| 162 |
IPaymentService hdfcPaymentService = new HdfcPaymentService();
|
163 |
IPaymentService hdfcPaymentService = new HdfcPaymentService();
|
| 163 |
paymentId = hdfcPaymentService.createPayment(userinfo.getCartId(), userinfo.getUserId(), txnId, paymentOption, sourceId);
|
164 |
paymentId = hdfcPaymentService.createPayment(userinfo.getCartId(), userinfo.getUserId(), txnId, paymentOption, sourceId);
|
| 164 |
if (paymentId == IPaymentService.PAYMENT_NOT_CREATED) {
|
165 |
if (paymentId == IPaymentService.PAYMENT_NOT_CREATED) {
|
| 165 |
log.error("Unable to process payment through HDFC. Falling through to EBS.");
|
166 |
log.error("Unable to process payment through HDFC. Falling through to EBS.");
|
| 166 |
} else {
|
167 |
} else {
|
| Line 170... |
Line 171... |
| 170 |
}
|
171 |
}
|
| 171 |
}
|
172 |
}
|
| 172 |
|
173 |
|
| 173 |
if(paymentOption.equals(IPaymentService.HDFC_VISA))
|
174 |
if(paymentOption.equals(IPaymentService.HDFC_VISA))
|
| 174 |
paymentOption = IPaymentService.EBS_VISA;
|
175 |
paymentOption = IPaymentService.EBS_VISA;
|
| 175 |
else if(paymentOption.equals(IPaymentService.HDFC_MASTERCARD))
|
176 |
else if(paymentOption.equals(IPaymentService.HDFC_MASTERCARD_DEBIT) || paymentOption.equals(IPaymentService.HDFC_MASTERCARD_CREDIT))
|
| 176 |
paymentOption = IPaymentService.EBS_MASTERCARD;
|
177 |
paymentOption = IPaymentService.EBS_MASTERCARD;
|
| 177 |
else if(paymentOption.equals(IPaymentService.HDFC_VISA_ELECTRON))
|
178 |
else if(paymentOption.equals(IPaymentService.HDFC_VISA_ELECTRON))
|
| 178 |
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.
|
179 |
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.
|
| 179 |
|
180 |
|
| 180 |
IPaymentService ebsPaymentService = new EbsPaymentService();
|
181 |
IPaymentService ebsPaymentService = new EbsPaymentService();
|