微擎开发-公众号支付配置代码解析
2017-12-27 14:35
197 查看
最近的项目是微信订阅号报名活动,老板说基于微擎开发。于是了解微擎去了,看过之后觉得微擎是一个很强大的公众号管理应用。尤其是他各种各样以及非常多的插件。真的很实用。今天弄公众号支付配置。
模板文件在web\themes\default\profile\payment.html中
<input type="text" name="" ng-model="xxxxxx" class="form-control" placeholder="">
控制器代码在\web\source\profile\payment.ctrl.php中
主要的就是 $setting = uni_setting_load('payment', $_W['uniacid']); 这行代码
uni_setting_load()这个函数执行后获取指定公号的设置项函数。
写的很仔细的微擎社区文档 http://www.phpos.net/weiqing/
模板文件在web\themes\default\profile\payment.html中
<div class="form-group"> <label for="" class="control-label col-sm-2">微信支付商户号</label> <div class="form-controls col-sm-10"> <input type="text" name="" ng-model="paysetting.wechat.mchid" class="form-control" placeholder=""> <span class="help-block"> 财付通商户权限密钥 </span> </div> </div>
<script> 4000 angular.module('profileApp').value('config', { 'paysetting' : {php echo json_encode($pay_setting)}, 'saveurl' : "{php echo url('profile/payment/save_setting')}", 'text_alipay_url' : "{php echo url('profile/payment/test_alipay')}", 'borrows' : {php echo json_encode($proxy_wechatpay_account['borrow'])}, 'get_setting_url' : "{php echo url('profile/payment/get_setting')}", 'account_level' : "{$accounts[$_W['acid']]['level']}" }); angular.bootstrap($('.js-profile-payment'), ['profileApp']); </script>
<input type="text" name="" ng-model="xxxxxx" class="form-control" placeholder="">
AngularJS ng-model
指令 :http://www.runoob.com/angularjs/ng-ng-model.html
控制器代码在\web\source\profile\payment.ctrl.php中if ($do == 'display') { $proxy_wechatpay_account = account_wechatpay_proxy(); //$_W['uniacid']是当前公众号id $setting = uni_setting_load('payment', $_W['uniacid']); $pay_setting = is_array($setting['payment']) ? $setting['payment'] : array(); if (empty($pay_setting['delivery'])) { $pay_setting['delivery'] = array('switch' => false); } if (empty($pay_setting['credit'])) { $pay_setting['delivery'] = array('switch' => false); } if (empty($pay_setting['alipay'])) { $pay_setting['alipay'] = array('switch' => false); } ........
主要的就是 $setting = uni_setting_load('payment', $_W['uniacid']); 这行代码
uni_setting_load()这个函数执行后获取指定公号的设置项函数。
写的很仔细的微擎社区文档 http://www.phpos.net/weiqing/
相关文章推荐
- 纯纯纯小白(菜鸡不懂代码)手搭腾讯云服务器apache24+php7+mysql5.6 顺带还有个微擎安装配置 学习开发微信公众号
- 微信支付开发文件WxPay.Config.php配置详解-公众号支付开发-视频教程4
- 程序开发基础学习五(json配置、解析文件,c++篇)
- Android代码混淆加密配置(Proguard文件解析)
- elasticsearch开发文档(二)——elasticsearch.yml配置文件解析
- Xamarin ios C#苹果应用开发第二讲配置环境和编写代码
- 【iOS开发-2】Info.plist文件的初步窥探:如何增减配置以及如何用代码调用里面的值
- 发语音包红包小程序开发代码解析
- 【微信支付】公众号、商户基础配置和流程(包括设置支付授权目录、测试支付目录和白名单、JS接口安全域名、授权回调域名等)
- 微信公众平台java开发详解(工程代码+解析)
- 微信公众帐号开发教程第3篇-开发模式启用及接口配置(转)
- 微信商城开发系列第四篇 不写代码玩转微信公众号
- Java开发微信公众账号支付接口
- iOS:使用Github托管自己本地的项目代码方式一:(Xcode方式:开发工具Xcode配置Git,由Xcode-->Source Control-->Commit)
- 微信公众帐号开发教程第10篇-解析接口中的消息创建时间CreateTime
- 微信公众平台java开发详解(工程代码+解析)
- C/C++代码静态检查工具Cppcheck在VS2008开发环境中的安装配置和使用
- 使用notepad++开发python的配置——代码缩进、自动补齐、运行
- [转]Android通过NDK调用JNI,使用opencv做本地c++代码开发配置方法
- 微信公众平台java开发详解(工程代码+解析)