use of com.github.binarywang.wxpay.bean.result.WxPayMicropayResult in project leopard by tanhaichao.
the class WeixinPayClientImpl method micropayForStatus.
@Override
public WeixinMicropayStatus micropayForStatus(String outTradeNo, String scene, String authCode, String subject, double amount, String spbillCreateIp) throws WeixinPayException {
try {
WxPayMicropayResult result = this.micropay(outTradeNo, scene, authCode, subject, amount, spbillCreateIp);
Json.print(result, "result");
return WeixinMicropayStatus.SUCCESS;
} catch (WeixinPayException e) {
logger.error(e.getMessage(), e);
String errCode = e.getErrCode().toLowerCase();
try {
WeixinMicropayStatus status = EnumUtil.toEnum(errCode, WeixinMicropayStatus.class);
return status;
} catch (EnumConstantInvalidException e2) {
logger.error("resultCode:" + e.getResultCode() + " errCode:" + e.getErrCode() + " errMsg:" + e.getErrCodeDes());
throw e;
}
}
}
Aggregations