支付宝手机支付完结
This commit is contained in:
@@ -117,7 +117,7 @@ public class AlipayServiceImpl implements AlipayService {
|
|||||||
mercOrder.setReceiver(mercOrder.getReceiver());
|
mercOrder.setReceiver(mercOrder.getReceiver());
|
||||||
AlipayClient alipayClient = new DefaultAlipayClient("https://openapi.alipay.com/gateway.do", ParametersUtil.ZY_ALI_APP_ID,
|
AlipayClient alipayClient = new DefaultAlipayClient("https://openapi.alipay.com/gateway.do", ParametersUtil.ZY_ALI_APP_ID,
|
||||||
ParametersUtil.ZY_PRI, "json", "UTF-8", ParametersUtil.ZY_PUB, "RSA2");
|
ParametersUtil.ZY_PRI, "json", "UTF-8", ParametersUtil.ZY_PUB, "RSA2");
|
||||||
AlipayTradeWapPayRequest request = new AlipayTradeWapPayRequest();
|
AlipayTradeAppPayRequest request = new AlipayTradeAppPayRequest();
|
||||||
request.setNotifyUrl(ParametersUtil.domain+"/wap/merchant/aliCallBack");
|
request.setNotifyUrl(ParametersUtil.domain+"/wap/merchant/aliCallBack");
|
||||||
request.setReturnUrl("");
|
request.setReturnUrl("");
|
||||||
JSONObject bizContent = new JSONObject();
|
JSONObject bizContent = new JSONObject();
|
||||||
@@ -129,13 +129,12 @@ public class AlipayServiceImpl implements AlipayService {
|
|||||||
|
|
||||||
bizContent.put("product_code", "QUICK_MSECURITY_PAY");
|
bizContent.put("product_code", "QUICK_MSECURITY_PAY");
|
||||||
request.setBizContent(bizContent.toString());
|
request.setBizContent(bizContent.toString());
|
||||||
AlipayTradeWapPayResponse response = null;
|
AlipayTradeAppPayResponse response = null;
|
||||||
try {
|
try {
|
||||||
response = response = alipayClient.sdkExecute(request);
|
response = response = alipayClient.sdkExecute(request);
|
||||||
} catch (AlipayApiException e) {
|
} catch (AlipayApiException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (response.isSuccess()) {
|
if (response.isSuccess()) {
|
||||||
System.out.println("success");
|
System.out.println("success");
|
||||||
String body = response.getBody();
|
String body = response.getBody();
|
||||||
|
|||||||
Reference in New Issue
Block a user