1. Go to this page and download the library: Download xlext/weapp-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/ */
xlext / weapp-php-sdk example snippets
use Xl_WeApp_SDK\App as App;
App::run([
'AppId'=>'', //必填
'AppSecret'=>'', //必填
'Mchid'=>'', //使用支付功能必填
'KEY'=>'', //同上
'NOTIFY_URL'=>'', //支付异步通知
'SSLCERT_PATH'=>'', //支付接口需要签名必填
'SSLKEY_PATH'=>'' //支付接口需要签名必填
]);