当前位置: 首页>>代码示例>>PHP>>正文


PHP payment_paid函数代码示例

本文整理汇总了PHP中payment_paid函数的典型用法代码示例。如果您正苦于以下问题:PHP payment_paid函数的具体用法?PHP payment_paid怎么用?PHP payment_paid使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了payment_paid函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: direct_pay

 public function direct_pay($ecv_sn, $ecv_password, $payment_notice_id)
 {
     $rs = payment_paid($payment_notice_id);
     if ($rs) {
         $GLOBALS['db']->query("update " . DB_PREFIX . "ecv set use_count = use_count + 1 where sn = '" . $ecv_sn . "' and password = '" . $ecv_password . "'");
     }
 }
开发者ID:dalinhuang,项目名称:zsh_business,代码行数:7,代码来源:Voucher_payment.php

示例2: get_payment_code

 public function get_payment_code($payment_notice_id)
 {
     $rs = payment_paid($payment_notice_id);
     if ($rs) {
         $payment_notice = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "payment_notice where id = " . $payment_notice_id);
         $order_sn = $GLOBALS['db']->getOne("select order_sn from " . DB_PREFIX . "deal_order where id = " . $payment_notice['order_id']);
         require_once APP_ROOT_PATH . "system/model/user.php";
         $msg = sprintf('%s订单付款,付款单号%s', $order_sn, $payment_notice['notice_sn']);
         modify_account(array('money' => "-" . $payment_notice['money'], 'score' => 0), $payment_notice['user_id'], $msg);
     }
 }
开发者ID:macall,项目名称:jsd,代码行数:11,代码来源:Account_payment.php

示例3: response

 public function response($request)
 {
     $return_res = array('info' => '', 'status' => false);
     $payment = $GLOBALS['db']->getRow("select id,config from " . DB_PREFIX . "payment where class_name='Yeepay'");
     $payment['config'] = unserialize($payment['config']);
     /* 检查数字签名是否正确 */
     $merchant_id = $payment['config']['yeepay_account'];
     // 获取商户编号
     $merchant_key = $payment['config']['yeepay_key'];
     // 获取秘钥
     $message_type = trim($request['r0_Cmd']);
     $succeed = trim($request['r1_Code']);
     // 获取交易结果,1成功,-1失败
     $trxId = trim($request['r2_TrxId']);
     //易宝的交易流水号
     $amount = trim($request['r3_Amt']);
     // 获取订单金额
     $cur = trim($request['r4_Cur']);
     // 获取订单货币单位
     $product_id = trim($request['r5_Pid']);
     // 获取产品ID
     $orderid = trim($request['r6_Order']);
     // 获取订单ID
     $userId = trim($request['r7_Uid']);
     // 获取产品ID
     $merchant_param = trim($request['r8_MP']);
     // 获取商户私有参数
     $bType = trim($request['r9_BType']);
     // 获取订单ID
     $mac = trim($request['hmac']);
     // 获取安全加密串
     ///生成加密串,注意顺序
     $ScrtStr = $merchant_id . $message_type . $succeed . $trxId . $amount . $cur . $product_id . $orderid . $userId . $merchant_param . $bType;
     $mymac = $this->HmacMd5($ScrtStr, $merchant_key);
     $payment_notice_sn = $orderid;
     $money = $amount;
     $outer_notice_sn = $trxId;
     if (strtoupper($mac) == strtoupper($mymac)) {
         if ($succeed == "1") {
             $payment_notice = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "payment_notice where notice_sn = '" . $payment_notice_sn . "'");
             require_once APP_ROOT_PATH . "system/libs/cart.php";
             $rs = payment_paid($payment_notice['id'], $outer_notice_sn);
             $is_paid = intval($GLOBALS['db']->getOne("select is_paid from " . DB_PREFIX . "payment_notice where id = '" . intval($payment_notice['id']) . "'"));
             if ($is_paid == 1) {
                 if ($bType == "2") {
                     echo "success";
                     exit;
                 }
                 app_redirect(url("index", "payment#incharge_done", array("id" => $payment_notice['id'])));
                 //支付成功
             } else {
                 app_redirect(url("index", "payment#pay", array("id" => $payment_notice['id'])));
             }
         } else {
             showErr($GLOBALS['payment_lang']["PAY_FAILED"]);
         }
     } else {
         showErr($GLOBALS['payment_lang']["PAY_FAILED"]);
     }
 }
