public static JSONObject aliplayweb(JSONObject params, ActionContext context) throws Exception, ServletException, IOException{
//支付宝网页支付
BeeCloud.registerApp(appId, testSecret, appSecret, masterSecret); //LIVE模式中的testSecret可为null
//BeeCloud.setSandbox(true); //测试模式appSecret、masterSecret可为null 设置sandbox属性为true,开启测试模式
//String order = params.getString("order");
String menory = params.getString("menory");
String title="支付宝测试";
String billNo=params.getString("order");
String aliReturnUrl="http://otaxoa.gicp.net/shop/index.html";
BCOrder bcOrder = new BCOrder(PAY_CHANNEL.ALI_WEB, 1, billNo, title);
bcOrder.setBillTimeout(360);
bcOrder.setReturnUrl(aliReturnUrl);
try {
bcOrder = BCPay.startBCPay(bcOrder);
System.out.println(bcOrder.getObjectId());
Thread.sleep(3000);
System.out.println(bcOrder.getHtml());
} catch (BCException e) {
//log.error(e.getMessage(), e);
System.out.println(e.getMessage());
}
JSONObject map = new JSONObject();
//map.put("x",x);
return map;
}
System.out.println(bcOrder.getHtml()); 在控制台中输出以下内容要在网页中打打开
2017-03-15 16:08:37 执行Action[shop/beecloud/aliplayweb]开始...... 72dea690-6f27-42e1-a259-7bcae0267bfe
<form id="alipaysubmit" name="alipaysubmit" action="https://mapi.alipay.com/gateway.do?_input_charset=utf-8" method="get"><input type="hidden" name="seller_email" value="luoyuankai@126.com"/><input type="hidden" name="subject" value="支付宝测试"/><input type="hidden" name="_input_charset" value="utf-8"/><input type="hidden" name="sign".........................................value="MD5"/><input type="submit" value="确认" style="display:none;"></form><script>document.forms['alipaysubmit'].submit();</script>
2017-03-15 16:08:40 执行Action[shop/beecloud/aliplayweb],返回:{} 这个怎么处理?没有打开网页
|