add clear
This commit is contained in:
@@ -4,26 +4,43 @@
|
|||||||
微信小程序接口
|
微信小程序接口
|
||||||
|
|
||||||
####配置项
|
####配置项
|
||||||
<?php
|
|
||||||
$config = [
|
|
||||||
'app_id' => '',
|
|
||||||
'mch_id' => '',
|
|
||||||
'device_info'' => 'WEB',
|
|
||||||
'nonce_str' => '',
|
|
||||||
'body'' => '!',
|
|
||||||
'out_trade_no' => "",
|
|
||||||
'total_fee' => 0,
|
|
||||||
'spbill_create_ip' => "",
|
|
||||||
'notify_url' => "",
|
|
||||||
'trade_type'' => 'JSAPI',
|
|
||||||
'sign_type'' => 'MD5',
|
|
||||||
'mch_host'' => 'https://api.mch.weixin.qq.com',
|
|
||||||
'app_secret' => '',
|
|
||||||
'ssl_cert' => '',
|
|
||||||
'ssl_key' => '',
|
|
||||||
'key' => ''
|
|
||||||
]
|
|
||||||
|
|
||||||
$data = \wchat\Recharge::call( __DIR__.'/config.php');
|
```php
|
||||||
|
|
||||||
其中$data返回 Recharge实例
|
$config = new \wchat\Config();
|
||||||
|
$config->setAppid('');
|
||||||
|
$config->setAppsecret('');
|
||||||
|
$config->setMchId('');
|
||||||
|
$config->setKey('');
|
||||||
|
$config->setRemoteAddr('');
|
||||||
|
$config->setDeviceInfo('');
|
||||||
|
$config->setAccessToken('');
|
||||||
|
|
||||||
|
|
||||||
|
$instance = \wchat\Wx::getMiniProGaRamPage();
|
||||||
|
$instance->setConfig($config);
|
||||||
|
|
||||||
|
$recharge = $instance->getRecharge();
|
||||||
|
$recharge->cashWithdrawal(1, 'xxx', 'ooo');
|
||||||
|
$recharge->recharge(1, '', '');
|
||||||
|
|
||||||
|
$account = $instance->getAccount();
|
||||||
|
$account->setSavePath('');
|
||||||
|
$account->login('');
|
||||||
|
$account->createwxaqrcode('pages/index/index',200);
|
||||||
|
$account->getwxacode('pages/index/index',150,true);
|
||||||
|
$account->getwxacodeunlimit('pages/index/index',150,true);
|
||||||
|
|
||||||
|
|
||||||
|
$message = $instance->getMessage();
|
||||||
|
$message->setOpenid('');
|
||||||
|
$message->sendCardNews('');
|
||||||
|
|
||||||
|
$template = $instance->getTemplate();
|
||||||
|
$template->setOpenId('');
|
||||||
|
$template->setFormId('');
|
||||||
|
$template->setTemplateId('');
|
||||||
|
$template->setPage('');
|
||||||
|
$template->sendTemplate();
|
||||||
|
|
||||||
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user