}
$stMID = "SELECT mid FROM o_user where client='{$Gauth['client']}' limit 1 ";
$qMID = mysql_query($stMID, $plink);
$MidO = mysql_fetch_array($qMID);
//$Re_URL ='https://stestcredit.allpay.com.tw/Api_W/ApiResponse_back_3.jsp';
$Re_URL = 'https://credit.allpay.com.tw/Api_W/ApiResponse_back_3.jsp';
//$Re_URL ='https://10.0.3.3/Api_W/ApiResponse_back_3.jsp';
$BK_Re_post = "MerchantID={$MidO['mid']}&OrderID={$A}&TransCode=01";
//====記錄轉拋的值
$result_log = date("YmdHis") . ' : ' . $BK_Re_post;
$result_log = data_cryptNew('Gtfrdc34RTfgXc34defV6yh4', '52417855', $result_log, $mode = 'encrypt');
//壓
$result_log .= "\r\n";
$log_File_name = "../log/wantai_cancel_" . date("Ymd");
error_log($result_log, 3, $log_File_name);
$ccc = my_curl_inv($Re_URL, $BK_Re_post);
//====記錄轉拋的值
$result_log = date("YmdHis") . ' : ' . $ccc;
$result_log = data_cryptNew('Gtfrdc34RTfgXc34defV6yh4', '52417855', $result_log, $mode = 'encrypt');
//壓
$result_log .= "\r\n";
$log_File_name = "../log/wantai_cancel_" . date("Ymd");
error_log($result_log, 3, $log_File_name);
parse_str($ccc);
//Rdate=20130531&Ramt=10&Rcode=00&Rsr=10086486&Rmsg=取消授權成功
if ($Rcode == '00') {
    //完成
    $doUP = 1;
} else {
    $doUP = '';
    echo '放棄失敗! ' . $ccc;
示例#2
0
     curl_setopt($ch, CURLOPT_HEADER, 0);
     curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
     curl_setopt($ch, CURLOPT_COOKIEFILE, "cookiefile");
     curl_setopt($ch, CURLOPT_COOKIEJAR, "cookie.txt");
     $result = curl_exec($ch);
     $info = curl_getinfo($ch);
     curl_close($ch);
     if ($result == NULL) {
         $result = "PostError";
     }
     return $result;
 }
 $str = "update o_inv set isok='1' where sr='{$inv_sr}' and isok=0 and client='{$inv_client}' limit 1 ";
 //1執行,2失敗,3成功
 mysql_query($str, $plink);
 $ccc = my_curl_inv($inv_URL, $BK_inv_post);
 $gt_cod = explode('inv_error=', $ccc);
 if ($ccc == 'PostError') {
     $str = "update o_inv set isok='2' where sr='{$inv_sr}' and isok=1 and client='{$inv_client}' limit 1 ";
     //1執行,2失敗,3成功
     mysql_query($str, $plink);
 }
 if ($gt_cod[1] != 0) {
     $str = "update o_inv set isok='{$gt_cod['1']}' where sr='{$inv_sr}' and isok=1 and client='{$inv_client}' limit 1 ";
     //1執行,2失敗or錯誤碼,3成功
     mysql_query($str, $plink);
 }
 if ($gt_cod[1] == 0) {
     $str = "update o_inv set isok='3' where sr='{$inv_sr}' and isok=1 and client='{$inv_client}' limit 1 ";
     //1執行,2失敗,3成功
     mysql_query($str, $plink);