|
|
|
@ -6,13 +6,24 @@ require_once "aop/request/AlipayFundTransOrderQueryRequest.php";
|
|
|
|
|
require_once "aop/request/AlipayFundAccountQueryRequest.php";
|
|
|
|
|
|
|
|
|
|
class Fund {
|
|
|
|
|
private $appCertPath = __DIR__ . "/cert/appCertPublicKey_2021001150621489.crt";
|
|
|
|
|
private $alipayCertPath = __DIR__ . "/cert/alipayCertPublicKey_RSA2.crt";
|
|
|
|
|
private $rootCertPath = __DIR__ . "/cert/alipayRootCert.crt";
|
|
|
|
|
private $gatewayUrl = "https://openapi.alipay.com/gateway.do";
|
|
|
|
|
private $appId = "2021001150621489";
|
|
|
|
|
private $alipayUserId = '2088731986604211'; // 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 $appCertPath = __DIR__ . "/cert/appCertPublicKey_2021001150621489.crt";
|
|
|
|
|
public $alipayCertPath = __DIR__ . "/cert/alipayCertPublicKey_RSA2.crt";
|
|
|
|
|
public $rootCertPath = __DIR__ . "/cert/alipayRootCert.crt";
|
|
|
|
|
public $gatewayUrl = "https://openapi.alipay.com/gateway.do";
|
|
|
|
|
public $appId = "";
|
|
|
|
|
public $alipayUserId = ''; // pid
|
|
|
|
|
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='') {
|
|
|
|
|
|
|
|
|
|