| Line 165... |
Line 165... |
| 165 |
|
165 |
|
| 166 |
if(result != null && result.trim().equals(PaymentReturnStatus.CAPTURED.value())){
|
166 |
if(result != null && result.trim().equals(PaymentReturnStatus.CAPTURED.value())){
|
| 167 |
String message = "Payment successful";
|
167 |
String message = "Payment successful";
|
| 168 |
|
168 |
|
| 169 |
try {
|
169 |
try {
|
| 170 |
paymentClient.updatePaymentDetails(merchantPaymentId, paymentId, sessionId, result, message, tranId, auth, ref, errorNo, PaymentStatus.SUCCESS, null);
|
170 |
paymentClient.updatePaymentDetails(merchantPaymentId, paymentId, sessionId, result, message, tranId, auth, ref, errorNo, PaymentStatus.SUCCESS, postdate, null);
|
| 171 |
} catch (PaymentException e1) {
|
171 |
} catch (PaymentException e1) {
|
| 172 |
log.error("Unable to update payment details in our database." + e1.getError_code() + e1.getMessage());
|
172 |
log.error("Unable to update payment details in our database." + e1.getError_code() + e1.getMessage());
|
| 173 |
e1.printStackTrace();
|
173 |
e1.printStackTrace();
|
| 174 |
} catch (TException e1) {
|
174 |
} catch (TException e1) {
|
| 175 |
log.error("Unable to update payment details in our database. Thrift exception.");
|
175 |
log.error("Unable to update payment details in our database. Thrift exception.");
|
| Line 227... |
Line 227... |
| 227 |
this.redirectUrl = successUrl + "?paymentId="+merchantPaymentId;
|
227 |
this.redirectUrl = successUrl + "?paymentId="+merchantPaymentId;
|
| 228 |
|
228 |
|
| 229 |
}else{
|
229 |
}else{
|
| 230 |
|
230 |
|
| 231 |
try {
|
231 |
try {
|
| 232 |
paymentClient.updatePaymentDetails(merchantPaymentId, paymentId, sessionId, result, errorText, tranId, auth, ref, errorNo, PaymentStatus.FAILED, null);
|
232 |
paymentClient.updatePaymentDetails(merchantPaymentId, paymentId, sessionId, result, errorText, tranId, auth, ref, errorNo, PaymentStatus.FAILED, postdate, null);
|
| 233 |
} catch (PaymentException e1) {
|
233 |
} catch (PaymentException e1) {
|
| 234 |
log.error("Unable to update payment details in our database." + e1.getError_code() + e1.getMessage());
|
234 |
log.error("Unable to update payment details in our database." + e1.getError_code() + e1.getMessage());
|
| 235 |
e1.printStackTrace();
|
235 |
e1.printStackTrace();
|
| 236 |
} catch (TException e1) {
|
236 |
} catch (TException e1) {
|
| 237 |
log.error("Unable to update payment details in our database. Thrift exception.");
|
237 |
log.error("Unable to update payment details in our database. Thrift exception.");
|