USUEEPAY付款减少,SSL版本错误



我正在使用 useepay 用于我的移动应用。我正在使用朋友的服务器,没有问题。

然后我自己租了一台服务器。将后端切换到新服务器。我正在使用完全相同的代码。我在网站上实施了快速的SSL。但是我无法付款。

这是错误;

从卡处理网关中读取错误。
不支持的SSL协议版本

我的PHP API与此相同;https://github.com/usaepay/usaepay-php/blob/master/usaepay.php

这是我的payorder.php类

require('connector.php');
include ('phpseclib/Crypt/RSA.php');
include ('usaepay/usaepay.php');

$request = json_decode($HTTP_RAW_POST_DATA, true);
$token = $request['token'];
$orderid = $request['orderid'];
$ccInfo = base64_decode($request['ccinfo']);
$address = $request['address']; 
if(strlen($out_plain) >= 25) {
    $query = "SELECT * FROM xxxx_order WHERE order_id = $orderid";
    $result = mysql_query($query);
    $order = mysql_fetch_assoc($result);
    $total = $order['order_total'];
    $creditcard = explode("||", $out_plain);
    $ccnumber = $creditcard[0];
    $cvvnumber = $creditcard[1];
    $cctype = $creditcard[2];
    $ccmonth = $creditcard[3];
    $ccyear = $creditcard[4];
    $ccdate = $ccmonth.$ccyear;
    $ccname = $creditcard[5];
    $address = explode("||", $address);
    $street = $address[0];
    $city = $address[1];
    $state = $address[2];
    $zip = $address[3];
    $name = $address[4];
    $umcommand = "cc:sale" ;
    $umkey = "mykey" ;
    $pin = "mypin";
    $tran=new umTransaction;
    $tran->key = "mytrkey";
    $tran->pin = "mypin";
    $tran->usesandbox = false;
    $tran->testmode = 0;
    $tran->command = "cc:sale";
    $tran->card = $ccnumber;
    $tran->exp = $ccdate;
    $tran->amount = $total;
    $tran->invoice = $orderid;
    $tran->cardholder = $ccname;
    $tran->street = $street;
    $tran->zip = $zip;
    $tran->description = "App sale";
    $tran->cvv2 = $cvvnumber;
    flush();
    if($tran->Process()) {
        $auth = $tran->authcode;
        $refnum = $tran->refnum;
        $response = "$auth---$refnum";
        $query = "UPDATE `mydb` SET `order_status`= 2, UMresponse =                         
        $check = false;
        $count = 0;
        do {
            $check = mysql_query($query);
            $count++;
        } while ($check == false && $count < 50);
        array_push($arr, array("status" => "success", "request" =>           "check", "order_status" => "success"));
    } else {
        $tranresult = $tran->result;
        $tranerror = $tran->error;
        $trancurl = ""; 
        if(@$tran->curlerror) $trancurl = $tran->curlerror;
        $response = "$tranresult---$tranerror---$trancurl";
        $query = "UPDATE `mydb` SET `order_status`= 4, UMresponse = '$response' WHERE order_id = $orderid";
        $check = false;
        $count = 0;
        do {
            $check = mysql_query($query);
            $count++;
        } while ($check == false && $count < 50);
        array_push($arr, array("status" => "success", "request" => "check", "order_status" => "declined"));
    }
    /*
    $hashseed = mktime ();   // mktime returns the current time in seconds since epoch.
    $hashdata = $umcommand . ":" . $pin . ":" . $total . ":" . $orderid . ":" . $hashseed ;
    $hash = md5 ( $hashdata );
    $umhash = "m/$hashseed/$hash/y";
    $fields = array(`enter code here`
        "UMkey"     => urlencode($umkey),
        "UMredir"   => urlencode("myurl"),
        "UMinvoice" => urlencode($orderid),
        "UMamount"  => urlencode($total),
        "UMname"    => urlencode($ccname),
        "UMstreet"  => urlencode($street),
        "city"      => urlencode($city),
        "City"      => urlencode($city),
        "state"     => urlencode($state),
        "State"     => urlencode($state),
        "UMzip"     => urlencode($zip),
        "cardtype"  => urlencode($cctype),
        "UMcard"    => urlencode($ccnumber),
        "UMexpir"   => urlencode($ccdate),
        "UMcommand" => urlencode("cc:sale"),
        "UMhash"    => $umhash,
        "UMechofields" => "yes",
        "OrderRef"  => $orderid
    );
    $fields_string = "";
    foreach($fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; }
    rtrim($fields_string, '&');
    $url = "https://www.usaepay.com/gate.php";
    // $fields = "UMkey=".urlencode($umkey)."&UMredir=".urlencode("myurl**strong text**")."&UMinvoice=$orderid&UMamount=".urlencode($total)."&UMname=".urlencode($ccname)."&UMstreet=".urlencode($street)."&city=".urlencode($city)."&state=".urlencode($state)."&UMzip=".urlencode($zip)."&cardtype=".urlencode($cctype)."&UMcard=".urlencode($ccnumber)."&UMexpir=".urlencode($ccdate)."&UMcommand=".urlencode("cc:sale");
    // array_push($arr, array("url" => $url, "fields" => $fields_string));
    //open connection
    $ch = curl_init();
    //set the url, number of POST vars, POST data
    curl_setopt($ch,CURLOPT_URL, $url);
    curl_setopt($ch,CURLOPT_POST, count($fields));
    curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string);
    //execute post
    $result = curl_exec($ch);
    if($result == true) {
        array_push($arr, array("status" => "success", "request" => "send", "msg" => "Payment request sent"));
    }
    else {
        array_push($arr, array("status" => "error", "request" => "send", "msg" => "Failed to connect to the payment system"));
    }
    //close connection
    curl_close($ch);
    */
} else {
    array_push($arr, array("status" => "error", "request" => "send", "msg" => "Decryption failure, please check fields before submission"));
} else {
    array_push($arr, array("status" => "error", "request" => "send", "msg" => "User token not verified"));
}
header('Content-Type: application/json');
echo json_encode($arr);

任何帮助将不受欢迎。我的问题是什么?

我认为错误消息清楚地表明,由于不支持的SSL版本,您与付款网关的通信被拒绝或拒绝,您应该检查服务器设置并与朋友的服务器进行比较。顺便说一句,查看您的php代码,您知道MySQL扩展已被贬低以来自PHP v5.5.0并从PHP 7中删除了总数?我建议您以有关数据库部分和php.net文档的正确方法阅读PHP。

最新更新