Subversion Repositories SmartDukaan

Rev

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

Rev 8965 Rev 8966
Line 703... Line 703...
703
		}
703
		}
704
		if (br != null)br.close();
704
		if (br != null)br.close();
705
		if (fw != null)fw.close();
705
		if (fw != null)fw.close();
706
	}		
706
	}		
707
 
707
 
708
	public static void createPayment(User user, String subOrderId, double amount) throws NumberFormatException, PaymentException, TException {
708
	public static void createPayment(User user, String subOrderId, double amount) throws PaymentException, TException {
709
		in.shop2020.payments.PaymentService.Client client = new PaymentClient().getClient();
709
		in.shop2020.payments.PaymentService.Client client = new PaymentClient().getClient();
-
 
710
		logger.info("Create payment for user id " + user.getUserId() + " Gateway id " + FLIPKART_GATEWAY_ID);
-
 
711
		logger.info("Long value of transaction id : " + Long.valueOf(transactionId));
710
		long paymentId = client.createPayment(user.getUserId(), amount, FLIPKART_GATEWAY_ID, Long.valueOf(transactionId), false);
712
		long paymentId = client.createPayment(user.getUserId(), amount, FLIPKART_GATEWAY_ID, Long.valueOf(transactionId), false);
-
 
713
		logger.info("transaction id : " + Long.valueOf(transactionId) + " Payment id : " + paymentId);
711
		client.updatePaymentDetails(paymentId, null, null, null, null, null, null, subOrderId, null, PaymentStatus.AUTHORIZED, null, null);
714
		client.updatePaymentDetails(paymentId, null, null, null, null, null, null, subOrderId, null, PaymentStatus.AUTHORIZED, null, null);
712
	}   
715
	}   
713
 
716
 
714
 
717
 
715
}
718
}