Paypal重定向后丢失ZF2会话 [英] Losing ZF2 Session after Paypal redirection

查看:85
本文介绍了Paypal重定向后丢失ZF2会话的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在zf2和PayPal付款管理会话方面,我遇到了严重的问题.一旦进入付款页面,我将失去zf2会话. 该怎么解决?

I have a serious problem with managing session in zf2 and PayPal payment. Once I get in the page of the payment, I lose the zf2 session. How to solve it?

$mySession = new Container('mySession');
$mySession->login = "name";
$mySession->droit=  "admin";

谢谢.

更新: 重定向页面:

<?php
  session_start();
 extract($_GET);
if($action == "paypal")
  header("Location: ./paymentgetway.php?action=$action&invoiceId=$invoiceId&L_NAME0=$L_NAME0&L_AMT0=$L_AMT0&L_DESC0=$L_DESC0&L_QTY0=$L_QTY0");
?>

付款页面:

<?php
    session_start();
    require_once ("payment/paypal/paypalfunctions.php");
    extract($_GET);
    extract($_SESSION);
    switch ($action) {
        case "paypal":
            if (isset($L_NAME0) && isset($L_AMT0) && isset($L_DESC0) && isset($L_QTY0)) {
                include("payment/paypal/expresscheckout.php");
            } else {
                header("Location:index.php");
            }
            break;
        case "paymentcanceled":
            $file = "payment/paypal/paymentcanceled.php";
            break;
        case "paymentcompleted":
            if ($paymentapi == "paypal") {
                include("payment/saveTransactionDetails.php");
            }
            $file = "payment/paypal/paymentcompleted.php";
            break;
        case "paymentpending":
            $file = "payment/paypal/paymentpending.php";
            break;
        case "apierror":
            $file = "payment/paypal/apierror.php";
            break;
        default:
            header("Location: index.php");
    }
    ?>

    <!DOCTYPE html>
    <html lang="fr">      
        <body>  
            <div class="corps">
                <?php include($file); ?>   
            </div>
        </body>
    </html>

推荐答案

解决方案是使用为zf2实现的模数为speckPaypal,这是我为了使它工作而遵循的tuto:

the solution is to use the modul realised for zf2 which is speckPaypal , here is the tuto i followed to make it work :

http://phpcantho24h.blogspot.com/2014/04/paypal-express-checkout-creating-simple.html

希望有帮助.

这篇关于Paypal重定向后丢失ZF2会话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