djlin / wechatpayapi
There is no license information available for the latest version (1.2) of this package.
微信支付api
1.2
2019-01-17 07:24 UTC
Requires
- php: >=5.3.0
This package is auto-updated.
Last update: 2025-07-12 19:03:09 UTC
README
require __DIR__ . '/vendor/autoload.php';
use Wechatpayapi\Wechatpay;
$mp = array(
'appid'=>'',//微信appid
'mch_id'=>'',//商户号
'key'=>'',//key
);
$w = new Wechatpay($mp);
$data = array(
'body' => '商品描述',
'out_trade_no' => '订单号',
'total_fee' => '金额(分)',
'notify_url' => '回调地址',
);
$res = $w->wechatAppPay($data);
- wechatAppPay APP支付
- wechatXiaoPay 小程序支付
- jsapipay JSAPI支付
- htmlpay H5支付
//查询订单
$data = array(
'out_trade_no' => '订单号',
);
$res = $w->wechatOrderresult($data);
- wechatCloseOrder 关闭订单
- 持续更新中。。。