| Line 137... |
Line 137... |
| 137 |
if (result != null && result.trim().equals(PaymentReturnStatus.APPROVED.value())) {
|
137 |
if (result != null && result.trim().equals(PaymentReturnStatus.APPROVED.value())) {
|
| 138 |
log.info("Payment " + merchantPaymentId + " authorized successfully. Updating the database.");
|
138 |
log.info("Payment " + merchantPaymentId + " authorized successfully. Updating the database.");
|
| 139 |
String description = "Payment authorized";
|
139 |
String description = "Payment authorized";
|
| 140 |
updatePaymentDetails(merchantPaymentId, description, PaymentStatus.AUTHORIZED, request, paymentClient);
|
140 |
updatePaymentDetails(merchantPaymentId, description, PaymentStatus.AUTHORIZED, request, paymentClient);
|
| 141 |
|
141 |
|
| 142 |
CommonPaymentService.processSuccessfulTxn(txnId, userServiceClient, transactionServiceClient);
|
142 |
CommonPaymentService.processSuccessfulTxn(txnId, userServiceClient, transactionServiceClient, false);
|
| 143 |
|
143 |
|
| 144 |
this.redirectUrl = successUrl + "?paymentId=" + merchantPaymentId;
|
144 |
this.redirectUrl = successUrl + "?paymentId=" + merchantPaymentId;
|
| 145 |
} else {
|
145 |
} else {
|
| 146 |
updatePaymentDetails(merchantPaymentId, errorText, PaymentStatus.FAILED, request, paymentClient);
|
146 |
updatePaymentDetails(merchantPaymentId, errorText, PaymentStatus.FAILED, request, paymentClient);
|
| 147 |
|
147 |
|