djlin/wechatpayapi

There is no license information available for the latest version (1.2) of this package.

微信支付api

Installs: 18

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/djlin/wechatpayapi

1.2 2019-01-17 07:24 UTC

This package is auto-updated.

Last update: 2026-01-12 19:57:51 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 关闭订单
  • 持续更新中。。。