public String[] saveOrder(float totalprice, String customerId,
			String paymentType, String cardNo, String expiryDate,String expectedDate)
			throws ConnectException, SQLException {
		Connection con = ConnectionService.getConnection();
		String receiptId = null;
		String updateQuery = "INSERT INTO PURCHASE VALUES(receiptid.nextval,?,?,?,?,?,?)";
		String generatedColumns[] = { "RECEIPTID" };
		PreparedStatement query_update = con.prepareStatement(updateQuery,
				generatedColumns);
		Calendar cal = new GregorianCalendar();
		query_update.setDate(1, new Date(cal.getTimeInMillis()));
		query_update.setString(2, customerId);
		query_update.setString(3, cardNo);
		cal.add(Calendar.MONTH, 5);
		cal = getExpectedDate();
		expectedDate=cal.getTime().toString();
		java.sql.Date sqlStartDate = null;
		if (expiryDate != null) {
			SimpleDateFormat sdf1 = new SimpleDateFormat("dd/MM/yyyy");
			java.util.Date date;

			try {
				date = sdf1.parse(expiryDate);
				sqlStartDate = new Date(date.getTime());
			} catch (ParseException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
		query_update.setDate(4, sqlStartDate);
		query_update.setDate(5, new Date(cal.getTimeInMillis()));
		query_update.setNull(6, java.sql.Types.NULL);
		query_update.executeQuery();
		ResultSet rs = query_update.getGeneratedKeys();
		if (rs != null) {
			rs.next();
			receiptId = Integer.toString((rs.getInt(1)));
		}
		con.commit();
		return new String[]{receiptId,expectedDate};
	}