移除打款配置

master
chenzhi 4 years ago
parent 52419ae22a
commit bbd29dcebb

@ -112,5 +112,6 @@ return array(
'TMPL_EXCEPTION_FILE' => MODULE_PATH.'View/Public/exception.html',// 异常页面的模板文件 'TMPL_EXCEPTION_FILE' => MODULE_PATH.'View/Public/exception.html',// 异常页面的模板文件
/*默认公司名称*/ /*默认公司名称*/
'DEFAULT_COMPANY'=>"海南万盟天下科技有限公司", 'DEFAULT_COMPANY'=>"海南万盟天下科技有限公司",
'WEB_SITE_TITLE'=>"财务打款系统" 'WEB_SITE_TITLE'=>"财务打款系统",
'LOAD_EXT_CONFIG'=>"payconf"
); );

@ -0,0 +1,8 @@
<?php
return array(
"ALI_PAYMENT"=>[
"appId"=>"2021001150621489",
"alipayUserId"=>"2088731986604211",
"rsaPrivateKey"=>'MIIEogIBAAKCAQEAokaztliXge4pDoNWVVdYNSq6N+Be7xNU2LBKANhhdPfSny1VdCBgn7bbuSXA38ubkVZ8xZ/oFcPHa0LMZ5Ki9hRntU+Ry7vJN5kKwqP1CX8rCVWj2Jx2IuTUNdFA1TzCSLV1UMNvIIkFTFnkJUR++YWoQ2EBDYuQsccSbveZ4U5bHf4xopNhQ42a3lwVyuJaBC3q/m4pLVkBIxupP7HSgc3M/ZP0EBHRoq65wHrRsW70A3JPYCmKaw+9W0qeM2fmSXjhU0U7TS1QyyWLwaYgkFZySFscGYVgG6L1dzdVkSbQxlcp/3kEBQXnwTgdODBCdoNrDBZyIteMOlzfZ2MK/QIDAQABAoIBACkqSFJ8fMqgENg2pwL1KlIqaZzdFRgOzlo9tjgqq+ZRK6PniyLvR7OcXnbERf4/l1IyH2q+mtBSntbt1g58G0zTdk9/RNvq4itxblJb50Ame1Nd3zeG0U0ewVp5n7m4NQzew0jemuUk/SwWLZLqok9IAZw+EldOTUFb36g4tVd68Z6uJ5fpUhzMI/HZrFq2wYnH4SwhFJQbHVGadPzB4yWD4jvT4zaAZI1MeXugDjnpRYLIqd5r+fJv2mRbRgDBb2fWW7R+5xaMsZATARkFoXhy0CbZu3fOEELiKPfgxMy4MgqEmJwE7hSg8hD8z63wC03nY2JY5IOY3DdzFZRQo6ECgYEA6sQUO933kW8hHVy0VcI0aLp5LUykl05BEb5MSvKB61ghxZzQDREQNsMlkIggL1ENSW2cNS12yqxeEPdEx89ekJ2gLocOtho5Ufg49rj0wK/fp55Xu412SF06NSSLk636C0j1dK3CP+T3JSH2cBLpqJK9n9moLo2kODDibm2JhEkCgYEAsPQmElDYFMhNIKNmNgLfXimUDPswKLpHyYCfiBMHaArAV+LB6lDynxTsBdFEqbTpXeZiGG0HtlR+YjaCj0ujdKoMaeNY+SCZ+VxsioBAP+SWIj2UKg8Xi6YqW9zQnGZis17CeHCAq27OHz69m8udVk55OlzhTuyI9lEnVc6PqRUCgYAELxptNreC0Ag3Db/pB10HwMsIE6WbTLm8JzgU3d2S5C815mWO1g8D6tZwjPyF21vxQxLVn8nOMuQ6SS3gocF9slF4gs+wTydWXqYlP4adKIVD536IySyifYbcC5qxNxiNuu8k9TPRD7OX5dMOjEe9yV+3yZlFuyCCH9zpOuqIgQKBgHu8/rJoHfHKb0SXfm3ebFvoL0M0k2SnfnOFogkBZXh3rDDIvFkh6cccVj9rKtyRSW8EHyx9cZsqUoZTH9EcT1zRXITfGeR7y6/31V60eDk1m1auQOF4VDqvI4fBTY9QeUx8wvh9kzxN640lzmkXZRppHZSWRmduOAgmj58NJqBRAoGAY0qXaL0nDAehVpoxVUDmFdPuallq9oEz5z5Q29A0IXm/dHkbbHEtEdE/MU9WPn3yOIwwGkF21q3cormt4oyi2ro4OlFSKmpQzMtg/I5Tj5XbOz13FYA60IhjYwqZ2pW/l8oEg6ZAIo2vNSjqJudQS/16Q8xu8Gxzl9E9e3LZBeE='
]
);