开发者ID:norain2050,项目名称:fanwei_xindai_3.2,代码行数:60,代码来源:Yeepay_payment.php

示例4: update

 public function update()
 {
     $notice_id = intval($_REQUEST['id']);
     $outer_notice_sn = strim($_REQUEST['outer_notice_sn']);
     $bank_id = strim($_REQUEST['bank_id']);
     //开始由管理员手动收款
     require_once APP_ROOT_PATH . "system/libs/cart.php";
     $payment_notice = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "payment_notice where id = " . $notice_id);
     if ($payment_notice['is_paid'] == 0) {
         //			if($bank_id)
         //			{
         //				$GLOBALS['db']->query("update ".DB_PREFIX."payment_notice set  bank_id = ".$bank_id." where id = ".$notice_id." and is_paid = 0");
         //			}else{
         //				//$this->error ("请输入直联银行编号");
         //			}
         payment_paid($notice_id, "订单号 " . ':' . $payment_notice['notice_sn']);
         //对其中一条款支付的付款单付款
         $msg = sprintf(l("ADMIN_PAYMENT_PAID"), $payment_notice['notice_sn']);
         save_log($msg, 1);
         $this->success(l("ORDER_PAID_SUCCESS"));
     } else {
         $this->error(l("INVALID_OPERATION"));
     }
 }
开发者ID:neteasy-work,项目名称:fanwei_xindai_3.2,代码行数:24,代码来源:PaymentNoticeAction.class.php

示例5: notify

 public function notify($request)
 {
     $payment = $GLOBALS['db']->getRow("select id,config from " . DB_PREFIX . "payment where class_name='Chinabank'");
     $payment['config'] = unserialize($payment['config']);
     $v_oid = trim($request['v_oid']);
     $v_idx = trim($request['v_idx']);
     $v_pstatus = trim($request['v_pstatus']);
     $v_amount = trim($request['v_amount']);
     $v_moneytype = trim($request['v_moneytype']);
     $v_md5str = trim($request['v_md5str']);
     $outer_notice_sn = $v_idx;
     //开始初始化参数
     $payment_notice_id = $v_oid;
     $money = $v_amount;
     $payment_id = $payment['id'];
     /**
      * 重新计算md5的值
      */
     $key = $payment['config']['chinabank_key'];
     $md5string = strtoupper(md5($v_oid . $v_pstatus . $v_amount . $v_moneytype . $key));
     if ($v_md5str == $md5string && $v_pstatus == '20') {
         $payment_notice = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "payment_notice where notice_sn = '" . $payment_notice_id . "'");
         require_once APP_ROOT_PATH . "system/libs/cart.php";
         $rs = payment_paid($payment_notice['notice_sn'], $outer_notice_sn);
         echo "ok";
     } else {
         echo 'error';
     }
 }
开发者ID:myjavawork,项目名称:sanxin-fangwei,代码行数:29,代码来源:Chinabank_payment.php

示例6: notify

 public function notify($request)
 {
     $payment = $GLOBALS['db']->getRow("select id,config from " . DB_PREFIX . "payment where class_name='Paypal'");
     $payment['config'] = unserialize($payment['config']);
     $merchant_id = $payment['config']['paypal_account'];
     // assign posted variables to local variables
     $item_name = $request['item_name'];
     $item_number = $request['item_number'];
     $payment_status = $request['payment_status'];
     $payment_amount = floatval($request['mc_gross']);
     $payment_currency = $request['mc_currency'];
     $txn_id = $request['txn_id'];
     $receiver_email = $request['receiver_email'];
     $payer_email = $request['payer_email'];
     $data_id = $request['invoice'];
     //开始初始化参数
     $payment_notice_sn = $data_id;
     $money = $payment_amount;
     $payment_notice = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "payment_notice where notice_sn = '" . $payment_notice_sn . "'");
     $order_info = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "deal_order where id = " . $payment_notice['order_id']);
     if ($payment_status != 'Completed' && $payment_status != 'Pending') {
         echo 0;
     } elseif ($receiver_email != $merchant_id) {
         echo 0;
     } elseif (abs($payment_notice['money'] * $payment['config']['paypal_rate'] - $payment_amount) > 0.008999999999999999) {
         echo 0;
     } elseif ($payment['config']['paypal_currency'] != $payment_currency) {
         echo 0;
     } else {
         require_once APP_ROOT_PATH . "system/libs/cart.php";
         $rs = payment_paid($payment_notice['id'], $txn_id);
         if ($rs) {
             $rs = order_paid($payment_notice['order_id']);
             echo 1;
         } else {
             echo 0;
         }
     }
 }
开发者ID:norain2050,项目名称:fanwei_xindai_3.2,代码行数:39,代码来源:Paypal_payment.php

示例7: notify

 public function notify($request)
 {
     $return_res = array('info' => '', 'status' => false);
     /* 取返回参数 */
     $MemberID = $request['MemberID'];
     //商户号
     $TerminalID = $request['TerminalID'];
     //商户终端号
     $TransID = $request['TransID'];
     //商户流水号
     $Result = $request['Result'];
     //支付结果
     $ResultDesc = $request['ResultDesc'];
     //支付结果描述
     $FactMoney = $request['FactMoney'];
     //实际成功金额
     $AdditionalInfo = $request['AdditionalInfo'];
     //订单附加消息
     $SuccTime = $request['SuccTime'];
     //支付完成时间
     $Md5Sign = $request['Md5Sign'];
     //md5签名
     /*获取支付信息*/
     $payment = $GLOBALS['db']->getRow("select id,config from " . DB_PREFIX . "payment where class_name='Bfwap'");
     $payment['config'] = unserialize($payment['config']);
     $_Md5Key = $payment['config']['baofoo_key'];
     $payment_notice_sn = intval($AdditionalInfo);
     $gopayOutOrderId = $TransID;
     $MARK = "~|~";
     /*比对连接加密字符串*/
     $WaitSign = md5('MemberID=' . $MemberID . $MARK . 'TerminalID=' . $TerminalID . $MARK . 'TransID=' . $TransID . $MARK . 'Result=' . $Result . $MARK . 'ResultDesc=' . $ResultDesc . $MARK . 'FactMoney=' . $FactMoney . $MARK . 'AdditionalInfo=' . $AdditionalInfo . $MARK . 'SuccTime=' . $SuccTime . $MARK . 'Md5Sign=' . $_Md5Key);
     if ($Md5Sign != $WaitSign) {
         echo "Md5CheckFail";
     } else {
         $payment_notice = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "payment_notice where id = '" . $payment_notice_sn . "'");
         $order_info = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "deal_order where id = " . $payment_notice['order_id']);
         require_once APP_ROOT_PATH . "system/libs/cart.php";
         $rs = payment_paid($payment_notice['id'], $gopayOutOrderId);
         if ($rs) {
             $rs = order_paid($payment_notice['order_id']);
             if ($rs) {
                 //开始更新相应的outer_notice_sn
                 //$GLOBALS['db']->query("update ".DB_PREFIX."payment_notice set outer_notice_sn = '".$gopayOutOrderId."' where id = ".$payment_notice['id']);
                 echo "OK";
             } else {
                 echo "OK";
             }
         } else {
             echo "OrderFail";
         }
     }
 }
开发者ID:norain2050,项目名称:fanwei_xindai_3.2,代码行数:52,代码来源:Bfwap_payment.php

示例8: notify

 public function notify($request)
 {
     unset($request['city']);
     unset($request['ctl']);
     unset($request['act']);
     unset($request['class_name']);
     unset($_POST['city']);
     unset($_POST['ctl']);
     unset($_POST['act']);
     unset($_POST['class_name']);
     $upop_evn = $this->upop_evn;
     $return_res = array('info' => '', 'status' => false);
     $payment = $GLOBALS['db']->getRow("select id,config from " . DB_PREFIX . "payment where class_name='Upop'");
     $payment['config'] = unserialize($payment['config']);
     // 商户名称
     quickpay_conf::$pay_params['merAbbr'] = $payment['config']['upop_merAbbr'];
     foreach (Upop_payment::$api_url[$upop_evn] as $key => $value) {
         quickpay_conf::${$key} = $value;
     }
     if ($upop_evn == '2') {
         quickpay_conf::$security_key = $payment['config']['upop_security_key'];
         quickpay_conf::$pay_params['merId'] = $payment['config']['upop_account'];
     } else {
         if ($upop_evn == '1') {
             quickpay_conf::$security_key = $payment['config']['upop_security_key_pm'];
             quickpay_conf::$pay_params['merId'] = $payment['config']['upop_account_pm'];
         } else {
             if ($upop_evn == '0') {
                 quickpay_conf::$security_key = $payment['upop_security_key'];
                 quickpay_conf::$pay_params['merId'] = $payment['upop_account'];
             }
         }
     }
     try {
         $response = new quickpay_service($request, quickpay_conf::RESPONSE);
         if ($response->get('respCode') != quickpay_service::RESP_SUCCESS) {
             $err = sprintf("Error: %d => %s", $response->get('respCode'), $response->get('respMsg'));
             showErr($err);
         }
         $arr_ret = $response->get_args();
         if (quickpay_conf::$pay_params['merId'] != $arr_ret['merId']) {
             echo "fail";
             die;
         }
         // 如果未支付成功。
         if ($arr_ret['respCode'] != '00') {
             echo "fail";
             die;
         }
         //告诉用户交易完成
         $payment_notice_sn = $arr_ret['orderNumber'];
         $outer_notice_sn = $arr_ret['orderNumber'];
         $payment_notice = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "payment_notice where notice_sn = '" . $payment_notice_sn . "'");
         $order_info = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "deal_order where id = " . $payment_notice['order_id']);
         require_once APP_ROOT_PATH . "system/model/cart.php";
         $rs = payment_paid($payment_notice['id']);
         if ($rs) {
             $rs = order_paid($payment_notice['order_id']);
             if ($rs) {
                 //开始更新相应的outer_notice_sn
                 $GLOBALS['db']->query("update " . DB_PREFIX . "payment_notice set outer_notice_sn = '" . $outer_notice_sn . "' where id = " . $payment_notice['id']);
                 echo "Success";
             } else {
                 echo "Success";
             }
         } else {
             app_redirect(url("index", "payment#pay", array("id" => $payment_notice['id'])));
         }
     } catch (Exception $exp) {
         $str .= var_export($exp, true);
         echo "fail";
     }
 }
开发者ID:macall,项目名称:jsd,代码行数:73,代码来源:Upop_payment.php

示例9: notify

 public function notify($request)
 {
     $return_res = array('info' => '', 'status' => false);
     $payment = $GLOBALS['db']->getRow("select id,config from " . DB_PREFIX . "payment where class_name='Sdo'");
     $payment['config'] = unserialize($payment['config']);
     //获取参数
     $_amount = $request["Amount"];
     //订单金额
     $_payAmount = $request["PayAmount"];
     //实际支付金额
     $_orderNo = $request["OrderNo"];
     //商户订单号
     $_serialNo = $request["serialno"];
     //支付序列号
     $_status = $request["Status"];
     //支付状态 "01"表示成功
     $_merchantNo = $request["MerchantNo"];
     //商户号
     $_payChannel = $request["PayChannel"];
     //实际支付渠道
     $_discount = $request["Discount"];
     //实际折扣率
     $_signType = $request["SignType"];
     //签名方式。1-RSA 2-Md5
     $_payTime = $request["PayTime"];
     //支付时间
     $_currencyType = $request["CurrencyType"];
     //货币类型
     $_productNo = $request["ProductNo"];
     //产品编号
     $_productDesc = $request["ProductDesc"];
     //产品描述
     $_remark1 = $request["Remark1"];
     //产品备注1
     $_remark2 = $request["Remark2"];
     //产品备注2
     $_exInfo = $request["ExInfo"];
     //额外的返回信息
     $_mac = $request["MAC"];
     //签名字符串
     $verifyResult = $this->verifySign($_amount, $_payAmount, $_orderNo, $_serialNo, $_status, $_merchantNo, $_payChannel, $_discount, $_signType, $_payTime, $_currencyType, $_productNo, $_productDesc, $_remark1, $_remark2, $_exInfo, $payment['config']['sdo_key']);
     if (strtoupper($verifyResult) == strtoupper($_mac)) {
         $payment_log_id = intval($_orderNo);
         $payment_notice = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "payment_notice where id = '" . $payment_log_id . "'");
         $order_info = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "deal_order where id = " . $payment_notice['order_id']);
         require_once APP_ROOT_PATH . "system/libs/cart.php";
         $GLOBALS['db']->query("update " . DB_PREFIX . "payment_notice set outer_notice_sn = '" . $_serialNo . "' where id = " . $payment_notice['id']);
         $rs = payment_paid($payment_notice['id']);
         if ($rs) {
             $rs = order_paid($payment_notice['order_id']);
             if ($rs) {
                 if ($order_info['type'] == 0) {
                     app_redirect(url("shop", "payment#done", array("id" => $payment_notice['order_id'])));
                 } else {
                     app_redirect(url("shop", "payment#incharge_done", array("id" => $payment_notice['order_id'])));
                 }
                 //支付成功
             } else {
                 if ($order_info['pay_status'] == 2) {
                     if ($order_info['type'] == 0) {
                         app_redirect(url("shop", "payment#done", array("id" => $payment_notice['order_id'])));
                     } else {
                         app_redirect(url("shop", "payment#incharge_done", array("id" => $payment_notice['order_id'])));
                     }
                     //支付成功
                 } else {
                     app_redirect(url("shop", "payment#pay", array("id" => $payment_notice['id'])));
                 }
             }
         } else {
             app_redirect(url("shop", "payment#pay", array("id" => $payment_notice['id'])));
         }
     } else {
         showErr($GLOBALS['payment_lang']["PAY_FAILED"]);
     }
 }
开发者ID:dalinhuang,项目名称:zsh_business,代码行数:76,代码来源:Sdo_payment.php

示例10: paraFilter

$key = "jz";
//干扰码:jz
$notice_sn = $_REQUEST['apporderid'];
$trade_no = $_REQUEST['order_id'];
$sign = $_REQUEST['sign'];
//除去待签名参数数组中的空值和签名参数
$para_filter = paraFilter($_REQUEST);
//对待签名参数数组排序
$para_sort = argSort($para_filter);
//生成签名结果
$sign_str = createLinkstring($para_sort);
$mysign = md5($sign_str . $key);
/*
$sign_str = $amount.$apporderid.$order_id;
$mysign = md5($sing_str.$key);
*/
if ($sign == $mysign) {
    $apporderid = $_REQUEST['apporderid'];
    $payment_notice = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "payment_notice where notice_sn = '" . $notice_sn . "'");
    require_once APP_ROOT_PATH . "system/libs/cart.php";
    $rs = payment_paid($notice_sn, $trade_no);
    if ($rs) {
        $GLOBALS['db']->query("update " . DB_PREFIX . "payment_notice set outer_notice_sn = '" . $trade_no . "' where id = " . $payment_notice['id']);
    }
    $url = APP_ROOT . "/../wap/index.php?ctl=cart&act=pay_result&id=" . $payment_notice['id'];
    app_redirect($url);
} else {
    //验证失败
    $url = APP_ROOT . "/../wap/index.php?ctl=cart&act=pay_result";
    app_redirect($url);
}
开发者ID:myjavawork,项目名称:sanxin-fangwei,代码行数:31,代码来源:notify_url.php

示例11: incharge

 public function incharge()
 {
     $id = intval($_REQUEST['id']);
     $order_info = M("DealOrder")->getById($id);
     if ($order_info) {
         if ($order_info['order_status'] == 0) {
             $result = pay_order($order_info['id']);
             $money = $result['money'];
             $payment_notice['create_time'] = get_gmtime();
             $payment_notice['user_id'] = $order_info['user_id'];
             $payment_notice['payment_id'] = 0;
             $payment_notice['money'] = $money;
             $payment_notice['bank_id'] = "";
             $payment_notice['order_id'] = $order_info['id'];
             $payment_notice['memo'] = "管理员收款";
             $payment_notice['deal_id'] = $order_info['deal_id'];
             $payment_notice['deal_item_id'] = $order_info['deal_item_id'];
             $payment_notice['deal_name'] = $order_info['deal_name'];
             do {
                 $payment_notice['notice_sn'] = to_date(get_gmtime(), "Ymd") . rand(100, 999);
                 $GLOBALS['db']->autoExecute(DB_PREFIX . "payment_notice", $payment_notice, "INSERT", "", "SILENT");
                 $notice_id = $GLOBALS['db']->insert_id();
             } while ($notice_id == 0);
             require_once APP_ROOT_PATH . "system/libs/cart.php";
             $rs = payment_paid($payment_notice['notice_sn'], "");
             $this->error("收款完成");
         } else {
             $this->error("已经付过款");
         }
     } else {
         $this->error("没有该项目的支持");
     }
 }
