本文整理汇总了PHP中AlipayNotify::return_verify方法的典型用法代码示例。如果您正苦于以下问题:PHP AlipayNotify::return_verify方法的具体用法?PHP AlipayNotify::return_verify怎么用?PHP AlipayNotify::return_verify使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AlipayNotify
的用法示例。
在下文中一共展示了AlipayNotify::return_verify方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: verifyReturn
public function verifyReturn()
{
$alipayNotify = new AlipayNotify($this->alipay_config);
return $alipayNotify->return_verify();
}
示例2: dirname
<?php
require_once dirname(dirname(dirname(__FILE__))) . '/app.php';
$_input_charset = 'utf-8';
$partner = $INI['alipay']['mid'];
$security_code = $INI['alipay']['sec'];
$sign_type = 'MD5';
$transport = 'http';
/* very import, this value is add by my phpframewrok */
unset($_GET['param']);
/* end */
$alipay = new AlipayNotify($partner, $security_code, $sign_type, $_input_charset, $transport);
$verify_result = $alipay->return_verify();
$out_trade_no = $_GET['out_trade_no'];
//获取订单号
$total_fee = $_GET['total_fee'];
//获取总价格
@(list($_, $order_id, $city_id, $_) = explode('-', $out_trade_no, 4));
if ($verify_result) {
if ($_GET['trade_status'] == 'TRADE_FINISHED' || $_GET['trade_status'] == 'TRADE_SUCCESS') {
$order = Table::Fetch('order', $order_id);
if ($order['state'] == 'unpay') {
//1
$table = new Table('order');
$table->SetPk('id', $order_id);
$table->pay_id = $out_trade_no;
$table->money = $total_fee;
$table->state = 'pay';
$flag = $table->update(array('state', 'pay_id', 'total_fee'));
if ($flag) {
$table = new Table('pay');
示例3: verifyReturn
public function verifyReturn()
{
$notify = new AlipayNotify($this->partner, $this->key, $this->sign_type, $this->_input_charset, $this->transport);
return $notify->return_verify();
}