Subversion Repositories SmartDukaan

Rev

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

Rev 6390 Rev 6432
Line 170... Line 170...
170
		return "000000";
170
		return "000000";
171
	}
171
	}
172
		
172
		
173
	public String getSecureHash() throws NoSuchAlgorithmException{
173
	public String getSecureHash() throws NoSuchAlgorithmException{
174
//		MD5(orderId "|" merchantId "|" subMerchantId "|" amt "|" cur "|" proSku "|" Cname "|" mobile "|" emailId "|" redirUrl "|" 123^~abc%) (Salt Value Decide by Merchant and uniPAY-Net))
174
//		MD5(orderId "|" merchantId "|" subMerchantId "|" amt "|" cur "|" proSku "|" Cname "|" mobile "|" emailId "|" redirUrl "|" 123^~abc%) (Salt Value Decide by Merchant and uniPAY-Net))
175
		String pass = id + "|" + accountId + "|" +  "3001"  + "|" + amount  +  "INR" + "INR" + "|" + getDescription() + "|" +  billingDetails.getName() + "|" + billingDetails.getPhone() + "|" + billingDetails.getEmail() + "|" + returnUrl + "|" + salt;
175
		String pass = id + "|" + accountId + "|" +  "3001"  + "|" + amount  + "|" +  "INR" + "|" + getDescription() + "|" +  billingDetails.getName() + "|" + billingDetails.getPhone() + "|" + billingDetails.getEmail() + "|" + returnUrl + "|" + salt;
176
		System.out.println(pass);
176
		System.out.println(pass);
177
		MessageDigest md = MessageDigest.getInstance("MD5");
177
		MessageDigest md = MessageDigest.getInstance("MD5");
178
		md.update(pass.getBytes(), 0, pass.getBytes().length);
178
		md.update(pass.getBytes(), 0, pass.getBytes().length);
179
		byte[] mdbytes = md.digest();
179
		byte[] mdbytes = md.digest();
180
		//	convert the byte to hex format method
180
		//	convert the byte to hex format method
Line 188... Line 188...
188
	public ContactDetails getBillingDetails() {
188
	public ContactDetails getBillingDetails() {
189
		return billingDetails;
189
		return billingDetails;
190
	}
190
	}
191
	
191
	
192
	public static void main(String[] args) throws NoSuchAlgorithmException {
192
	public static void main(String[] args) throws NoSuchAlgorithmException {
193
		String pass = "410|1234567800|uniPAY|5985|INR|||||RedirectUrl|123^~abc%)";
193
		//String pass = "410|1234567800|uniPAY|5985|INR|||||RedirectUrl|123^~abc%)";
-
 
194
		//String pass = "113724|544433321212272|3001|3586|INR|Micromax Smarty A25 Black|Rajveer|1111111111|rajveer.singh@shop2020.in|http://www.shop2020.in/innoviti-pay-response|123^~uni%";
-
 
195
		String pass = "113734|544433321212272|3001|3586|INR|Micromax Smarty A25 Black|Rajveer|1111111111|rajveer.singh@shop2020.in|http://www.shop2020.in/innoviti-pay-response|123^~uni%";
-
 
196
		//5fc923e520bce47ff14b3aa1a5245287
-
 
197
          //5fc923e520bce47ff14b3aa1a5245287
-
 
198
		//15d4dbc305d0b56ce1973726bdee526d
-
 
199
		//db4d6309123fd1543882eba3123f52b4
-
 
200
		//93d97a5f16fb132c8728ee799e81915e
-
 
201
		//bf29c85dcd387c1160fe64a2af8b0463
-
 
202
 
-
 
203
		
194
		System.out.println(pass);
204
		System.out.println(pass);
195
		MessageDigest md = MessageDigest.getInstance("MD5");
205
		MessageDigest md = MessageDigest.getInstance("MD5");
196
		md.update(pass.getBytes(), 0, pass.getBytes().length);
206
		md.update(pass.getBytes(), 0, pass.getBytes().length);
197
		byte[] mdbytes = md.digest();
207
		byte[] mdbytes = md.digest();
198
		//	convert the byte to hex format method
208
		//	convert the byte to hex format method