开发者ID:xcdxcd,项目名称:zhongchou,代码行数:33,代码来源:DealOrderAction.class.php

示例12: notify


//.........这里部分代码省略.........
     $errorCode = $request['errorCode'];
     $returnDatetime = $request['returnDatetime'];
     $signMsg = $request["signMsg"];
     $bufSignSrc = "";
     if ($merchantId != "") {
         $bufSignSrc = $bufSignSrc . "merchantId=" . $merchantId . "&";
     }
     if ($version != "") {
         $bufSignSrc = $bufSignSrc . "version=" . $version . "&";
     }
     if ($language != "") {
         $bufSignSrc = $bufSignSrc . "language=" . $language . "&";
     }
     if ($signType != "") {
         $bufSignSrc = $bufSignSrc . "signType=" . $signType . "&";
     }
     if ($payType != "") {
         $bufSignSrc = $bufSignSrc . "payType=" . $payType . "&";
     }
     if ($issuerId != "") {
         $bufSignSrc = $bufSignSrc . "issuerId=" . $issuerId . "&";
     }
     if ($paymentOrderId != "") {
         $bufSignSrc = $bufSignSrc . "paymentOrderId=" . $paymentOrderId . "&";
     }
     if ($orderNo != "") {
         $bufSignSrc = $bufSignSrc . "orderNo=" . $orderNo . "&";
     }
     if ($orderDatetime != "") {
         $bufSignSrc = $bufSignSrc . "orderDatetime=" . $orderDatetime . "&";
     }
     if ($orderAmount != "") {
         $bufSignSrc = $bufSignSrc . "orderAmount=" . $orderAmount . "&";
     }
     if ($payDatetime != "") {
         $bufSignSrc = $bufSignSrc . "payDatetime=" . $payDatetime . "&";
     }
     if ($payAmount != "") {
         $bufSignSrc = $bufSignSrc . "payAmount=" . $payAmount . "&";
     }
     if ($ext1 != "") {
         $bufSignSrc = $bufSignSrc . "ext1=" . $ext1 . "&";
     }
     if ($ext2 != "") {
         $bufSignSrc = $bufSignSrc . "ext2=" . $ext2 . "&";
     }
     if ($payResult != "") {
         $bufSignSrc = $bufSignSrc . "payResult=" . $payResult . "&";
     }
     if ($errorCode != "") {
         $bufSignSrc = $bufSignSrc . "errorCode=" . $errorCode . "&";
     }
     if ($returnDatetime != "") {
         $bufSignSrc = $bufSignSrc . "returnDatetime=" . $returnDatetime;
     }
     /*
     //验签
     //解析publickey.txt文本获取公钥信息
     $publickeycontent = trim($payment['config']['public_key']);
     //echo "<br>".$content;
     $publickeyarray = explode(PHP_EOL, $publickeycontent);
     $publickey = explode('=',$publickeyarray[0]);
     $modulus = explode('=',$publickeyarray[1]);
     //echo "<br>publickey=".$publickey[1];
     //echo "<br>modulus=".$modulus[1];
     */
     $publickey = trim($payment['config']['public_exponent']);
     $modulus = trim($payment['config']['public_modulus']);
     require_once APP_ROOT_PATH . "system/payment/Allinpay/php_rsa.php";
     $keylength = 1024;
     //验签结果
     //$verifyResult = rsa_verify($bufSignSrc,$signMsg, $publickey[1], $modulus[1], $keylength,"sha1");
     $verifyResult = rsa_verify($bufSignSrc, $signMsg, $publickey, $modulus, $keylength, "sha1");
     /*
     echo 'bufSignSrc:'.$bufSignSrc."<br>";
     	echo 'signMsg:'.$signMsg."<br>";
     	echo 'publickey:'.$publickey."<br>";
     	echo 'modulus:'.$modulus."<br>";
     	
     	if($verifyResult){	
     echo "报文验签成功!";
     	}else{
     echo "报文验签失败!";
     	}
     	exit;
     */
     if ($verifyResult) {
         $payment_notice = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "payment_notice where notice_sn = '" . $orderNo . "'");
         require_once APP_ROOT_PATH . "system/libs/cart.php";
         $rs = payment_paid($payment_notice['id'], $paymentOrderId);
         $is_paid = intval($GLOBALS['db']->getOne("select is_paid from " . DB_PREFIX . "payment_notice where id = '" . intval($payment_notice['id']) . "'"));
         if ($is_paid == 1) {
             echo '1';
         } else {
             echo '0';
         }
     } else {
         echo '0';
     }
 }
