Commit a6fba59b by ping.wu

签名密钥取值修改与签名联调

parent e69c769c
......@@ -1311,9 +1311,10 @@ public class PayServiceImpl {
plugInParameter.setSignMchid(signMchid);
plugInParameter.setStoreId(thirdStoreId);
String message = "apply_mchid="+applyMchid+"&sign_mchid="+signMchid+"&store_id="+thirdStoreId;
String encryptKey = assortmentOpenPlatformPartnerPaymentAuth.getEncryptKey();
String message = "apply_mchid="+applyMchid+"&sign_mchid="+signMchid+"&store_id="+thirdStoreId + "&key="+encryptKey;
String sign = HMacSHA256.encrypt(message,assortmentOpenPlatformPartnerPaymentAuth.getPrivate_key());
String sign = HMacSHA256.encrypt(message,encryptKey);
plugInParameter.setSign(sign);
return plugInParameter;
......
......@@ -42,7 +42,14 @@ public class HMacSHA256 {
hs.append('0');
hs.append(stmp);
}
return hs.toString().toLowerCase();
return hs.toString().toUpperCase();
}
public static void main(String[] args) {
String mess= "apply_mchid=256151646&sign_mchid=301386006&store_id=21531295&key=4E07E532BCC2302B9E0ACEEC140B204F";
String sss = encrypt(mess,"4E07E532BCC2302B9E0ACEEC140B204F");
System.out.println();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment