Javascript dg.cs for Digital goods显示lightbox以及paypal窗口有一些错误

时间:2013-07-13 08:26:09

标签: paypal

当我在我的网站上点击继续到paypal时,两个窗口(一个灯箱窗口和另一个paypal主页面窗口)同时打开(请注意:此时我从paypal获取令牌并点击此按钮我将用户重定向到:< / p>

Response.Redirect("https://www.sandbox.paypal.com/incontext?token=" + resp.Token+"&useraction=commit");

我将javascript函数称为:

<script type="text/javascript">
    $(document).ready(function () {
        var dg = new PAYPAL.apps.DGFlow({ trigger: "PP_btn", expType: "mini" });
    });
</script>

paypal窗口打开显示错误:“调度错误,请检查日志文件以获取更多信息

不明白问题所在。让我知道我该怎么做?

1 个答案:

答案 0 :(得分:0)

要打开PayPal灯箱窗口,这是最简单的方法:

<form action='checkout.php' METHOD='POST'>
    <input type='image' name='paypal_submit' id='paypal_submit'  src='https://www.paypal.com/en_US/i/btn/btn_dg_pay_w_paypal.gif' border='0' align='top' alt='Pay with PayPal'/>
</form>

<!-- Add Digital goods in-context experience. Ensure that this script is added before the closing of html body tag -->

<script src='https://www.paypalobjects.com/js/external/dg.js' type='text/javascript'></script>
<script>

    var dg = new PAYPAL.apps.DGFlow(
    {
        trigger: 'paypal_submit',
        expType: 'instant'
         //PayPal will decide the experience type for the buyer based on his/her 'Remember me on your computer' option.
    });

</script>