generated from root/miduo_server
ohayoo,支付
parent
f6e7c17710
commit
cbc8fb356e
|
@ -42,7 +42,7 @@ public class OhayooGetExternalController {
|
|||
}
|
||||
String externalOrder = builder.substring(0, builder.length() - 1);
|
||||
|
||||
String payKey = OhayooRechargeController.payKey;
|
||||
String payKey = OhayooRechargeController.publicKey;
|
||||
String sign = MD5Util.encrypByMd5(payKey + externalOrder + payKey);
|
||||
treeMap.put("sign",sign);
|
||||
|
||||
|
|
|
@ -23,19 +23,17 @@ public class OhayooRechargeController {
|
|||
@Resource
|
||||
private PayLogic payLogic;
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(OhayooRechargeController.class);
|
||||
private static final String callbackkey = "53780900079388195716762718742907";
|
||||
|
||||
public static final String payKey = "2e92cbb7faa7e37e0c5a38723b1d2acd";
|
||||
public static final String publicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDmJHw+qP7vzf+QyL2/AC+dItwDMcoClG5csqiUgL6vl4801HogkBGHI9eQZuFqwJKJENoIkPA5apuitGJIor4CaomqiuWHMY+oIywPP+hXelcxzVDf8nx8XWe2f8WVbHlfI9EL40cvcijl5xv2xXGfxqFwvWzbC+64nszfD1HiewIDAQAB";
|
||||
|
||||
@RequestMapping(value = "/OhayooCallback")
|
||||
public String OhayooCallback(HttpServletRequest request) throws Exception {
|
||||
return process(request,callbackkey);
|
||||
return process(request,"53780900079388195716762718742907");
|
||||
}
|
||||
|
||||
private String process(HttpServletRequest request,String appsecret) throws Exception{
|
||||
HashMap<String, String> parameterMap = JsonUtil.getInstence().getParameterMap2(request);
|
||||
if (parameterMap.isEmpty()) {
|
||||
LOGGER.error("疯体ios,GameCallback data is null");
|
||||
LOGGER.error("Ohayoo, GameCallback data is null");
|
||||
return "FAIL";
|
||||
}
|
||||
LOGGER.info("疯体ios支付回调参数========================》{}", parameterMap);
|
||||
|
@ -47,7 +45,7 @@ public class OhayooRechargeController {
|
|||
|
||||
// 3、验签
|
||||
if (!verifySign(treeMap,sign)){
|
||||
LOGGER.error("疯体ios,GameCallback data is null");
|
||||
LOGGER.error("Ohayoo, sign verify error");
|
||||
return "SIGN_VERIFY_FAIL";
|
||||
}
|
||||
|
||||
|
@ -77,9 +75,9 @@ public class OhayooRechargeController {
|
|||
String substring = builder.substring(0, builder.length() - 1);
|
||||
try {
|
||||
// 2、生成签名
|
||||
return verify(payKey,substring,sign);
|
||||
return verify(publicKey,substring,sign);
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("疯体ios待签名字符串================>publicKey:{},signedData:{},signature:{}", payKey,substring,sign);
|
||||
LOGGER.error("疯体ios待签名字符串================>publicKey:{},signedData:{},signature:{}", publicKey,substring,sign);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue