O lightbox do PayPal não abre no aplicativo Safari / Web para iPhone; 'win.location' indefinido
(funciona bem emChrome
noiPhone
)
Eu recebo este erro:
TypeError: 'undefined' is not an object (evaluating 'win.location') in dg.js line 3
E a mesa de luz não abre.
O código em questão dentro do PayPaldg.js é:
startFlow: function (url) {
var win = that._render();
if (win.location) {
win.location = url;
} else {
win.src = url;
}
}
Então o celularSafari
não entendothat._render()
? Como faço para contornar isso?
Se isso importa, estou usandoAdaptive Payments
, chamando assim:
var dg = new PAYPAL.apps.DGFlow({
trigger: null,
expType: 'light'
});
dg.startFlow('https://www.paypal.com/webapps/adaptivepayment/flow/pay?expType=light&payKey=' +data.paykey);
Eu não tenho nenhum problema em conseguirpayKey
e o todopayflow
funciona em desktops e em navegadores móveis que não sejamSafari
(funciona na área de trabalhoSafari
). Também não funciona quando o nosso site é executado como umiOS
web app, que eu assumo é apenas uma shell paraSafari
de qualquer forma.