| | |
| | | if(2 == state){ |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSS"); |
| | | String payerTransactionID = sdf.format(new Date()) + tPubWithdrawal.getId(); |
| | | PayoutResponse payoutResponse = tinggPayoutUtil.sendPayout(serviceCode, phone, payerTransactionID, tPubWithdrawal.getMoney().doubleValue(), callbackPath + "/base/withdrawalCallback", remark); |
| | | AuthStatus authStatus = payoutResponse.getAuthStatus(); |
| | | Results results = payoutResponse.getResults().get(0); |
| | | String statusCode = results.getStatusCode(); |
| | | if(!"131".equals(authStatus.getAuthStatusCode())){ |
| | | return ResultUtil.error(authStatus.getAuthStatusDescription()); |
| | | } |
| | | if(!"139".equals(statusCode)){ |
| | | return ResultUtil.error(results.getStatusDescription()); |
| | | } |
| | | tPubWithdrawal.setSerialNo(results.getBeepTransactionID()); |
| | | // PayoutResponse payoutResponse = tinggPayoutUtil.sendPayout(serviceCode, phone, payerTransactionID, tPubWithdrawal.getMoney().doubleValue(), callbackPath + "/base/withdrawalCallback", remark); |
| | | // AuthStatus authStatus = payoutResponse.getAuthStatus(); |
| | | // Results results = payoutResponse.getResults().get(0); |
| | | // String statusCode = results.getStatusCode(); |
| | | // if(!"131".equals(authStatus.getAuthStatusCode())){ |
| | | // return ResultUtil.error(authStatus.getAuthStatusDescription()); |
| | | // } |
| | | // if(!"139".equals(statusCode)){ |
| | | // return ResultUtil.error(results.getStatusDescription()); |
| | | // } |
| | | // tPubWithdrawal.setSerialNo(results.getBeepTransactionID()); |
| | | tPubWithdrawal.setState(4); |
| | | }else{//回退金额 |
| | | tPubWithdrawal.setHandleTime(new Date()); |