Subversion-Projekte lars-tiefland.ci

Revision

Revision 719 | Blame | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

    <script src="https://www.paypalobjects.com/webstatic/ppplus/ppplus.min.js" type="text/javascript"></script>
    <div id="ppplus"></div>
    <script type="text/javascript">
        $(function(){
            var ppp=PAYPAL.apps.PPP({
                "approvalUrl":"{$approvalUrl}",
                "placeholder":"ppplus",
                "mode":"{$ini.PayPalPlus.env}",
                "language":"de_DE",
                "country":"DE",
                "buttonLocation":"outside",
                "disableContinue":"continueBtn",
                "enableContinue":"continueBtn",
                "preselection":"none",
                "showPuiOnSandbox": "true",
                "thirdPartyPaymentMethods":{$paymentMethods},
                "onThirdPartyPaymentMethodSelected":function(data)
                {
                    setTimeout(updSession,10,data);
                },
                "onThirdPartyPaymentMethodDeselected":function(data)
                {
                    $.post("/shop/update_session",function()
                    {
                        $('#continueBtn').unbind("click").click(function()
                        {
                            ppp.doContinue();
                            return false;
                        })
                    });
                }
            });
            $('#continueBtn').click(function()
            {
                ppp.doContinue();
                return false;
            })
        });
        
        function updSession(data)
        {
            $.post("/shop/update_session",data,function()
            {
                $('#continueBtn').unbind("click").click(function()
                {
                    $('#buy_form').submit();
                    return false;
                })
            });
        }
    </script>