微信企业付款

导入weixin4j-server,weixin4j-base,用的是sdk

runtime ‘com.foxinmy:weixin4j-base:1.6.9‘
runtime ‘com.foxinmy:weixin4j-server:1.1.8‘

付款代码:

WeixinPayAccount payAccount = new WeixinPayAccount(‘AppId‘, ‘商户支付密钥(32位,后台配置)‘, ‘商户号‘)
        Weixin4jSettings settings = new Weixin4jSettings(payAccount, ‘p12证书路径‘)
        WeixinPayProxy weixinPayProxy = new WeixinPayProxy(settings); // 或者自定义传入Weixin4jSettings对象

        CorpPayment corpPayment = new CorpPayment(‘订单号‘, ‘openId‘, CorpPaymentCheckNameType.NO_CHECK, ‘备注‘, 金额, ‘ip地址‘)

        def res = weixinPayProxy.sendCorpPayment(corpPayment)

输出的res是交易号

微信企业付款

上一篇:Android微信内按钮CSS失效


下一篇:新版asp.net 微网站微商城源码 微信公众平台源码2015管理平台