| Line 161... |
Line 161... |
| 161 |
}
|
161 |
}
|
| 162 |
|
162 |
|
| 163 |
|
163 |
|
| 164 |
public String getSecureHash(){
|
164 |
public String getSecureHash(){
|
| 165 |
try{
|
165 |
try{
|
| 166 |
String pass = salt + "|||||||||||" + paymentParams.get("email") + "|" + paymentParams.get("firstname") + "|" + paymentParams.get("productinfo") + "|" + paymentParams.get("amount") + "|" + paymentParams.get("txnid") + "|" + accountKey;
|
166 |
String pass = salt + "|" + paymentParams.get("status") + "|||||||||||" + paymentParams.get("email") + "|" + paymentParams.get("firstname") + "|" + paymentParams.get("productinfo") + "|" + paymentParams.get("amount") + "|" + paymentParams.get("txnid") + "|" + accountKey;
|
| 167 |
System.out.println(pass);
|
167 |
System.out.println(pass);
|
| 168 |
MessageDigest md = MessageDigest.getInstance("SHA-512");
|
168 |
MessageDigest md = MessageDigest.getInstance("SHA-512");
|
| 169 |
md.update(pass.getBytes(), 0, pass.getBytes().length);
|
169 |
md.update(pass.getBytes(), 0, pass.getBytes().length);
|
| 170 |
byte[] mdbytes = md.digest();
|
170 |
byte[] mdbytes = md.digest();
|
| 171 |
// convert the byte to hex format method
|
171 |
// convert the byte to hex format method
|