Php 从支付提供商codeigniter重定向后会话丢失
我们的一些客户遇到了一种奇怪的情况,他们丢失了会话数据。这总是发生在我们的支付隐私权ogone重定向之后。流程如下所示:Php 从支付提供商codeigniter重定向后会话丢失,php,curl,codeigniter-3,libcurl,php-curl,Php,Curl,Codeigniter 3,Libcurl,Php Curl,我们的一些客户遇到了一种奇怪的情况,他们丢失了会话数据。这总是发生在我们的支付隐私权ogone重定向之后。流程如下所示: 用户正在完成其订单 用户决定通过ogone付款 之后,用户被重定向到应用程序的支付成功/错误处理程序 在调试此问题时,我发现当用户从ogone重定向到应用程序时,会话数据丢失。对于x个请求量,这种情况只发生一次。因此,当我在任何可能的浏览器中测试代码时,它似乎工作正常。我没有找到失败的付款和浏览器/付款方式/之间的链接 这是我的会话配置: $config['sess
- 用户正在完成其订单
- 用户决定通过ogone付款
- 之后,用户被重定向到应用程序的支付成功/错误处理程序
$config['sess_driver'] = 'database';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 172800;//48 hours
$config['sess_save_path'] = 'ci_sessions';
$config['sess_match_ip'] = false;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;
第一步是向银行确认信用卡
try {
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/xml', 'Content-length: ' . strlen($xml)));
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_URL,'https://boatest.kuveytturk.com.tr/boa.virtualpos.services/Home/ThreeDModelPayGate');
curl_setopt($ch, CURLOPT_POSTFIELDS, $xml);
curl_setopt($ch, CURLOPT_COOKIESESSION, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_COOKIE, session_name() . '=' . session_id());
$data = curl_exec($ch);
curl_close($ch);
} catch (Exception $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
}
访问者被转移到外部页面以设置SMS支付验证码
第二步是确认付款
try {
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/xml', 'Content-length: ' . strlen($xml)));
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_URL,'https://boatest.kuveytturk.com.tr/boa.virtualpos.services/Home/ThreeDModelProvisionGate'); //Baglanacagi URL
curl_setopt($ch, CURLOPT_POSTFIELDS, $xml);
curl_setopt($ch, CURLOPT_COOKIESESSION, true);
curl_setopt($ch, CURLOPT_COOKIE, session_name() . '=' . session_id());
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$data = curl_exec($ch);
curl_close($ch);
$xxxml = new SimpleXMLElement($data);
} catch (Exception $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
}
当切换到第二步时,会话数据丢失
你能帮忙吗
请注意,对于某些用户,此问题有时不会永久出现('Set-Cookie:'.session_name().='.session_id().;SameSite=None;Secure') 头('Set-Cookie:'.session_name().='.session_id().;SameSite=None;Secure') 您能确认您的CI版本吗?据报告,早期3.x版本存在一些会话问题CI version=3.1.11能否确认您的CI版本?据报告,早期3.x版本SCI version=3.1.11存在一些会话问题