开发者ID:eliu03,项目名称:fanweP2P,代码行数:101,代码来源:Allinpay_payment.php

示例13: unset

	empty-cells: show;
}
</style>
</head>
<body>
	<?php 
$param = $_REQUEST;
$from = $param['from'];
unset($param['from']);
if (isset($param['signature']) && verify($param)) {
    $outer_notice_sn = $param['queryId'];
    $payment_notice_sn = $param['orderId'];
    $payment_notice = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "payment_notice where notice_sn = '" . $payment_notice_sn . "'");
    if ($param['respCode'] == '00') {
        require_once APP_ROOT_PATH . "system/libs/cart.php";
        $rs = payment_paid($payment_notice_sn, $outer_notice_sn);
        if ($from == 'wap') {
            $url = APP_ROOT . "/../wap/index.php?ctl=cart&act=pay_result&id=" . $payment_notice['id'];
            app_redirect($url);
        } else {
            echo "支付成功<br />请点左上角<b>返回</b>按钮";
        }
    } else {
        if ($from == 'wap') {
            $url = APP_ROOT . "/../wap/index.php?ctl=cart&act=pay_result&id=" . $payment_notice['id'];
            app_redirect($url);
        } else {
            echo "支付失败<br />请点左上角<b>返回</b>按钮";
        }
    }
} else {
开发者ID:myjavawork,项目名称:sanxin-fangwei,代码行数:31,代码来源:call_back_url.php

示例14: response

 public function response($request)
 {
     //echo APP_ROOT_PATH."/alipaylog/ealipay_".date("Y-m-d H:i:s").".txt";exit;
     //@file_put_contents(APP_ROOT_PATH."/alipaylog/ealipay_".date("Y-m-dHis").".txt",$_SERVER["REQUEST_URI"].print_r($_REQUEST,true));
     /**
     		 * 4.1     服务器通知服务 
     
     		通知参数:notify_data,sign 
     		
     		签名原始字符串: 
     		notify_data=<notify> 
     		    <trade_status>TRADE_FINISHED</trade_status> 
     		    <total_fee>25.00</total_fee> 
     		    <subject>product24</subject> 
     		    <out_trade_no>500000020113134</out_trade_no> 
     		    <notify_reg_time>2010-09-20 15:26:51.000</notify_reg_time> 
     		    <trade_no>2010092000164773</trade_no> 
     		</notify> 
     		
     		签名结果: 
     		sign=590e7b2b1faf573847008d0234992066 
     		
     		TRADE_FINISHED 表示交易成功; 
     		WAIT_BUYER_PAY 等待买家付款。 
     */
     $sign = $request['sign'];
     $notify_data = $request['notify_data'];
     $config_str = $sign . ";notify_data=" . $notify_data;
     //@file_put_contents(APP_ROOT_PATH."/alipaylog/ealipay_".date("Y-m-d H:i:s").".txt",$config_str);
     //
     //		print_r($request)."<br /><br />";
     //		echo $request['notify_data']."<br /><br />";
     //		echo $notify_data."<br /><br />";
     $para_data = @XML_unserialize($notify_data);
     //@file_put_contents(APP_ROOT_PATH."/alipaylog/ealipay2_".date("Y-m-dHis").".txt",print_r($para_data,true));
     $payment_notice_sn = $para_data['notify']['out_trade_no'];
     $payment = $GLOBALS['db']->getRow("select id,config from " . DB_PREFIX . "payment where class_name='Malipay'");
     $payment['config'] = unserialize($payment['config']);
     $pubkey = $payment['config']['alipay_rsa_public'];
     //$pubkey = 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCRm32ueC6j8MiUCUSrHZpSICJmE3nSt3puyh8Yc1MlHlkNy3WSESTtbbihkhvwQnpHkkBdZtcQLkP3ZcXFOaSgPHcLRLRbICtrrpB7AsAfeRV83LGY1mKwqixNzZUGIZl4ZkHrS3x2GiNCwf10es2CeAtkldlO6NE2MGOKRgv3wQIDAQAB';
     $pubkey = $this->getPublicKeyFromX509($pubkey);
     $res = openssl_pkey_get_public($pubkey);
     $sign = base64_decode($sign);
     $verify = openssl_verify("notify_data=" . $notify_data, $sign, $res);
     if ($verify == 1) {
         $trade_status = $para_data['notify']['trade_status'];
         $money = $para_data['notify']['total_fee'];
         $outer_notice_sn = $para_data['notify']['trade_no'];
         if ($trade_status == 'TRADE_SUCCESS' || $trade_status == 'TRADE_FINISHED' || $trade_status == 'WAIT_SELLER_SEND_GOODS') {
             $payment_notice = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "payment_notice where notice_sn = '" . $payment_notice_sn . "'");
             //file_put_contents(APP_ROOT_PATH."/alipaylog/payment_notice_sn_3.txt",$payment_notice_sn);
             $order_info = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "deal_order where id = " . $payment_notice['order_id']);
             require_once APP_ROOT_PATH . "system/model/cart.php";
             $rs = payment_paid($payment_notice['id']);
             if ($rs) {
                 //file_put_contents(APP_ROOT_PATH."/alipaylog/1.txt","");
                 $GLOBALS['db']->query("update " . DB_PREFIX . "payment_notice set outer_notice_sn = '" . $outer_notice_sn . "' where id = " . $payment_notice['id']);
                 order_paid($payment_notice['order_id']);
                 echo "success";
             } else {
                 //file_put_contents(APP_ROOT_PATH."/alipaylog/2.txt","");
                 echo "success";
             }
         } else {
             //file_put_contents(APP_ROOT_PATH."/alipaylog/3.txt","");
             echo "fail";
         }
     } else {
         //file_put_contents(APP_ROOT_PATH."/alipaylog/4.txt","");
         echo "fail";
     }
     exit;
 }
