|
|
@ -4,6 +4,7 @@ import au.com.royalpay.payment.channels.alipay.config.AlipayEnvironment;
|
|
|
|
import au.com.royalpay.payment.channels.alipay.runtime.AlipayClient;
|
|
|
|
import au.com.royalpay.payment.channels.alipay.runtime.AlipayClient;
|
|
|
|
import au.com.royalpay.payment.channels.bestpay.runtime.BestPayClient;
|
|
|
|
import au.com.royalpay.payment.channels.bestpay.runtime.BestPayClient;
|
|
|
|
import au.com.royalpay.payment.channels.jd.runtime.JDClient;
|
|
|
|
import au.com.royalpay.payment.channels.jd.runtime.JDClient;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.channels.rpay.runtime.RpayClient;
|
|
|
|
import au.com.royalpay.payment.channels.wechat.runtime.WxPayClient;
|
|
|
|
import au.com.royalpay.payment.channels.wechat.runtime.WxPayClient;
|
|
|
|
import au.com.royalpay.payment.core.PaymentApi;
|
|
|
|
import au.com.royalpay.payment.core.PaymentApi;
|
|
|
|
import au.com.royalpay.payment.core.exceptions.InvalidShortIdException;
|
|
|
|
import au.com.royalpay.payment.core.exceptions.InvalidShortIdException;
|
|
|
@ -96,6 +97,8 @@ public class TestController implements ApplicationEventPublisherAware {
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private JDClient jdClient;
|
|
|
|
private JDClient jdClient;
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private RpayClient rpayClient;
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
private TradeLogService tradeLogService;
|
|
|
|
private TradeLogService tradeLogService;
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private RetailAppService retailAppService;
|
|
|
|
private RetailAppService retailAppService;
|
|
|
@ -292,6 +295,11 @@ public class TestController implements ApplicationEventPublisherAware {
|
|
|
|
xmlStr = XmlFormatUtils.formatXml(elem);
|
|
|
|
xmlStr = XmlFormatUtils.formatXml(elem);
|
|
|
|
res.put("xml", xmlStr);
|
|
|
|
res.put("xml", xmlStr);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case "Rpay":
|
|
|
|
|
|
|
|
JSONObject orderInfo = rpayClient.queryOrderStatus(orderId);
|
|
|
|
|
|
|
|
String rpayjson = JSON.toJSONString(orderInfo, SerializerFeature.PrettyFormat);
|
|
|
|
|
|
|
|
res.put("xml", rpayjson);
|
|
|
|
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
default:
|
|
|
|
throw new BadRequestException("Not Support channel:" + channel);
|
|
|
|
throw new BadRequestException("Not Support channel:" + channel);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -403,4 +411,9 @@ public class TestController implements ApplicationEventPublisherAware {
|
|
|
|
public String hfClearAmount() {
|
|
|
|
public String hfClearAmount() {
|
|
|
|
return hfUpdateService.updateStatus();
|
|
|
|
return hfUpdateService.updateStatus();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ManagerMapping(value = "/rpayUpdate", method = RequestMethod.PUT, role = ManagerRole.DEVELOPER)
|
|
|
|
|
|
|
|
public String rpayUpdateClearing() {
|
|
|
|
|
|
|
|
return hfUpdateService.rpayUpdate();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|