From 9e09fbcbd57a2b2258ba3a783231f1c86ca699ba Mon Sep 17 00:00:00 2001 From: xuhy <3313886187@qq.com> Date: 星期二, 12 十二月 2023 15:40:41 +0800 Subject: [PATCH] BUG修改 --- UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/Tingg/TinggPayoutUtil.java | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/Tingg/TinggPayoutUtil.java b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/Tingg/TinggPayoutUtil.java index 5a72d56..f5c684d 100644 --- a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/Tingg/TinggPayoutUtil.java +++ b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/Tingg/TinggPayoutUtil.java @@ -37,12 +37,13 @@ * @param narration 备注 * @return */ - public PayoutResponse sendPayout(String phone, String payerTransactionID, Double amount, String callbackUrl, String narration) { + public PayoutResponse sendPayout(String serviceCode, String phone, String payerTransactionID, Double amount, String callbackUrl, String narration) { + System.err.println("进入支付转账业务"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Credentials credentials = new Credentials("igo_api_user", "mXo%kJM.p;_i)SSZ&^b?6XSH)D+OCPh8"); List<Packet> packets = new ArrayList<>(); Packet packet = new Packet(); - packet.setServiceCode("GH-TIGO-B2C");//手机网络运营商 GH-MTN-B2C、GH-TIGO-B2C、GH-VODAFONE-B2C、GH-AIRTEL-B2C + packet.setServiceCode(serviceCode);//手机网络运营商 GH-MTN-B2C、GH-TIGO-B2C、GH-VODAFONE-B2C、GH-AIRTEL-B2C packet.setMSISDN(phone); packet.setAccountNumber(phone); packet.setPayerTransactionID(payerTransactionID); @@ -56,7 +57,7 @@ Payout payout = new Payout("GH", "BEEP.postPayment", payload); String string = JSON.toJSONString(payout); string = string.replace("mSISDN", "MSISDN"); - System.err.println(string); + System.err.println("支付参数" + string); HttpHeaders headers = new HttpHeaders(); MediaType type = MediaType.parseMediaType("text/plain"); headers.setContentType(type); @@ -66,7 +67,7 @@ String url = "https://apps.cellulant.co.ke:9801/globalApi/v2/JSON/"; String s = restTemplate.postForObject(url, formEntity, String.class); PayoutResponse payoutResponse = JSON.parseObject(s, PayoutResponse.class); - System.err.println(s); + System.err.println("支付结果返回" + s); return payoutResponse; } -- Gitblit v1.7.1