fwrite($handle, "--------start\n"); fwrite($handle, var_export($_REQUEST, 1) . "\n\r"); fwrite($handle, var_export($response, 1) . "\n\r"); fwrite($handle, "--------end\n\r"); fclose($handle); //更新数据库中的数据 if ($response->payInConfirmationResult->statusCode == 0) { $paytime = strtotime($response->payInConfirmationResult->payment->postingDate) + Time_zone; $OrdersPayDetails = 'Payment:yhzx|' . 'CurrencyCode:EUR|' . 'amount:' . $response->payInConfirmationResult->payment->bankAmount . '|' . 'Remarks:' . $response->payInConfirmationResult->payment->bankInformation . '|' . 'time:' . $paytime; $sql = "\tUPDATE `" . TABLE_PREFIX . "orders` SET `OrdersPay` = ? ,`OrdersPayDetails` = ? where OrdersCid= ? "; $sth = $db->Prepare($sql); $res = $db->Execute($sth, array(1, $OrdersPayDetails, $response->payInConfirmationResult->payment->merchantReference)); if ($_SESSION[SESSION_PREFIX . "MemberId"]) { header("Location:" . RewriteUrl(ROOT_URL . "?module=shop&action=Achieve&id=" . $orderInfo['OrdersId'], 1)); } else { header("Location:" . RewriteUrl(ROOT_URL . "?module=shop&action=Achieve&id=" . $orderInfo['OrdersId'] . "&mid=" . $memberid . "&md=" . md5($memberid . $orderInfo['OrdersId'] . MD5_pass), 1)); } exit; } } if (!empty($orderInfo)) { //跳转到二次支付页面 if ($orderInfo['OrdersPay']) { header("Location:" . RewriteUrl(ROOT_URL . "?module=shop&action=Achieve&id=" . $orderInfo['OrdersId'] . "&mid=" . $memberid . "&md=" . md5($memberid . $orderInfo['OrdersId'] . MD5_pass), 1)); } else { header("Location:" . RewriteUrl(ROOT_URL . "?module=shop&action=failure_pay&id=" . $orderInfo['OrdersId'] . "&mid=" . $memberid . "&md=" . md5($memberid . $orderInfo['OrdersId'] . MD5_pass), 1)); } } else { header("Location:" . ROOT_URL); } exit;
function id2nameALL($id, $url = '', $fh = '/') { $class_all_id = $this->promotionurl_all_id; $class_all = $this->promotionurl_all; if ($url == '') { $id2nameALL = ' ' . $fh . ' ' . stripslashes($class_all[$id]["name"]); } else { $id2nameALL = ' ' . $fh . ' <a href="' . RewriteUrl($url . $id, 'no') . '">' . stripslashes($class_all[$id]["name"]) . '</a>'; } if ($class_all[$id]["pid"] != 0) { $id2nameALL = $this->id2nameALL($class_all[$id]["pid"], $url) . $id2nameALL; } return $id2nameALL; }