-
Notifications
You must be signed in to change notification settings - Fork 43
payment_temporary
刘广财 edited this page Apr 4, 2018
·
1 revision
use Itxiao6\Wechat\Payment\Unifiedorder;
use Itxiao6\Wechat\Payment\Qrcode\Temporary;
$unifiedorder = new Unifiedorder('appid', 'mch_id', 'key');
$unifiedorder->set('body', '微信支付测试商品');
$unifiedorder->set('total_fee', 1);
$unifiedorder->set('openid', 'OPENID');
$unifiedorder->set('out_trade_no', date('YmdHis').mt_rand(10000, 99999));
$unifiedorder->set('notify_url', 'http://example.com/your-notify.php');
$qrcode = new Temporary($unifiedorder);
$payurl = $qrcode->getPayurl();HTML
示例中使用的在线二维码生成工具,实际应用中可使用第三方包生成二维码。
<img src="http://qr.liantu.com/api.php?&bg=ffffff&fg=000000&text=<?php echo $payurl; ?>" />- 基础支持
- 网页授权
- 用户管理
- 自定义菜单
- 微信支付
- 消息管理
- 事件