开发者ID:macall,项目名称:jsd,代码行数:73,代码来源:Malipay_payment.php

示例15: notify

 public function notify($request)
 {
     $return_res = array('info' => '', 'status' => false);
     $BillNo = $_POST["BillNo"];
     $Amount = $_POST["Amount"];
     $Succeed = $_POST["Succeed"];
     $MD5info = $_POST["MD5info"];
     $Result = $_POST["Result"];
     $payment_notice_sn = $_POST['MerRemark'];
     /*获取支付信息*/
     $payment = $GLOBALS['db']->getRow("select id,config from " . DB_PREFIX . "payment where class_name='Sqepay'");
     $payment['config'] = unserialize($payment['config']);
     $MerNo = $payment['config']['merno'];
     $MD5key = $payment['config']['md5key'];
     /*比对连接加密字符串*/
     $md5sign = $this->getSignature_return($MerNo, $BillNo, $Amount, $Succeed, $MD5key);
     if ($MD5info == $md5sign && $Succeed == "88") {
         $payment_notice = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "payment_notice where id = '" . $payment_notice_sn . "'");
         $order_info = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "deal_order where id = " . $payment_notice['order_id']);
         require_once APP_ROOT_PATH . "system/libs/cart.php";
         $rs = payment_paid($payment_notice['id'], $BillNo);
         if ($rs) {
             $rs = order_paid($payment_notice['order_id']);
             if ($rs) {
                 //开始更新相应的outer_notice_sn
                 //$GLOBALS['db']->query("update ".DB_PREFIX."payment_notice set outer_notice_sn = '".$BillNo."' where id = ".$payment_notice['id']);
                 echo 1;
                 die;
             } else {
                 echo 1;
                 die;
             }
         } else {
             echo 1;
             die;
         }
     } else {
         echo 0;
         die;
     }
 }
开发者ID:norain2050,项目名称:fanwei_xindai_3.2,代码行数:41,代码来源:Sqepay_payment.php


注:本文中的payment_paid函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。