PayPal Express Checkout 付款后返回 Flex

发布于 2024-08-06 16:56:59 字数 449 浏览 3 评论 0原文

我已成功将 PayPal Express 集成到 Flex 应用程序中。在 DoExpressCheckoutPayment.php 中,我有以下 JavaScript 代码行不会执行:

window.opener.window.document.getElementById('index').paymentComplete();

'index' - http:// /mysite.com/index.html# 包含index.swf ' paymentComplete() ' - 完成处理交易的函数

有人使用 JavaScript 成功激活了从弹出窗口到 Flex 应用程序的回调方法吗?

预先感谢您的帮助,

奥维尔

I have successfully integrated PayPal Express into a Flex application. In DoExpressCheckoutPayment.php, I have the following JavaScript line of code that will not execute:

window.opener.window.document.getElementById('index').paymentComplete();

'index' - http://mysite.com/index.html# contains index.swf
'paymentComplete()' - the function that finishes processing the transaction

Has anyone successfully activated callback methods back from a popup to a Flex application using JavaScript?

Thank you in advance for any help,

Orville

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

源来凯始玺欢你 2024-08-13 16:56:59

SWFAddress 将是一个非常好的解决方案。

SWFAddress would be a really good solution for this.

想你的星星会说话 2024-08-13 16:56:59

在 Flex 中,URLRequest 中的地址是绝对地址 (http://mysite.com/phpfolder/),而不是相对于 SWF (/phpfolder)。由于某种原因,JavaScript 需要相对 URL 才能运行以下行。我不知道为什么。

window.opener.window.document.getElementById('index').paymentComplete();

In Flex, the address in URLRequest was absolute (http://mysite.com/phpfolder/) and not relative (/phpfolder) to the SWF. For some reason JavaScript requires the relative URL for the following line to work. I am not sure why.

window.opener.window.document.getElementById('index').paymentComplete();
万人眼中万个我 2024-08-13 16:56:59

如果您可以让弹出窗口在包含flex应用程序的html页面中调用JS方法,则可以使用 ExternalInterface 类的 addCallBack 方法,使该 JS 方法与 Flex 应用程序进行通信。

If you can get the popup to call a JS method in the html page that holds the flex app, you can use addCallBack method of the ExternalInterface class to make that JS method communicate with the flex app.

听风吹 2024-08-13 16:56:59

对于 getElementById 使用 OBJECT-tag 中 EMBED-tag 的 id ..而不是 OBJECT-tag 本身的 id!

for getElementById use the id from the EMBED-tag in the OBJECT-tag .. not the id from the OBJECT-tag itself!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文