Subversion Repositories SmartDukaan

Rev

Rev 7293 | Rev 7953 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7293 Rev 7862
Line 219... Line 219...
219
        } catch (Exception e) {
219
        } catch (Exception e) {
220
            log.error("Unable to update status of transaction. Thrift Exception: ", e);
220
            log.error("Unable to update status of transaction. Thrift Exception: ", e);
221
        }
221
        }
222
	}
222
	}
223
	
223
	
-
 
224
	public static void processCouponTxn(long txnId){
-
 
225
        try {            
-
 
226
            TransactionClient transactionServiceClient = new TransactionClient();
-
 
227
            in.shop2020.model.v1.order.TransactionService.Client transactionClient = transactionServiceClient.getClient();
-
 
228
            transactionClient.changeTransactionStatus(txnId, TransactionStatus.AUTHORIZED, "Payment by coupon successful", PickUpType.COURIER.getValue(), OrderType.B2C, OrderSource.WEBSITE);
-
 
229
            Transaction transaction = transactionClient.getTransaction(txnId);
-
 
230
            UserClient userServiceClient = new UserClient();
-
 
231
            trackCouponUsage(transaction);
-
 
232
            resetCart(transaction, userServiceClient);
-
 
233
        } catch (TException e1) {
-
 
234
            log.error("Unable to update status of transaction. Thrift Exception:", e1);
-
 
235
        } catch (TransactionServiceException e) {
-
 
236
            log.error("Unable to update status of transaction. Thrift Exception: ", e);
-
 
237
        } catch (Exception e) {
-
 
238
            log.error("Unable to update status of transaction. Thrift Exception: ", e);
-
 
239
        }
-
 
240
    }
-
 
241
	
224
	/**
242
	/**
225
	 * Calculates the amount for the payment required for the given transaction.
243
	 * Calculates the amount for the payment required for the given transaction.
226
	 * 
244
	 * 
227
	 * @param txnId
245
	 * @param txnId
228
	 *            Id of the transaction for which this payment amount has to be
246
	 *            Id of the transaction for which this payment amount has to be