没有模态框或弹出窗口的自适应支付

没有模态框或弹出窗口的自适应支付

本文介绍了没有模态框或弹出窗口的自适应支付?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以完全内联启动支付流程(a la Express Checkout)?怎么样?

Is it possible to launch the payflow entirely inline (a la Express Checkout)? How?

我们正在使用链式支付,一切都可以在非 iOS 移动设备(以及 iOS 版 Chrome)上运行,但我们正在制作一个网络应用,因此我们需要它在手机上运行.在 iPhone 上测试,我们有 这个 我已经询问过的 PayPal 代码问题,以及当我通过使用 PayPal 的 URL 执行 location.replace(或加载它)来解决该错误时在我自己设计的灯箱中),iOS 和移动版 Safari 取消了登录"弹出窗口(如果用户愿意,则不会让他们有机会查看它).

We're using chained payments and everything works on non-iOS-mobile devices (and in Chrome for iOS), but we're making a web app, so we need this to work on phones. Testing on the iPhone, we have this problem with PayPal's code that I've already asked about, as well as the fact that when I get around that bug by doing a location.replace with the URL to PayPal (or loading it in a lightbox of my own design), iOS and mobile Safari kill the "Log In" popup (without giving the user an opportunity to view it if they so choose).

简而言之,有没有什么方法可以让我使用自适应支付而不出现 1990 年代可笑的弹出窗口???

In short, is there any way I can use Adaptive Payments without ridiculous 1990s-era popups???

推荐答案

以下是我为使用 PayPal 的移动网络流程所做的工作.我正在 Android 上进行测试,并且运行良好.唯一的问题是 callbackFunction 在移动浏览器中没有触发并且在桌面浏览器中工作正常.(我仍在研究这部分.如果你解决了,请告诉我.)这里有一个示例,说明如何使用 expType=mini 启动 PayPal 迷你浏览器体验.

Here's what I'm doing to use PayPal's mobile web flow. I'm testing on Android and it's working well. The only hang up is the callbackFunction is not firing in mobile browsers and works fine in desktop browsers. (I'm still working on this part. Let me know if you solve it.) Here's an example on how to do it using expType=mini to launch the PayPal mini browser experience.

首先包含用于迷你流的 Javascript:

First include the Javascript for the Mini flow:

<script src="http://www.paypalobjects.com/js/external/apdg.js"></script>

然后是启动重定向的链接:

Then a link to launch the redirect:

<a id="payPalRedirect" href="https://www.sandbox.paypal.com/webapps/adaptivepayment/flow/pay?paykey={paykey}&expType=mini" target="_blank">Complete PayPal Payment</a>
<br /><br />
<div id="resultDiv"></div>

以及一些用于启动 Mini Flow 进程和 callbackFunction 的 Javascript:

And some Javascript to initiate the Mini Flow process and the callbackFunction:

        var returnFromPayPal = function () {
           alert("Returned from PayPal");
           var div = document.getElementById('resultDiv');
           div.innerHTML = "Returned from PayPal!";
           // Here you would need to pass on the payKey to your server side handle to call the PaymentDetails API to make sure Payment has been successful or not
           // based on the payment status- redirect to your success or cancel/failed urls
       }
       var dgFlowMini = new PAYPAL.apps.DGFlowMini({ trigger: 'payPalRedirect', expType: 'mini', callbackFunction: 'returnFromPayPal' });

可以在此处找到有关此问题的更多见解和解决方案选项:

More insights and solution options to this issue can be found here:

不使用 returnUrl 或 cancelUrl 的 Paypal 嵌入式流程

这篇关于没有模态框或弹出窗口的自适应支付?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-24 13:51