没有模式框或弹出窗口的自适应付款? [英] Adaptive Payments without modal box or popups?

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

问题描述

是否可以完全在线启动付款流程(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.

首先包含Mini flow的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>

和一些Java脚本来启动Mini Flow流程和callbackFunction:

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:

Paypal嵌入式流未使用returnUrl或cancelUrl

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

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