@ -307,7 +307,7 @@ class ExcelPaymentController extends BaseController
} }
public function getAccountMoney(){ public function getAccountMoney(){
Vendor("Alipay2020/Fund"); Vendor("Alipay2020/Fund");
$fund = new \Fund(); $fund = new \Fund(C("ALI_PAYMENT"));
$money = $fund->account(); $money = $fund->account();
if($money !== -1){ if($money !== -1){
$money = $money['amount']; $money = $money['amount'];
@ -333,7 +333,7 @@ class ExcelPaymentController extends BaseController
$remark = $_REQUEST['remark']; $remark = $_REQUEST['remark'];
Vendor("Alipay2020/Fund"); Vendor("Alipay2020/Fund");
$fund = new \Fund(); $fund = new \Fund(C("ALI_PAYMENT"));
$dbres = M("ExcelStatementInfo","tab_")->where("id='{$id}'")->find(); $dbres = M("ExcelStatementInfo","tab_")->where("id='{$id}'")->find();
$company_info = json_decode($dbres['company_info'],true); $company_info = json_decode($dbres['company_info'],true);

@ -406,7 +406,7 @@ class PaymentController extends BaseController
} }
public function getAccountMoney(){ public function getAccountMoney(){
Vendor("Alipay2020/Fund"); Vendor("Alipay2020/Fund");
$fund = new \Fund(); $fund = new \Fund(C("ALI_PAYMENT"));
$money = $fund->account(); $money = $fund->account();
if($money !== -1){ if($money !== -1){
$money = $money['amount']; $money = $money['amount'];
@ -433,6 +433,7 @@ class PaymentController extends BaseController
Vendor("Alipay2020/Fund"); Vendor("Alipay2020/Fund");
$fund = new \Fund(); $fund = new \Fund();
$fund->setInitConf(C("ALI_PAYMENT"));
$dbres = M("company_statement_info","tab_")->where("id='{$id}'")->find(); $dbres = M("company_statement_info","tab_")->where("id='{$id}'")->find();
$company_info = json_decode($dbres['company_info'],true); $company_info = json_decode($dbres['company_info'],true);

@ -6,13 +6,24 @@ require_once "aop/request/AlipayFundTransOrderQueryRequest.php";
require_once "aop/request/AlipayFundAccountQueryRequest.php"; require_once "aop/request/AlipayFundAccountQueryRequest.php";
class Fund { class Fund {
private $appCertPath = __DIR__ . "/cert/appCertPublicKey_2021001150621489.crt"; public $appCertPath = __DIR__ . "/cert/appCertPublicKey_2021001150621489.crt";
private $alipayCertPath = __DIR__ . "/cert/alipayCertPublicKey_RSA2.crt"; public $alipayCertPath = __DIR__ . "/cert/alipayCertPublicKey_RSA2.crt";
private $rootCertPath = __DIR__ . "/cert/alipayRootCert.crt"; public $rootCertPath = __DIR__ . "/cert/alipayRootCert.crt";
private $gatewayUrl = "https://openapi.alipay.com/gateway.do"; public $gatewayUrl = "https://openapi.alipay.com/gateway.do";
private $appId = "2021001150621489"; public $appId = "";
private $alipayUserId = '2088731986604211'; // pid public $alipayUserId = ''; // pid
private $rsaPrivateKey = 'MIIEogIBAAKCAQEAokaztliXge4pDoNWVVdYNSq6N+Be7xNU2LBKANhhdPfSny1VdCBgn7bbuSXA38ubkVZ8xZ/oFcPHa0LMZ5Ki9hRntU+Ry7vJN5kKwqP1CX8rCVWj2Jx2IuTUNdFA1TzCSLV1UMNvIIkFTFnkJUR++YWoQ2EBDYuQsccSbveZ4U5bHf4xopNhQ42a3lwVyuJaBC3q/m4pLVkBIxupP7HSgc3M/ZP0EBHRoq65wHrRsW70A3JPYCmKaw+9W0qeM2fmSXjhU0U7TS1QyyWLwaYgkFZySFscGYVgG6L1dzdVkSbQxlcp/3kEBQXnwTgdODBCdoNrDBZyIteMOlzfZ2MK/QIDAQABAoIBACkqSFJ8fMqgENg2pwL1KlIqaZzdFRgOzlo9tjgqq+ZRK6PniyLvR7OcXnbERf4/l1IyH2q+mtBSntbt1g58G0zTdk9/RNvq4itxblJb50Ame1Nd3zeG0U0ewVp5n7m4NQzew0jemuUk/SwWLZLqok9IAZw+EldOTUFb36g4tVd68Z6uJ5fpUhzMI/HZrFq2wYnH4SwhFJQbHVGadPzB4yWD4jvT4zaAZI1MeXugDjnpRYLIqd5r+fJv2mRbRgDBb2fWW7R+5xaMsZATARkFoXhy0CbZu3fOEELiKPfgxMy4MgqEmJwE7hSg8hD8z63wC03nY2JY5IOY3DdzFZRQo6ECgYEA6sQUO933kW8hHVy0VcI0aLp5LUykl05BEb5MSvKB61ghxZzQDREQNsMlkIggL1ENSW2cNS12yqxeEPdEx89ekJ2gLocOtho5Ufg49rj0wK/fp55Xu412SF06NSSLk636C0j1dK3CP+T3JSH2cBLpqJK9n9moLo2kODDibm2JhEkCgYEAsPQmElDYFMhNIKNmNgLfXimUDPswKLpHyYCfiBMHaArAV+LB6lDynxTsBdFEqbTpXeZiGG0HtlR+YjaCj0ujdKoMaeNY+SCZ+VxsioBAP+SWIj2UKg8Xi6YqW9zQnGZis17CeHCAq27OHz69m8udVk55OlzhTuyI9lEnVc6PqRUCgYAELxptNreC0Ag3Db/pB10HwMsIE6WbTLm8JzgU3d2S5C815mWO1g8D6tZwjPyF21vxQxLVn8nOMuQ6SS3gocF9slF4gs+wTydWXqYlP4adKIVD536IySyifYbcC5qxNxiNuu8k9TPRD7OX5dMOjEe9yV+3yZlFuyCCH9zpOuqIgQKBgHu8/rJoHfHKb0SXfm3ebFvoL0M0k2SnfnOFogkBZXh3rDDIvFkh6cccVj9rKtyRSW8EHyx9cZsqUoZTH9EcT1zRXITfGeR7y6/31V60eDk1m1auQOF4VDqvI4fBTY9QeUx8wvh9kzxN640lzmkXZRppHZSWRmduOAgmj58NJqBRAoGAY0qXaL0nDAehVpoxVUDmFdPuallq9oEz5z5Q29A0IXm/dHkbbHEtEdE/MU9WPn3yOIwwGkF21q3cormt4oyi2ro4OlFSKmpQzMtg/I5Tj5XbOz13FYA60IhjYwqZ2pW/l8oEg6ZAIo2vNSjqJudQS/16Q8xu8Gxzl9E9e3LZBeE='; public $rsaPrivateKey = '';
public $is_init = false;
public function __construct($config)
{
if(empty($config)){
return false;
}
$this->appId = $config['appId'];
$this->alipayUserId = $config['alipayUserId'];
$this->rsaPrivateKey = $config['rsaPrivateKey'];
$this->is_init = true;
}
public function transfer($aliAccount, $realName, $orderId, $amount, $title='') { public function transfer($aliAccount, $realName, $orderId, $amount, $title='') {

Loading…
Cancel
Save