我今天注意到,我的链接,通常会弹出一个paypal灯箱,用于数字商品快捷支付,但已停止工作。这个链接直到2012/11/21才能正常工作,我检查了包含旧代码的服务器上是否存在这个问题(以前可以工作的代码),所以我不认为这是我更改的内容,而是paypal在js文件中更改的内容。
我使用的代码与paypal向导生成的代码完全相同:
<!-- INFO: The post URL "checkout.java" is invoked when clicked on "Pay with PayPal" button.-->
<form action='checkout.java' 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>首先,当页面现在加载时,看起来名为'nameOnButton‘的图像上有一些噪音(’图像‘包含文本’苏移‘和一些空框),PP javascript必须插入它,因为它不在我生成的超文本标记语言中。网络上的各种例子也都有这种虚假的图像。HTML如下所示:
<form action="/pay/dpSetCheckout/" method="GET" target="PPDGFrame">
<input type="hidden" name="express">
<input type="hidden" name="trackingNumber" value="UNg0000306">
<span class="nameOnButton"><a href="javascript:"><img src="https://www.paypal.com/webapps/checkout/nameOnButton.gif"></a><br><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"></span>
</form>
...
<script>
$(document).ready(function(){
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>当我点击“使用paypal支付”按钮时,屏幕“变灰”,但paypal弹出窗口从未出现。大约5秒后,错误消息“由于X-Frame-Options.‘禁止显示而拒绝显示文档”。出现在javascript控制台中,很可能是因为lightbox没有被创建。我不认为这是一个后端/配置问题,因为如果我在一个新的标签中打开‘paypal支付’链接,它打开得很好。
我不太确定从哪里开始消除这个泡沫(看到没有任何javascript错误消息)。
发布于 2012-11-26 17:38:14
我认为在最近的PayPal版本中有一个日语和中文字体的错误,应该很快就会被修复
https://stackoverflow.com/questions/13540913
复制相似问题