Subversion-Projekte lars-tiefland.ci

Revision

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

Revision Autor Zeilennr. Zeile
42 lars 1
    <script src="https://www.paypalobjects.com/webstatic/ppplus/ppplus.min.js" type="text/javascript"></script>
2
    <div id="ppplus"></div>
3
    <script type="text/javascript">
4
        $(function(){
5
            var ppp=PAYPAL.apps.PPP({
6
                "approvalUrl":"{$approvalUrl}",
7
                "placeholder":"ppplus",
8
                "mode":"{$ini.PayPalPlus.env}",
9
                "language":"de_DE",
10
                "country":"DE",
11
                "buttonLocation":"outside",
12
                "disableContinue":"continueBtn",
13
                "enableContinue":"continueBtn",
14
                "preselection":"none",
15
                "showPuiOnSandbox": "true",
16
                "thirdPartyPaymentMethods":{$paymentMethods},
17
                "onThirdPartyPaymentMethodSelected":function(data)
18
                {
19
                    setTimeout(updSession,10,data);
20
                },
21
                "onThirdPartyPaymentMethodDeselected":function(data)
22
                {
719 lars 23
                    $.post("/shop/update_session",function()
42 lars 24
                    {
25
                        $('#continueBtn').unbind("click").click(function()
26
                        {
27
                            ppp.doContinue();
28
                            return false;
29
                        })
30
                    });
31
                }
32
            });
33
            $('#continueBtn').click(function()
34
            {
35
                ppp.doContinue();
36
                return false;
37
            })
38
        });
39
 
40
        function updSession(data)
41
        {
719 lars 42
            $.post("/shop/update_session",data,function()
42 lars 43
            {
44
                $('#continueBtn').unbind("click").click(function()
45
                {
46
                    $('#buy_form').submit();
47
                    return false;
48
                })
49
            });
50
        }
51
    </script>