├── modules └── gateways │ ├── yzpay.php │ ├── class │ └── yzpay │ │ ├── yzpay.config.php │ │ ├── yzpay.class.php │ │ └── yzpay.link.php │ └── callback │ └── yzpay.php ├── README.md └── LICENSE /modules/gateways/yzpay.php: -------------------------------------------------------------------------------- 1 | '有赞支付(52Fancy)', 10 | 'APIVersion' => '1.1', // Use API Version 1.1 11 | ); 12 | } 13 | 14 | function yzpay_config() 15 | { 16 | require_once __DIR__ ."/class/yzpay/yzpay.config.php"; 17 | $config = new yzpay_config(); 18 | return $config->get_configuration(); 19 | } 20 | 21 | function yzpay_link($params) 22 | { 23 | require_once __DIR__ ."/class/yzpay/yzpay.link.php"; 24 | $link = new yzpay_link(); 25 | return $link->get_paylink($params); 26 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![logo](http://img.yzcdn.cn/public_files/2016/11/29/e585d313de3013698ad95968e2456240.png) 2 | 3 | Whmcs支付网关 - 有赞 4 | ========================= 5 | [主页](https://github.com/52fancy) ◇ [演示站](http://ai666.xyz) ◇ [QQ](http://wpa.qq.com/msgrd?v=3&uin=575798563&site=qq&menu=yes) ◇ [交流QQ群](http://shang.qq.com/wpa/qunwpa?idkey=be0fad3bb9d82603cc491c1b8f51513e647e8eff4f9be752c5cc41d5d5429b4e) 6 | 7 | 基于Whmcs构建的支付网关,帮助中小商户便捷收款。 8 | 9 | 界面截图 10 | ------------ 11 | 12 | 13 | 捐助 14 | ------------ 15 | 16 | 17 | 安装需求 18 | ------------ 19 | * LNMP/LAMP With PHP5.4+ 20 | * curl、openssl扩展 21 | * whmcs5、 whmcs6、 whmcs7版本 22 | 23 | 简要安装说明 24 | ------------ 25 | #### 1.上传文件到服务器 26 | ``` 27 | 直接将modules覆盖到whmcs根目录下开启即可 28 | ``` 29 | 30 | #### 2.开通有赞 31 | ``` 32 | #获取相应的client_id、client_secret、店铺ID写到whmcs支付网关处 33 | 注册教程:https://github.com/52fancy/whmcs-yzpay/wiki/%E6%9C%89%E8%B5%9E%E4%BA%91%E4%BA%A4%E6%98%93API%E5%BC%80%E9%80%9A%E6%95%99%E7%A8%8B 34 | ``` 35 | 36 | #### 3.完成 37 | ``` 38 | 开始愉快的收钱吧! 39 | ``` 40 | 41 | License 42 | ------------ 43 | ![AGPL V3](https://cloud.githubusercontent.com/assets/7392658/20011165/a0caabdc-a2e5-11e6-974c-8d4961c7d6d3.png) 44 | -------------------------------------------------------------------------------- /modules/gateways/class/yzpay/yzpay.config.php: -------------------------------------------------------------------------------- 1 | ["FriendlyName" => "店铺ID", "Type" => "text", "Size" => "34"], 11 | "client_id" => ["FriendlyName" => "client_id", "Type" => "text", "Size" => "34"], 12 | "client_secret" => ["FriendlyName" => "client_secret", "Type" => "text", "Size" => "34"], 13 | "type" => [ 14 | 'FriendlyName' => '', 15 | 'Type' => 'dropdown', 16 | 'Options' => [ 17 | 'yzpay' => "