mirror of
https://github.com/w7corp/easywechat.git
synced 2025-02-02 02:34:22 +00:00
支付通知 wiki
parent
b450c5e98c
commit
977ba69fdc
22
微信支付.md
22
微信支付.md
@ -82,3 +82,25 @@ var WXPayment = function() {
|
|||||||
```
|
```
|
||||||
|
|
||||||
###支付通知
|
###支付通知
|
||||||
|
```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