mirror of
https://github.com/w7corp/easywechat.git
synced 2025-01-22 11:32:08 +00:00
支付通知 wiki
parent
b450c5e98c
commit
977ba69fdc
24
微信支付.md
24
微信支付.md
@ -81,4 +81,26 @@ var WXPayment = function() {
|
|||||||
<button type="button" onclick="WXPayment()">支付 ¥<?php echo ($order->total_fee / 100); ?> 元</button>
|
<button type="button" onclick="WXPayment()">支付 ¥<?php echo ($order->total_fee / 100); ?> 元</button>
|
||||||
```
|
```
|
||||||
|
|
||||||
###支付通知
|
###支付通知
|
||||||
|
```php
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Overtrue\Wechat\Payment\Notify;
|
||||||
|
|
||||||
|
$notify = new Notify(
|
||||||
|
APP_ID,
|
||||||
|
APP_KEY,
|
||||||
|
MCH_ID,
|
||||||
|
MCH_KEY
|
||||||
|
);
|
||||||
|
|
||||||
|
$transaction = $notify->verify();
|
||||||
|
|
||||||
|
if (!$transaction) {
|
||||||
|
$notify->reply('FAIL', 'verify transaction error');
|
||||||
|
}
|
||||||
|
|
||||||
|
var_dump($transaction);
|
||||||
|
|
||||||
|
$notify->reply();
|
||||||
|
```
|
Loading…
Reference in New Issue
Block a user