最近遇到一下支付宝相关的问题:
缺少应用公钥证书序列号
应用公钥证书不存在
第一个问题是怎么发生的:
代码如下:
AlipayClient alipayClient = new DefaultAlipayClient(“https://openapi.alipay.com/gateway.do”, APP_ID, APP_PRIVATE_KEY, “json”, CHARSET, ALIPAY_PUBLIC_KEY, “RSA2”); //实例化具体API对应的request类,类名称和接口名称对应,当前调用接口名称:alipay.trade.precreate AlipayTradePrecreateRequest request = new AlipayTradePrecreateRequest(); request.setBizContent("{“out_trade_no”:“2018092031012228432”," + ““total_amount”:“0.01”,” + ““subject”:“subject”}”); request.setNotifyUrl(“商户外网可以访问的异步地址”); AlipayTradePrecreateResponse response = alipayClient.execute(request); 原创地址:https://cyimt.net/Article/Details/1098
|