13个文件已修改
7个文件已删除
13个文件已添加
| | |
| | | <optional>true</optional> |
| | | </dependency> |
| | | |
| | | <!--<dependency>--> |
| | | <!--<groupId>org.springframework.boot</groupId>--> |
| | | <!--<artifactId>spring-boot-starter-tomcat</artifactId>--> |
| | | <!--<scope>provided</scope>--> |
| | | <!--</dependency>--> |
| | | <!--<dependency>--> |
| | | <!--<groupId>javax.servlet</groupId>--> |
| | | <!--<artifactId>javax.servlet-api</artifactId>--> |
| | | <!--<version>3.1.0</version>--> |
| | | <!--<scope>provided</scope>--> |
| | | <!--</dependency>--> |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-tomcat</artifactId> |
| | | <scope>provided</scope> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>javax.servlet</groupId> |
| | | <artifactId>javax.servlet-api</artifactId> |
| | | <version>3.1.0</version> |
| | | <scope>provided</scope> |
| | | </dependency> |
| | | |
| | | <!--shiro依赖--> |
| | | <dependency> |
| | |
| | | <version>4.4.3</version> |
| | | </dependency> |
| | | |
| | | <!--引入本地工行支付jar start--> |
| | | <!-- <dependency> |
| | | <groupId>com.icbc</groupId> |
| | | <artifactId>icbc</artifactId> |
| | | <version>v2</version> |
| | | <scope>system</scope> |
| | | <systemPath>${project.basedir}/lib/icbc-api-sdk-cop.jar</systemPath> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.icbc.api</groupId> |
| | | <artifactId>icbc</artifactId> |
| | | <version>v2</version> |
| | | <scope>system</scope> |
| | | <systemPath>${project.basedir}/lib/icbc-api-sdk-cop-io.jar</systemPath> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>cn.com.infosec</groupId> |
| | | <artifactId>icbc</artifactId> |
| | | <version>v2</version> |
| | | <scope>system</scope> |
| | | <systemPath>${project.basedir}/lib/icbc-ca.jar</systemPath> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>cn.com.infosecCrypto</groupId> |
| | | <artifactId>icbc</artifactId> |
| | | <version>v2</version> |
| | | <scope>system</scope> |
| | | <systemPath>${project.basedir}/lib/InfosecCrypto_Java1_02_JDK14+.jar</systemPath> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>proguard</groupId> |
| | | <artifactId>icbc</artifactId> |
| | | <version>v2</version> |
| | | <scope>system</scope> |
| | | <systemPath>${project.basedir}/lib/proguard.jar</systemPath> |
| | | </dependency>--> |
| | | <!--引入本地工行支付jar end--> |
| | | |
| | | <dependency> |
| | | <groupId>commons-codec</groupId> |
| | | <artifactId>commons-codec</artifactId> |
| | |
| | | <build> |
| | | |
| | | <!--打包jar包方式--> |
| | | <plugins> |
| | | <plugin> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-maven-plugin</artifactId> |
| | | <configuration> |
| | | <fork>true</fork><!-- 如果没有该项配置,肯呢个devtools不会起作用,即应用不会restart --> |
| | | </configuration> |
| | | </plugin> |
| | | </plugins> |
| | | |
| | | <!--打包war包引入本地jar的打包方式--> |
| | | <!--<plugins>--> |
| | | <!--<plugin>--> |
| | | <!--<groupId>org.apache.maven.plugins</groupId>--> |
| | | <!--<artifactId>maven-war-plugin</artifactId>--> |
| | | <!--<groupId>org.springframework.boot</groupId>--> |
| | | <!--<artifactId>spring-boot-maven-plugin</artifactId>--> |
| | | <!--<configuration>--> |
| | | <!--<!– 设置成false,否则检查web.xml是否存在。因为springboot是没有web.xml的 –>--> |
| | | <!--<failOnMissingWebXml>false</failOnMissingWebXml>--> |
| | | <!--<!–打包后的项目名–>--> |
| | | <!--<!–<warName>example</warName>–>--> |
| | | <!--<fork>true</fork><!– 如果没有该项配置,肯呢个devtools不会起作用,即应用不会restart –>--> |
| | | <!--</configuration>--> |
| | | <!--</plugin>--> |
| | | <!--</plugins>--> |
| | | |
| | | <!--打包war包引入本地jar的打包方式--> |
| | | <plugins> |
| | | <plugin> |
| | | <groupId>org.apache.maven.plugins</groupId> |
| | | <artifactId>maven-war-plugin</artifactId> |
| | | <configuration> |
| | | <!-- 设置成false,否则检查web.xml是否存在。因为springboot是没有web.xml的 --> |
| | | <failOnMissingWebXml>false</failOnMissingWebXml> |
| | | <!--打包后的项目名--> |
| | | <!--<warName>example</warName>--> |
| | | <!--<webResources>--> |
| | | <!--<resource>--> |
| | | <!--<!–把本地lib里面的jar复制到lib–>--> |
| | | <!--把本地lib里面的jar复制到lib--> |
| | | <!--<directory>${project.basedir}/lib</directory>--> |
| | | <!--<targetPath>WEB-INF/lib/</targetPath>--> |
| | | <!--<includes>--> |
| | |
| | | <!--</includes>--> |
| | | <!--</resource>--> |
| | | <!--</webResources>--> |
| | | <!--</configuration>--> |
| | | <!--</plugin>--> |
| | | <!--</plugins>--> |
| | | </configuration> |
| | | </plugin> |
| | | </plugins> |
| | | |
| | | |
| | | <resources> |
| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.smallLogistics.server.IOrderLogisticsService; |
| | | import com.stylefeng.guns.modular.specialTrain.server.IOrderPrivateCarService; |
| | | import com.stylefeng.guns.modular.system.model.OrderPosition; |
| | | import com.stylefeng.guns.modular.system.model.Reassign; |
| | | import com.stylefeng.guns.modular.system.service.IDriverService; |
| | | import com.stylefeng.guns.modular.system.service.IOrderService; |
| | | import com.stylefeng.guns.modular.system.service.IReassignService; |
| | | import com.stylefeng.guns.modular.system.util.ChinaMobileUtil; |
| | | import com.stylefeng.guns.modular.system.util.PushUtil; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import com.stylefeng.guns.modular.system.util.SystemException; |
| | | import com.stylefeng.guns.modular.system.util.*; |
| | | import com.stylefeng.guns.modular.system.util.Tingg.model.CallbackRequest; |
| | | import com.stylefeng.guns.modular.system.util.Tingg.model.CallbackResponse; |
| | | import com.stylefeng.guns.modular.system.util.Tingg.model.Payments; |
| | | import com.stylefeng.guns.modular.system.warpper.BaseWarpper; |
| | | import com.stylefeng.guns.modular.system.warpper.MoneyInfoWarpper; |
| | | import com.stylefeng.guns.modular.system.warpper.OrderInfoWarpper; |
| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.io.BufferedReader; |
| | |
| | | |
| | | @Autowired |
| | | private IOrderLogisticsService orderLogisticsService; |
| | | |
| | | @Autowired |
| | | private IOrderPrivateCarService orderPrivateCarService; |
| | | |
| | | @Value("${filePath}") |
| | | private String filePath; |
| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "订单id", name = "orderId", required = true, dataType = "int"), |
| | | @ApiImplicitParam(value = "订单类型", name = "orderType", required = true, dataType = "int"), |
| | | @ApiImplicitParam(value = "支付方式(1=线上,2=余额)", name = "payType", required = true, dataType = "int"), |
| | | @ApiImplicitParam(value = "支付方式(1=手机支付,2=银行卡支付,3=余额)", name = "payType", required = true, dataType = "int"), |
| | | @ApiImplicitParam(value = "银行卡id", name = "bankCardId", required = false, dataType = "int"), |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil payOrder(Integer orderId, Integer orderType, Integer payType, Integer language, HttpServletRequest request){ |
| | | public ResultUtil payOrder(Integer orderId, Integer orderType, Integer payType, Integer bankCardId, Integer language, HttpServletRequest request){ |
| | | try { |
| | | Integer uid = driverService.getUserIdFormRedis(request); |
| | | if(null == uid){ |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | return orderService.payOrder(uid, orderId, orderType, payType, language); |
| | | return orderService.payOrder(uid, orderId, orderType, payType, bankCardId, language); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 完成订单微信支付回调 |
| | | * @param |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/base/wxPayOrderTaxi") |
| | | public CallbackResponse wxPayOrderTaxi(@RequestBody CallbackRequest callbackRequest){ |
| | | CallbackResponse callbackResponse = new CallbackResponse(); |
| | | try { |
| | | /** |
| | | * 指示服务是否成功或付费的总体请求代码。。 |
| | | * 177-部分付费请求 |
| | | * 178-表明请求已全额支付 |
| | | * 179-表示请求已部分支付但已过期。 |
| | | * 129-请求已过期,未付款。 |
| | | * 180.商户拒绝请求 |
| | | * 183-商户接受请求,我们可以结算资金 |
| | | * 188-商户收到请求。 |
| | | */ |
| | | String request_status_code = callbackRequest.getRequest_status_code(); |
| | | String out_trade_no = callbackRequest.getMerchant_transaction_id(); |
| | | if("177".equals(request_status_code) || "178".equals(request_status_code)){ |
| | | Payments payments = callbackRequest.getPayments().get(0); |
| | | String order_id = payments.getPayer_transaction_id(); |
| | | if(ToolUtil.isNotEmpty(out_trade_no)){ |
| | | Integer orderType = Integer.valueOf(out_trade_no.substring(17, 18)); |
| | | Integer language = Integer.valueOf(out_trade_no.substring(18, 19)); |
| | | Integer id = Integer.valueOf(out_trade_no.substring(19)); |
| | | switch (orderType){ |
| | | case 1: |
| | | orderPrivateCarService.payOrderPrivateCarCallback(id, order_id, language); |
| | | break; |
| | | case 4: |
| | | orderLogisticsService.payOrderLogisticsCallback(id, order_id, language); |
| | | break; |
| | | } |
| | | callbackResponse.setCheckout_request_id(order_id); |
| | | callbackResponse.setMerchant_transaction_id(out_trade_no); |
| | | callbackResponse.setStatus_code("183"); |
| | | callbackResponse.setStatus_description("Payment processed successfully"); |
| | | callbackResponse.setReceipt_number(UUIDUtil.getRandomCode(16)); |
| | | } |
| | | }else{ |
| | | callbackResponse.setCheckout_request_id(UUIDUtil.getRandomCode(16)); |
| | | callbackResponse.setMerchant_transaction_id(out_trade_no); |
| | | callbackResponse.setStatus_code("180"); |
| | | callbackResponse.setStatus_description("means payment rejected."); |
| | | callbackResponse.setReceipt_number(UUIDUtil.getRandomCode(16)); |
| | | } |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | return callbackResponse; |
| | | } |
| | | } |
| | |
| | | @ApiImplicitParam(value = "提现类型(1=活动收入提现,2=业务收入提现)", name = "type", required = true, dataType = "int"), |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil withdrawal(Double mone, Integer type, Integer language, HttpServletRequest request){ |
| | | public ResultUtil withdrawal(Double money, Integer type, String remark, Integer language, HttpServletRequest request){ |
| | | try { |
| | | Integer uid = driverService.getUserIdFormRedis(request); |
| | | if(null == uid){ |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | return withdrawalService.withdrawal(mone, uid, type, language); |
| | | return withdrawalService.withdrawal(money, uid, type, remark, language); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | |
| | | * @throws Exception |
| | | */ |
| | | void sendVerificationCode(Integer orderId, Integer language) throws Exception; |
| | | |
| | | |
| | | /** |
| | | * 支付完成后的订单处理 |
| | | * @param id 订单=id |
| | | * @param order_id 工行支付单号 |
| | | * @throws Exception |
| | | */ |
| | | void payOrderLogisticsCallback(Integer id, String order_id, Integer language) throws Exception; |
| | | } |
| | |
| | | import com.stylefeng.guns.modular.smallLogistics.server.IOrderLogisticsSpreadService; |
| | | import com.stylefeng.guns.modular.system.dao.RegionMapper; |
| | | import com.stylefeng.guns.modular.system.dao.UserInfoMapper; |
| | | import com.stylefeng.guns.modular.system.model.Company; |
| | | import com.stylefeng.guns.modular.system.model.Driver; |
| | | import com.stylefeng.guns.modular.system.model.Region; |
| | | import com.stylefeng.guns.modular.system.model.UserInfo; |
| | | import com.stylefeng.guns.modular.system.service.ICompanyService; |
| | | import com.stylefeng.guns.modular.system.service.IDriverService; |
| | | import com.stylefeng.guns.modular.system.service.IIncomeService; |
| | | import com.stylefeng.guns.modular.system.service.ISystemNoticeService; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.system.util.*; |
| | | import com.stylefeng.guns.modular.taxi.model.OrderTaxi; |
| | | import org.jsoup.Jsoup; |
| | |
| | | |
| | | @Value("${spring.mail.template-path}") |
| | | private String templatePath; |
| | | |
| | | @Autowired |
| | | private IPaymentRecordService paymentRecordService; |
| | | |
| | | @Autowired |
| | | private ITransactionDetailsService transactionDetailsService; |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public void payOrderLogisticsCallback(Integer id, String order_id, Integer language) throws Exception { |
| | | OrderLogistics orderLogistics = this.selectById(id); |
| | | PaymentRecord query = paymentRecordService.query(1, null, 2, Integer.valueOf(id), orderLogistics.getType(), null, 1); |
| | | if(null != query){ |
| | | //添加交易明细 |
| | | transactionDetailsService.saveData(orderLogistics.getDriverId(), language == 1 ? "现金收款代付" : language == 2 ? "Cash collection on behalf of payment" : "Paiement en espèces", query.getAmount(), 2, 1, 2, orderLogistics.getType(), id); |
| | | orderLogistics.setDriverPay(2); |
| | | this.updateById(orderLogistics); |
| | | |
| | | query.setState(2); |
| | | query.setCode(order_id); |
| | | paymentRecordService.updateById(query); |
| | | }else{ |
| | | System.err.println("预支付数据异常(orderId = " + id + ")"); |
| | | } |
| | | } |
| | | } |
| | |
| | | List<OrderPrivateCar> taskMidAxbUnBindSend(); |
| | | |
| | | List<OrderPrivateCar> getSmsOrderList(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * 支付完成后的订单处理 |
| | | * @param id 订单=id |
| | | * @param order_id 工行支付单号 |
| | | * @throws Exception |
| | | */ |
| | | void payOrderPrivateCarCallback(Integer id, String order_id, Integer language) throws Exception; |
| | | } |
| | |
| | | @Autowired |
| | | private IIncomeService incomeService; |
| | | |
| | | @Autowired |
| | | private IPaymentRecordService paymentRecordService; |
| | | |
| | | @Autowired |
| | | private ITransactionDetailsService transactionDetailsService; |
| | | |
| | | |
| | | @Value("${filePath}") |
| | | private String filePath; |
| | |
| | | public List<OrderPrivateCar> getSmsOrderList() { |
| | | return this.baseMapper.getSmsOrderList(); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public void payOrderPrivateCarCallback(Integer id, String order_id, Integer language) throws Exception { |
| | | OrderPrivateCar orderPrivateCar = this.selectById(id); |
| | | PaymentRecord query = paymentRecordService.query(1, orderPrivateCar.getDriverId(), 2, id, 1, null, 1); |
| | | if(null != query){ |
| | | //添加交易明细 |
| | | transactionDetailsService.saveData(orderPrivateCar.getDriverId(), language == 1 ? "现金收款代付" : language == 2 ? "Cash collection on behalf of payment" : "Paiement en espèces", query.getAmount(), 2, 1, 2, 1, id); |
| | | orderPrivateCar.setDriverPay(2); |
| | | this.updateById(orderPrivateCar); |
| | | |
| | | query.setState(2); |
| | | query.setCode(order_id); |
| | | paymentRecordService.updateById(query); |
| | | }else{ |
| | | System.err.println("预支付数据异常(orderId = " + id + ")"); |
| | | } |
| | | } |
| | | } |
| | |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | ResultUtil payOrder(Integer uid, Integer orderId, Integer orderType, Integer payType, Integer language) throws Exception; |
| | | ResultUtil payOrder(Integer uid, Integer orderId, Integer orderType, Integer payType, Integer bankCardId, Integer language) throws Exception; |
| | | } |
| | |
| | | * @param uid |
| | | * @throws Exception |
| | | */ |
| | | ResultUtil withdrawal(Double money, Integer uid, Integer type, Integer language) throws Exception; |
| | | ResultUtil withdrawal(Double money, Integer uid, Integer type, String remark, Integer language) throws Exception; |
| | | |
| | | |
| | | /** |
| | |
| | | import com.stylefeng.guns.modular.system.dao.PhoneMapper; |
| | | import com.stylefeng.guns.modular.system.dao.RegionMapper; |
| | | import com.stylefeng.guns.modular.system.dao.SysReformistMapper; |
| | | import com.stylefeng.guns.modular.system.model.BankCard; |
| | | import com.stylefeng.guns.modular.system.model.Driver; |
| | | import com.stylefeng.guns.modular.system.model.OrderPosition; |
| | | import com.stylefeng.guns.modular.system.model.Region; |
| | | import com.stylefeng.guns.modular.system.service.IDriverService; |
| | | import com.stylefeng.guns.modular.system.service.IOrderService; |
| | | import com.stylefeng.guns.modular.system.service.ISystemNoticeService; |
| | | import com.stylefeng.guns.modular.system.service.ITransactionDetailsService; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.system.util.*; |
| | | import com.stylefeng.guns.modular.system.util.GoogleMap.DistancematrixVo; |
| | | import com.stylefeng.guns.modular.system.util.GoogleMap.GoogleMapUtil; |
| | | import com.stylefeng.guns.modular.system.util.GoogleMap.ReverseGeocodeVo; |
| | | import com.stylefeng.guns.modular.system.util.Tingg.TinggPayUtil; |
| | | import com.stylefeng.guns.modular.system.util.Tingg.model.CheckoutRequest; |
| | | import com.stylefeng.guns.modular.system.warpper.OrderListWarpper; |
| | | import com.stylefeng.guns.modular.taxi.model.OrderTaxi; |
| | | import com.stylefeng.guns.modular.taxi.service.IOrderTaxiService; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | |
| | | /** |
| | |
| | | |
| | | @Autowired |
| | | private ITransactionDetailsService transactionDetailsService; |
| | | |
| | | @Value("${callbackPath}") |
| | | private String callbackPath; |
| | | |
| | | @Autowired |
| | | private IPaymentRecordService paymentRecordService; |
| | | |
| | | @Autowired |
| | | private IBankCardService bankCardService; |
| | | |
| | | |
| | | |
| | | |
| | |
| | | |
| | | |
| | | @Override |
| | | public ResultUtil payOrder(Integer uid, Integer orderId, Integer orderType, Integer payType, Integer language) throws Exception { |
| | | public ResultUtil payOrder(Integer uid, Integer orderId, Integer orderType, Integer payType, Integer bankCardId, Integer language) throws Exception { |
| | | Double money = 0D; |
| | | Driver driver = driverService.selectById(uid); |
| | | if(orderType == 1){//专车 |
| | | OrderPrivateCar orderPrivateCar = orderPrivateCarService.selectById(orderId); |
| | | money = orderPrivateCar.getPayMoney(); |
| | |
| | | return ResultUtil.error(language == 1 ? "不能重复支付" : language == 2 ? "Non-repeatable payment" : "Aucun paiement en double"); |
| | | } |
| | | if(payType == 2){//余额支付 |
| | | Driver driver = driverService.selectById(uid); |
| | | if(driver.getBalance().compareTo(money) < 0){ |
| | | return ResultUtil.error(language == 1 ? "账户余额不足" : language == 2 ? "Insufficient account balance" : "Solde insuffisant du compte"); |
| | | } |
| | | } |
| | | orderPrivateCar.setDriverPay(2); |
| | | orderPrivateCarService.updateById(orderPrivateCar); |
| | | } |
| | | if(orderType == 4){//小件 |
| | | OrderLogistics orderLogistics = orderLogisticsService.selectById(orderId); |
| | |
| | | return ResultUtil.error(language == 1 ? "不能重复支付" : language == 2 ? "Non-repeatable payment" : "Aucun paiement en double"); |
| | | } |
| | | if(payType == 2){//余额支付 |
| | | Driver driver = driverService.selectById(uid); |
| | | if(driver.getBalance().compareTo(money) < 0){ |
| | | return ResultUtil.error(language == 1 ? "账户余额不足" : language == 2 ? "Insufficient account balance" : "Solde insuffisant du compte"); |
| | | } |
| | | } |
| | | orderLogistics.setDriverPay(2); |
| | | orderLogisticsService.updateById(orderLogistics); |
| | | } |
| | | |
| | | if(0 < money){ |
| | | if(payType == 1){//线上支付 |
| | | |
| | | if(payType == 1) {//手机支付 |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSS"); |
| | | String merchantTransactionId = sdf.format(new Date()) + "4" + language + orderId; |
| | | CheckoutRequest checkoutRequest = new CheckoutRequest(); |
| | | checkoutRequest.setMsisdn(Long.valueOf(driver.getPhone())); |
| | | checkoutRequest.setCustomerEmail(driver.getEmail()); |
| | | checkoutRequest.setAccountNumber(driver.getPhone()); |
| | | checkoutRequest.setCustomerFirstName(driver.getFirstName()); |
| | | checkoutRequest.setCustomerLastName(driver.getLastName()); |
| | | checkoutRequest.setRequestAmount(money); |
| | | checkoutRequest.setMerchantTransactionId(merchantTransactionId); |
| | | checkoutRequest.setRequestDescription("Travel completion payment"); |
| | | checkoutRequest.setCallbackUrl(callbackPath + "/base/wxPayOrderTaxi"); |
| | | checkoutRequest.setPendingRedirectUrl(""); |
| | | checkoutRequest.setSuccessRedirectUrl("http://182.160.16.251:81/payMoney/pages/success.html"); |
| | | checkoutRequest.setFailRedirectUrl("http://182.160.16.251:81/payMoney/pages/fail.html"); |
| | | ResultUtil resultUtil = TinggPayUtil.checkoutRequest(checkoutRequest); |
| | | if(resultUtil.getCode()==200){ |
| | | paymentRecordService.saveData(1, uid, 2, orderId, orderType, 1, money, null, 1);//添加预支付数据 |
| | | }else{ |
| | | resultUtil = ResultUtil.error(language == 1 ? "支付失败" : language == 2 ? "Payment failure" : "Paiement échoué", ""); |
| | | } |
| | | if(payType == 2){//余额支付 |
| | | Driver driver = driverService.selectById(uid); |
| | | return resultUtil; |
| | | } |
| | | |
| | | if(payType == 2) {//银行卡支付 |
| | | BankCard bankCard = bankCardService.selectById(bankCardId); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSS"); |
| | | String merchantTransactionId = sdf.format(new Date()) + "4" + language + orderId; |
| | | CheckoutRequest checkoutRequest = new CheckoutRequest(); |
| | | checkoutRequest.setMsisdn(Long.valueOf(bankCard.getCode())); |
| | | checkoutRequest.setCustomerEmail(driver.getEmail()); |
| | | checkoutRequest.setAccountNumber(bankCard.getCode()); |
| | | checkoutRequest.setCustomerFirstName(bankCard.getFirstName()); |
| | | checkoutRequest.setCustomerLastName(bankCard.getLastName()); |
| | | checkoutRequest.setRequestAmount(money); |
| | | checkoutRequest.setMerchantTransactionId(merchantTransactionId); |
| | | checkoutRequest.setRequestDescription("Travel completion payment"); |
| | | checkoutRequest.setCallbackUrl(callbackPath + "/base/wxPayOrderTaxi"); |
| | | checkoutRequest.setPendingRedirectUrl(""); |
| | | checkoutRequest.setSuccessRedirectUrl("http://182.160.16.251:81/payMoney/pages/success.html"); |
| | | checkoutRequest.setFailRedirectUrl("http://182.160.16.251:81/payMoney/pages/fail.html"); |
| | | ResultUtil resultUtil = TinggPayUtil.checkoutRequest(checkoutRequest); |
| | | |
| | | if(resultUtil.getCode()==200){ |
| | | paymentRecordService.saveData(1, uid, 2, orderId, orderType, 2, money, null, 1);//添加预支付数据 |
| | | }else{ |
| | | resultUtil = ResultUtil.error(language == 1 ? "支付失败" : language == 2 ? "Payment failure" : "Paiement échoué", ""); |
| | | } |
| | | return resultUtil; |
| | | } |
| | | if(payType == 3){//余额支付 |
| | | driver.setBalance(driver.getBalance() - money); |
| | | if(driver.getLaveBusinessMoney().compareTo(money) < 0){ |
| | | double b = money - driver.getLaveBusinessMoney(); |
| | |
| | | driver.setLaveBusinessMoney(driver.getLaveBusinessMoney() - money); |
| | | driverService.updateById(driver); |
| | | } |
| | | } |
| | | |
| | | if(orderType == 1){//专车 |
| | | OrderPrivateCar orderPrivateCar = orderPrivateCarService.selectById(orderId); |
| | | orderPrivateCar.setDriverPay(2); |
| | | orderPrivateCarService.updateById(orderPrivateCar); |
| | | } |
| | | if(orderType == 4){//小件 |
| | | OrderLogistics orderLogistics = orderLogisticsService.selectById(orderId); |
| | | orderLogistics.setDriverPay(2); |
| | | orderLogisticsService.updateById(orderLogistics); |
| | | } |
| | | transactionDetailsService.saveData(uid, "现金收款代付", money, 2, 1, 2, orderType, orderId); |
| | | } |
| | | } |
| | | return ResultUtil.success(); |
| | | } |
| | | } |
| | |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public ResultUtil withdrawal(Double money, Integer uid, Integer type, Integer language) throws Exception { |
| | | public ResultUtil withdrawal(Double money, Integer uid, Integer type, String remark, Integer language) throws Exception { |
| | | if(money.compareTo(0D) <= 0){ |
| | | return ResultUtil.error(language == 1 ? "提现金额必须大于0" : language == 2 ? "The withdrawal amount must be greater than 0" : "Le montant du retrait doit être supérieur à 0"); |
| | | } |
| | |
| | | withdrawal.setUserId(uid); |
| | | withdrawal.setUserType(2); |
| | | withdrawal.setType(type); |
| | | withdrawal.setRemark(remark); |
| | | this.insert(withdrawal); |
| | | |
| | | if(type == 1){ |
| | |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import com.stylefeng.guns.modular.system.util.Tingg.model.CallbackRequest; |
| | | import com.stylefeng.guns.modular.system.util.Tingg.model.CheckoutRequest; |
| | | import io.cellulant.model.Payload; |
| | | import io.cellulant.service.CheckoutEncryption; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.io.BufferedReader; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.io.InputStreamReader; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | |
| | | */ |
| | | public class TinggPayUtil { |
| | | |
| | | private static String accessKey = "KxjPP444jEE7K88E7juej4PKqqzKq7qKjKj84q744q9zj4Ej4zK47uj4KKj4"; |
| | | private static String accessKey = "8rc1gTV9n91Tc1Sy9oVWry99fgrgrVV8concf9onWooWSg9TVW8nSgo98g88"; |
| | | |
| | | private static String ivKey = "qsffKsCOJJdhSBCQ"; |
| | | private static String ivKey = "ABp0pqpHMteEJM2N"; |
| | | |
| | | private static String secretKey = "9jjz4Ex74P8ue4qK"; |
| | | private static String secretKey = "rf8Vo1n9yTSW98cg"; |
| | | |
| | | |
| | | /** |
| | |
| | | Payload payload = getPayload(checkoutRequest); |
| | | String param = checkoutEncrption.encrypt(payload); |
| | | System.out.println("Encrpted payload=" + param); |
| | | String url = "https://online.uat.tingg.africa/testing/express/checkout?encrypted_payload=" + param + "&access_key=" + accessKey; |
| | | String url = "https://checkout.tingg.africa/express/checkout?encrypted_payload=" + param + "&access_key=" + accessKey; |
| | | return ResultUtil.success(url); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | String countryCode="GHA";//收取付款的国家的3位ISO代码 |
| | | String currencyCode = "GHS";//3位ISO代码的货币,商家正在开发票。 |
| | | String serviceCode="IGOGHANA";//服务代码 |
| | | String serviceCode="I-GO_TECHNOLOGIES_LI";//服务代码 |
| | | String dueDate = sdf.format(new Date(System.currentTimeMillis() + 1800000));//到期时间 |
| | | String languageCode="EN"; |
| | | String paymentOptionCode = "";//支付选项码 |
| | |
| | | } |
| | | |
| | | |
| | | public static CallbackRequest getRequestParam(HttpServletRequest request) throws IOException { |
| | | // 读取参数 |
| | | InputStream inputStream; |
| | | StringBuilder sb = new StringBuilder(); |
| | | inputStream = request.getInputStream(); |
| | | String s; |
| | | BufferedReader in = new BufferedReader(new InputStreamReader(inputStream, "UTF-8")); |
| | | while ((s = in.readLine()) != null) { |
| | | sb.append(s); |
| | | } |
| | | in.close(); |
| | | inputStream.close(); |
| | | String json = sb.toString(); |
| | | System.err.println("结果-----》" + json); |
| | | CallbackRequest callbackRequest = JSON.parseObject(json, CallbackRequest.class); |
| | | |
| | | return callbackRequest; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | public static void main(String[] ages){ |
| | | CheckoutRequest checkoutRequest = new CheckoutRequest(); |
| | | checkoutRequest.setMsisdn(233240000000L); |
| | | checkoutRequest.setMsisdn(Long.valueOf("2030376339310")); |
| | | checkoutRequest.setCustomerEmail("393733352@qq.com"); |
| | | checkoutRequest.setAccountNumber("4111111111111111"); |
| | | checkoutRequest.setCustomerFirstName("zhibing"); |
| | | checkoutRequest.setCustomerLastName("pu"); |
| | | checkoutRequest.setAccountNumber("2030376339310"); |
| | | checkoutRequest.setCustomerFirstName("ZHONGSHI"); |
| | | checkoutRequest.setCustomerLastName("HUANG"); |
| | | checkoutRequest.setRequestAmount(1.00D); |
| | | checkoutRequest.setMerchantTransactionId("123456T"); |
| | | checkoutRequest.setMerchantTransactionId("00024"); |
| | | checkoutRequest.setRequestDescription("payment test"); |
| | | checkoutRequest.setCallbackUrl("https://10pz685243.zicp.fun"); |
| | | checkoutRequest.setPendingRedirectUrl("https://10pz685243.zicp.fun"); |
| | | checkoutRequest.setSuccessRedirectUrl("https://10pz685243.zicp.fun"); |
| | | checkoutRequest.setCallbackUrl("https://10pz685243.zicp.fun/base/IGO/wxCancelUserBalance"); |
| | | checkoutRequest.setPendingRedirectUrl("https://www.baidu.com"); |
| | | checkoutRequest.setSuccessRedirectUrl("https://www.baidu.com"); |
| | | checkoutRequest.setFailRedirectUrl("https://www.baidu.com"); |
| | | ResultUtil resultUtil = TinggPayUtil.checkoutRequest(checkoutRequest); |
| | | System.err.println(JSON.toJSONString(resultUtil)); |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.util.Tingg; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.stylefeng.guns.modular.system.util.Tingg.model.*; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpEntity; |
| | | import org.springframework.http.HttpHeaders; |
| | | import org.springframework.http.MediaType; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.web.client.RestTemplate; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 转账 |
| | | * @author zhibing.pu |
| | | * @date 2023/3/17 9:48 |
| | | */ |
| | | @Component |
| | | public class TinggPayoutUtil { |
| | | |
| | | @Autowired |
| | | private RestTemplate restTemplate; |
| | | |
| | | |
| | | /** |
| | | * 转账接口 |
| | | * @param phone 电话号码,带国家代码+233 |
| | | * @param payerTransactionID 支付单号 |
| | | * @param amount 支付金额 |
| | | * @param callbackUrl 回调地址 |
| | | * @param narration 备注 |
| | | * @return |
| | | */ |
| | | public PayoutResponse sendPayout(String serviceCode, String phone, String payerTransactionID, Double amount, String callbackUrl, String narration) { |
| | | 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(serviceCode);//手机网络运营商 GH-MTN-B2C、GH-TIGO-B2C、GH-VODAFONE-B2C、GH-AIRTEL-B2C |
| | | packet.setMSISDN(phone); |
| | | packet.setAccountNumber(phone); |
| | | packet.setPayerTransactionID(payerTransactionID); |
| | | packet.setAmount(amount); |
| | | packet.setNarration(narration); |
| | | packet.setDatePaymentReceived(sdf.format(new Date())); |
| | | packet.setExtraData(new ExtraData(callbackUrl)); |
| | | packet.setCurrencyCode("GHS"); |
| | | packets.add(packet); |
| | | Payload payload = new Payload(credentials, packets); |
| | | Payout payout = new Payout("GH", "BEEP.postPayment", payload); |
| | | String string = JSON.toJSONString(payout); |
| | | string = string.replace("mSISDN", "MSISDN"); |
| | | System.err.println(string); |
| | | HttpHeaders headers = new HttpHeaders(); |
| | | MediaType type = MediaType.parseMediaType("text/plain"); |
| | | headers.setContentType(type); |
| | | headers.add("Accept", MediaType.APPLICATION_JSON.toString()); |
| | | HttpEntity<String> formEntity = new HttpEntity<>(string, headers); |
| | | |
| | | 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); |
| | | return payoutResponse; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.util.Tingg.model; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2023/3/20 16:52 |
| | | */ |
| | | public class AuthStatus { |
| | | /** |
| | | * 认证状态码 |
| | | * 131 客户端认证成功 |
| | | * 132 客户端认证失败 |
| | | * 174 具有匹配的适当描述的通用故障状态代码 |
| | | */ |
| | | private Integer authStatusCode; |
| | | /** |
| | | * 账号认证说明 |
| | | */ |
| | | private String authStatusDescription; |
| | | |
| | | public Integer getAuthStatusCode() { |
| | | return authStatusCode; |
| | | } |
| | | |
| | | public void setAuthStatusCode(Integer authStatusCode) { |
| | | this.authStatusCode = authStatusCode; |
| | | } |
| | | |
| | | public String getAuthStatusDescription() { |
| | | return authStatusDescription; |
| | | } |
| | | |
| | | public void setAuthStatusDescription(String authStatusDescription) { |
| | | this.authStatusDescription = authStatusDescription; |
| | | } |
| | | } |
| | |
| | | package com.stylefeng.guns.modular.system.util.Tingg.model; |
| | | |
| | | |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Locale; |
| | | |
| | | |
| | | /** |
| | |
| | | return request_date; |
| | | } |
| | | |
| | | public void setRequest_date(Date request_date) { |
| | | this.request_date = request_date; |
| | | public void setRequest_date(String request_date) { |
| | | try { |
| | | SimpleDateFormat format = new SimpleDateFormat("EEE MMM dd HH:mm:ss z yyyy", Locale.ENGLISH); |
| | | this.request_date = format.parse(request_date); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | public String getService_code() { |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.util.Tingg.model; |
| | | |
| | | /** |
| | | * 凭证 |
| | | * @author zhibing.pu |
| | | * @date 2023/3/17 9:53 |
| | | */ |
| | | public class Credentials { |
| | | /** |
| | | * 用户名称 |
| | | */ |
| | | private String username; |
| | | /** |
| | | * 密码 |
| | | */ |
| | | private String password; |
| | | |
| | | public Credentials() { |
| | | } |
| | | |
| | | public Credentials(String username, String password) { |
| | | this.username = username; |
| | | this.password = password; |
| | | } |
| | | |
| | | public String getUsername() { |
| | | return username; |
| | | } |
| | | |
| | | public void setUsername(String username) { |
| | | this.username = username; |
| | | } |
| | | |
| | | public String getPassword() { |
| | | return password; |
| | | } |
| | | |
| | | public void setPassword(String password) { |
| | | this.password = password; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "Credentials{" + |
| | | "username='" + username + '\'' + |
| | | ", password='" + password + '\'' + |
| | | '}'; |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.util.Tingg.model; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2023/3/17 10:13 |
| | | */ |
| | | public class ExtraData { |
| | | /** |
| | | * 回调地址 |
| | | */ |
| | | private String callbackUrl; |
| | | |
| | | public ExtraData() { |
| | | } |
| | | |
| | | public ExtraData(String callbackUrl) { |
| | | this.callbackUrl = callbackUrl; |
| | | } |
| | | |
| | | public String getCallbackUrl() { |
| | | return callbackUrl; |
| | | } |
| | | |
| | | public void setCallbackUrl(String callbackUrl) { |
| | | this.callbackUrl = callbackUrl; |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.util.Tingg.model; |
| | | |
| | | /** |
| | | * 实体包信息 |
| | | * @author zhibing.pu |
| | | * @date 2023/3/17 9:56 |
| | | */ |
| | | public class Packet { |
| | | /** |
| | | * 服务产品代码 |
| | | */ |
| | | private String serviceCode; |
| | | /** |
| | | * 进行支付的客户的手机号码。MSISDN应以国家代码开头,例如254xxxxxxxxx |
| | | */ |
| | | private String MSISDN; |
| | | /** |
| | | * 账号为收款账号。如果是手机号码,则应以国家代码开头,例如254xxxxxxxxx |
| | | */ |
| | | private String accountNumber; |
| | | /** |
| | | * 由银行为该事务生成的惟一transactionID。 |
| | | */ |
| | | private String payerTransactionID; |
| | | /** |
| | | * 客户支付的金额 |
| | | */ |
| | | private Double amount; |
| | | /** |
| | | * 备注信息 |
| | | */ |
| | | private String narration; |
| | | /** |
| | | * 付款人收到付款的日期。yyyy-mm-dd hh: mm: ss。 |
| | | */ |
| | | private String datePaymentReceived; |
| | | /** |
| | | * 额外数据 |
| | | */ |
| | | private ExtraData extraData; |
| | | /** |
| | | * 交易货币的 ISO 代码。 |
| | | */ |
| | | private String currencyCode; |
| | | |
| | | public String getServiceCode() { |
| | | return serviceCode; |
| | | } |
| | | |
| | | public void setServiceCode(String serviceCode) { |
| | | this.serviceCode = serviceCode; |
| | | } |
| | | |
| | | public String getMSISDN() { |
| | | return MSISDN; |
| | | } |
| | | |
| | | public void setMSISDN(String MSISDN) { |
| | | this.MSISDN = MSISDN; |
| | | } |
| | | |
| | | public String getAccountNumber() { |
| | | return accountNumber; |
| | | } |
| | | |
| | | public void setAccountNumber(String accountNumber) { |
| | | this.accountNumber = accountNumber; |
| | | } |
| | | |
| | | public String getPayerTransactionID() { |
| | | return payerTransactionID; |
| | | } |
| | | |
| | | public void setPayerTransactionID(String payerTransactionID) { |
| | | this.payerTransactionID = payerTransactionID; |
| | | } |
| | | |
| | | public Double getAmount() { |
| | | return amount; |
| | | } |
| | | |
| | | public void setAmount(Double amount) { |
| | | this.amount = amount; |
| | | } |
| | | |
| | | public String getNarration() { |
| | | return narration; |
| | | } |
| | | |
| | | public void setNarration(String narration) { |
| | | this.narration = narration; |
| | | } |
| | | |
| | | public String getDatePaymentReceived() { |
| | | return datePaymentReceived; |
| | | } |
| | | |
| | | public void setDatePaymentReceived(String datePaymentReceived) { |
| | | this.datePaymentReceived = datePaymentReceived; |
| | | } |
| | | |
| | | public ExtraData getExtraData() { |
| | | return extraData; |
| | | } |
| | | |
| | | public void setExtraData(ExtraData extraData) { |
| | | this.extraData = extraData; |
| | | } |
| | | |
| | | public String getCurrencyCode() { |
| | | return currencyCode; |
| | | } |
| | | |
| | | public void setCurrencyCode(String currencyCode) { |
| | | this.currencyCode = currencyCode; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "Packet{" + |
| | | "serviceCode='" + serviceCode + '\'' + |
| | | ", MSISDN='" + MSISDN + '\'' + |
| | | ", accountNumber='" + accountNumber + '\'' + |
| | | ", payerTransactionID='" + payerTransactionID + '\'' + |
| | | ", amount=" + amount + |
| | | ", narration='" + narration + '\'' + |
| | | ", datePaymentReceived='" + datePaymentReceived + '\'' + |
| | | ", extraData=" + extraData + |
| | | ", currencyCode='" + currencyCode + '\'' + |
| | | '}'; |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.util.Tingg.model; |
| | | |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2023/3/20 16:33 |
| | | */ |
| | | public class PayOutload { |
| | | /** |
| | | * 凭证 |
| | | */ |
| | | private Credentials credentials; |
| | | /** |
| | | * 实体包信息 |
| | | */ |
| | | private PayoutPacket packet; |
| | | |
| | | public Credentials getCredentials() { |
| | | return credentials; |
| | | } |
| | | |
| | | public void setCredentials(Credentials credentials) { |
| | | this.credentials = credentials; |
| | | } |
| | | |
| | | public PayoutPacket getPacket() { |
| | | return packet; |
| | | } |
| | | |
| | | public void setPacket(PayoutPacket packet) { |
| | | this.packet = packet; |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.util.Tingg.model; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 退款实体 |
| | | * @author zhibing.pu |
| | | * @date 2023/3/17 9:51 |
| | | */ |
| | | public class Payload { |
| | | /** |
| | | * 凭证 |
| | | */ |
| | | private Credentials credentials; |
| | | /** |
| | | * 实体包信息 |
| | | */ |
| | | private List<Packet> packet; |
| | | |
| | | public Payload() { |
| | | } |
| | | |
| | | public Payload(Credentials credentials, List<Packet> packet) { |
| | | this.credentials = credentials; |
| | | this.packet = packet; |
| | | } |
| | | |
| | | public Credentials getCredentials() { |
| | | return credentials; |
| | | } |
| | | |
| | | public void setCredentials(Credentials credentials) { |
| | | this.credentials = credentials; |
| | | } |
| | | |
| | | public List<Packet> getPacket() { |
| | | return packet; |
| | | } |
| | | |
| | | public void setPacket(List<Packet> packet) { |
| | | this.packet = packet; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "Payload{" + |
| | | "credentials=" + credentials + |
| | | ", packet=" + packet + |
| | | '}'; |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.util.Tingg.model; |
| | | |
| | | /** |
| | | * 退款 |
| | | * @author zhibing.pu |
| | | * @date 2023/3/17 9:49 |
| | | */ |
| | | public class Payout { |
| | | /** |
| | | * 国家代码 |
| | | */ |
| | | private String countryCode; |
| | | /** |
| | | * 接口类型 |
| | | */ |
| | | private String function; |
| | | /** |
| | | * 参数实体 |
| | | */ |
| | | private Payload payload; |
| | | |
| | | public Payout() { |
| | | } |
| | | |
| | | public Payout(String countryCode, String function, Payload payload) { |
| | | this.countryCode = countryCode; |
| | | this.function = function; |
| | | this.payload = payload; |
| | | } |
| | | |
| | | public String getCountryCode() { |
| | | return countryCode; |
| | | } |
| | | |
| | | public void setCountryCode(String countryCode) { |
| | | this.countryCode = countryCode; |
| | | } |
| | | |
| | | public String getFunction() { |
| | | return function; |
| | | } |
| | | |
| | | public void setFunction(String function) { |
| | | this.function = function; |
| | | } |
| | | |
| | | public Payload getPayload() { |
| | | return payload; |
| | | } |
| | | |
| | | public void setPayload(Payload payload) { |
| | | this.payload = payload; |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.util.Tingg.model; |
| | | |
| | | /** |
| | | * 转账回调请求 |
| | | * @author zhibing.pu |
| | | * @date 2023/3/20 16:31 |
| | | */ |
| | | public class PayoutCallbackRequest { |
| | | /** |
| | | * 国家代码 |
| | | */ |
| | | private String countryCode; |
| | | /** |
| | | * 调用函数 |
| | | */ |
| | | private String function; |
| | | /** |
| | | * 数据 |
| | | */ |
| | | private PayOutload payload; |
| | | |
| | | public String getCountryCode() { |
| | | return countryCode; |
| | | } |
| | | |
| | | public void setCountryCode(String countryCode) { |
| | | this.countryCode = countryCode; |
| | | } |
| | | |
| | | public String getFunction() { |
| | | return function; |
| | | } |
| | | |
| | | public void setFunction(String function) { |
| | | this.function = function; |
| | | } |
| | | |
| | | public PayOutload getPayload() { |
| | | return payload; |
| | | } |
| | | |
| | | public void setPayload(PayOutload payload) { |
| | | this.payload = payload; |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.util.Tingg.model; |
| | | |
| | | /** |
| | | * 转账回调反馈 |
| | | * @author zhibing.pu |
| | | * @date 2023/3/20 16:40 |
| | | */ |
| | | public class PayoutCallbackResponse { |
| | | /** |
| | | * 认证状态及说明 |
| | | */ |
| | | private AuthStatus authStatus; |
| | | /** |
| | | * |
| | | */ |
| | | private Results results; |
| | | |
| | | public AuthStatus getAuthStatus() { |
| | | return authStatus; |
| | | } |
| | | |
| | | public void setAuthStatus(AuthStatus authStatus) { |
| | | this.authStatus = authStatus; |
| | | } |
| | | |
| | | public Results getResults() { |
| | | return results; |
| | | } |
| | | |
| | | public void setResults(Results results) { |
| | | this.results = results; |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.util.Tingg.model; |
| | | |
| | | /** |
| | | * 实体包信息 |
| | | * @author zhibing.pu |
| | | * @date 2023/3/17 9:56 |
| | | */ |
| | | public class PayoutPacket { |
| | | /** |
| | | * 返回状态 |
| | | */ |
| | | private String statusCode; |
| | | /** |
| | | * 状态说明 |
| | | */ |
| | | private String statusDescription; |
| | | /** |
| | | * 正在支付账号。如果是手机号码,应该以国家代码开头,例如2547xxxxxxxx |
| | | */ |
| | | private String beepTransactionID; |
| | | /** |
| | | * 由银行为该事务生成的惟一transactionID。 |
| | | */ |
| | | private String payerTransactionID; |
| | | /** |
| | | * 客户支付的金额。 |
| | | */ |
| | | private String receiptNumber; |
| | | /** |
| | | * 正在付款的叙述。 |
| | | */ |
| | | private String receiverNarration; |
| | | |
| | | public String getStatusCode() { |
| | | return statusCode; |
| | | } |
| | | |
| | | public void setStatusCode(String statusCode) { |
| | | this.statusCode = statusCode; |
| | | } |
| | | |
| | | public String getStatusDescription() { |
| | | return statusDescription; |
| | | } |
| | | |
| | | public void setStatusDescription(String statusDescription) { |
| | | this.statusDescription = statusDescription; |
| | | } |
| | | |
| | | public String getBeepTransactionID() { |
| | | return beepTransactionID; |
| | | } |
| | | |
| | | public void setBeepTransactionID(String beepTransactionID) { |
| | | this.beepTransactionID = beepTransactionID; |
| | | } |
| | | |
| | | public String getPayerTransactionID() { |
| | | return payerTransactionID; |
| | | } |
| | | |
| | | public void setPayerTransactionID(String payerTransactionID) { |
| | | this.payerTransactionID = payerTransactionID; |
| | | } |
| | | |
| | | public String getReceiptNumber() { |
| | | return receiptNumber; |
| | | } |
| | | |
| | | public void setReceiptNumber(String receiptNumber) { |
| | | this.receiptNumber = receiptNumber; |
| | | } |
| | | |
| | | public String getReceiverNarration() { |
| | | return receiverNarration; |
| | | } |
| | | |
| | | public void setReceiverNarration(String receiverNarration) { |
| | | this.receiverNarration = receiverNarration; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "PayoutPacket{" + |
| | | "statusCode='" + statusCode + '\'' + |
| | | ", statusDescription='" + statusDescription + '\'' + |
| | | ", beepTransactionID='" + beepTransactionID + '\'' + |
| | | ", payerTransactionID='" + payerTransactionID + '\'' + |
| | | ", receiptNumber='" + receiptNumber + '\'' + |
| | | ", receiverNarration='" + receiverNarration + '\'' + |
| | | '}'; |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.util.Tingg.model; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 转账回调反馈 |
| | | * @author zhibing.pu |
| | | * @date 2023/3/20 16:40 |
| | | */ |
| | | public class PayoutResponse { |
| | | /** |
| | | * 认证状态及说明 |
| | | */ |
| | | private AuthStatus authStatus; |
| | | /** |
| | | * |
| | | */ |
| | | private List<Results> results; |
| | | |
| | | public AuthStatus getAuthStatus() { |
| | | return authStatus; |
| | | } |
| | | |
| | | public void setAuthStatus(AuthStatus authStatus) { |
| | | this.authStatus = authStatus; |
| | | } |
| | | |
| | | public List<Results> getResults() { |
| | | return results; |
| | | } |
| | | |
| | | public void setResults(List<Results> results) { |
| | | this.results = results; |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.util.Tingg.model; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2023/3/20 16:55 |
| | | */ |
| | | public class Results { |
| | | /** |
| | | * beep流水ID |
| | | */ |
| | | private String beepTransactionID; |
| | | /** |
| | | * 交易id |
| | | */ |
| | | private String payerTransactionID; |
| | | /** |
| | | * 188 |
| | | */ |
| | | private String statusCode; |
| | | /** |
| | | * 状态说明 |
| | | */ |
| | | private String statusDescription; |
| | | |
| | | public String getBeepTransactionID() { |
| | | return beepTransactionID; |
| | | } |
| | | |
| | | public void setBeepTransactionID(String beepTransactionID) { |
| | | this.beepTransactionID = beepTransactionID; |
| | | } |
| | | |
| | | public String getPayerTransactionID() { |
| | | return payerTransactionID; |
| | | } |
| | | |
| | | public void setPayerTransactionID(String payerTransactionID) { |
| | | this.payerTransactionID = payerTransactionID; |
| | | } |
| | | |
| | | public String getStatusCode() { |
| | | return statusCode; |
| | | } |
| | | |
| | | public void setStatusCode(String statusCode) { |
| | | this.statusCode = statusCode; |
| | | } |
| | | |
| | | public String getStatusDescription() { |
| | | return statusDescription; |
| | | } |
| | | |
| | | public void setStatusDescription(String statusDescription) { |
| | | this.statusDescription = statusDescription; |
| | | } |
| | | } |