diff --git a/README.md b/README.md index 2fe5cef..0da3ecb 100644 --- a/README.md +++ b/README.md @@ -4,26 +4,43 @@ 微信小程序接口 ####配置项 - '', - '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实例 \ No newline at end of file +$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(); + +```