PHP code example of gopayplus / gopay-php-sdk
1. Go to this page and download the library: Download gopayplus/gopay-php-sdk library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
gopayplus / gopay-php-sdk example snippets
$Config = new Config($this->host, $this->mch_id, $this->app_id, $this->secret);
$Transfer = new Transfer($Config);
$order_no = "T010030330202";
$account_name = "李白";
$account_no = "6224121229828888";
$bank_name = "湖北农信";
$bank_code = "PSBC";
$province = "湖北省";
$city = "荆州市";
$amount = 100; //分
$entry_code = EntryType::BANK_CARD.value; // $entry_code = 入账方式: WX_CASH-微信零钱; ALIPAY_CASH-支付宝转账; BANK_CARD-银行卡
$if_code = IfCode::ALIAQFPAY.value; // 安全发
$ip = "";
$remark = "";
$notify_url = "";
$data = $Transfer->transferOrder($if_code, $entry_code,$order_no, $amount, $account_no, $account_name, $bank_name, $ip, $remark, $notify_url);
$Config = new Config("host", "merchant_id", "app_id", "secret");
$Transfer = new Transfer($Config);
$Transfer->query("transfer_id", "out_order_no");
$Config = new Config($this->host, $this->mch_id, $this->app_id, $this->secret);
$Transfer = new Transfer($Config);
$Transfer->balance("aliaqfpay");
$Config = new Config($this->host, $this->mch_id, $this->app_id, $this->secret);
$Transfer = new Transfer($Config);
$Transfer->receipt("transfer_id", "out_order_no");
shell
composer