| Line 91... |
Line 91... |
| 91 |
try {
|
91 |
try {
|
| 92 |
if(isGv){
|
92 |
if(isGv){
|
| 93 |
paymentId = pclient.createPayment(userId, gvAmount, gvGatewayId, txnId, false);
|
93 |
paymentId = pclient.createPayment(userId, gvAmount, gvGatewayId, txnId, false);
|
| 94 |
pclient.updatePaymentDetails(paymentId, "", "", "SUCCESS", "Payment Received", "", "", "", "", PaymentStatus.SUCCESS, "", null);
|
94 |
pclient.updatePaymentDetails(paymentId, "", "", "SUCCESS", "Payment Received", "", "", "", "", PaymentStatus.SUCCESS, "", null);
|
| 95 |
}
|
95 |
}
|
| - |
|
96 |
|
| - |
|
97 |
if(amount > 0) {
|
| 96 |
paymentId = paymentServiceClient.getClient().createPayment(userId, amount, gatewayId, txnId, false);
|
98 |
paymentId = paymentServiceClient.getClient().createPayment(userId, amount, gatewayId, txnId, false);
|
| 97 |
// This is being done to ensure that the amount which we pass on to
|
99 |
// This is being done to ensure that the amount which we pass on to
|
| 98 |
// the PGs is same as what we have in the database.
|
100 |
// the PGs is same as what we have in the database.
|
| 99 |
Payment payment = paymentServiceClient.getClient().getPayment(paymentId);
|
101 |
Payment payment = paymentServiceClient.getClient().getPayment(paymentId);
|
| 100 |
amount = payment.getAmount();
|
102 |
amount = payment.getAmount();
|
| - |
|
103 |
}
|
| 101 |
} catch (PaymentException e1) {
|
104 |
} catch (PaymentException e1) {
|
| 102 |
log.error("Unable to create payment object.", e1);
|
105 |
log.error("Unable to create payment object.", e1);
|
| 103 |
return PAYMENT_NOT_CREATED;
|
106 |
return PAYMENT_NOT_CREATED;
|
| 104 |
} catch (TException e) {
|
107 |
} catch (TException e) {
|
| 105 |
log.error("Not able to create payment object.", e);
|
108 |
log.error("Not able to create payment object.", e);
|