我正在尝试在 php 中进行支付网关集成。当我从本地支付流程进行测试模式支付时工作正常。我已成功重定向到我的支付页面。我使用 CURL 将数据发布到支付网关服务器。
但是上传到服务器后我无法付款。我收到以下错误。SSL 连接错误(35)
我的代码如下。
$request_url= "https://mypaymentserver.com"
$url = $request_url;
$successurl = url::site('payment/textpartnerssuccess', 'http');
$processurl = url::site('payment/textpartnersprocess', 'http');
$failurl = url::site('payment/textpartnersfail', 'http');
//Data bind
$invoiceno = commonfunction::randomkey_generator();
$postData = array(
"url_succesfull" => $successurl,
"url_process" => $processurl,
"url_cancel" => $failurl,
"item_id" => $jobid,
"name" => $jobdetails[0]['job_title'],
"currency" => $this->textpartners_currencycode,
"price" => $amount,
"token" => $invoiceno,
"seller_op_id" => time(),
"shipping_cost" => 0
);
$data = http_build_query($postData, NULL, '&');
// Create a new curl instance
$curl = curl_init();
// Set curl options
curl_setopt_array($curl, array(
CURLOPT_URL => $url,
CURLOPT_POST => TRUE,
CURLOPT_POSTFIELDS => $data,
CURLOPT_SSL_VERIFYPEER => FALSE,
CURLOPT_SSL_VERIFYHOST => FALSE,
CURLOPT_RETURNTRANSFER => TRUE,
));
if (($response = curl_exec($curl)) === FALSE)
{
// Get the error code and message
$code = curl_errno($curl);
$error = curl_error($curl);
curl_close($curl);// Close curl
echo $error_msg = 'Payment API request for failed: '.$error.'(' .$code.')'; exit;
Message::error($error_msg);
// Parse the response
parse_str($response, $data);
}
curl_close($curl); // Close curl
// Parse the response
parse_str($response, $data);
谁能帮我?提前致谢 :)