本文整理汇总了PHP中Wechat::delivernotify方法的典型用法代码示例。如果您正苦于以下问题:PHP Wechat::delivernotify方法的具体用法?PHP Wechat::delivernotify怎么用?PHP Wechat::delivernotify使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Wechat
的用法示例。
在下文中一共展示了Wechat::delivernotify方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: orderWxDeliver
public function orderWxDeliver($num = "")
{
if ($num != "") {
header('Content-Type:text/html;charset=utf-8');
$wetallroute = dirname(dirname(dirname(dirname(dirname(__FILE__)))));
//dump($wetallroute);exit;
include $wetallroute . "/wxpay/config.php";
//dump($config);exit;
include $wetallroute . "/wxpay/lib.php";
//取支付信息
$zhifuhaoArr = M('order_merge')->where(array('orderid' => $num))->find();
$zhifuhao = $zhifuhaoArr['mergeid'];
$payinfoArr = M('wxpay_history')->where(array('out_trade_no' => $zhifuhao))->find();
$parameter = array('appid' => $config['appId'], 'openid' => $payinfoArr['openid'], 'transid' => $payinfoArr['transaction_id'], 'out_trade_no' => $payinfoArr['out_trade_no'], 'deliver_timestamp' => mktime(), 'deliver_status' => '1', 'deliver_msg' => 'ok');
//dump($parameter);exit;
$wechat = new Wechat();
//dump($wechat);exit;
$result = $wechat->delivernotify($config, $parameter);
//dump($result);exit;
if ($result['errcode'] == 0 && $result['errmsg'] == 'ok') {
//成功
return true;
} else {
return false;
}
} else {
return false;
}
}
示例2: Wechat
<?php
/**
* 发货通知
* @author www.linauror.com
* @copyright 2014
*/
include 'config.php';
include 'lib.php';
$wechat = new Wechat();
$parameter = array('appid' => $config['appId'], 'openid' => 'oX99MDgNcgwnz3zFN3DNmo8uwa-w', 'transid' => '111112222233333', 'out_trade_no' => '555666uuu', 'deliver_timestamp' => mktime(), 'deliver_status' => '1', 'deliver_msg' => 'ok');
$result = $wechat->delivernotify($config, $parameter);
if ($result['errcode']) {
// 判断结果
echo 'success';
} else {
print_r($result);
}