Test page:
https://www.pizzartfano.com/Pagamento/metodo:paypal_cc/id:59238/mobile:1/
This should load PayPal credit card payment page (attached screenshot). On many device it fails to load the main content blocking the payment operation (attached screenshot). Note that you need a incognito window to load the right page since PayPal redirect you to login page if you previously use it.
Test apk:
https://www.pizzartfano.com/PayPalTest.apk
My tests:
- tested with titanium sdk from 8 to 8.3.0
- when fails, on the same device a native simple web view app (
https://play.google.com/store/apps/details?id=com.snc.test.webview2), a chrome custom tab and standalone chrome app *works* with the same url
- changing webview provider or device change the result (details below)
- users report problems with the standard login paypal page too
Note that:
- works on iOS
- cookie banner load anyway, catcha too (occurs after many visits)
- paypal webpage triggers some csp errors (didn't affect chrome standalone)
- in logcat (attached) I see some warnings from autofill service (can't find a way to disable)
Device / WebView provider / result:
Samsung SM-T580 (TabA 2016) / Chrome79 / Fails
Samsung SM-T580 (TabA 2016) / Chrome69 / Fails
Samsung SM-T580 (TabA 2016) / SystemWebView79 / Fails
Samsung SM-G973F (S10) / Chrome 74 / Works
Samsung SM-G973F (S10) / SystemWebView74 / Works
Samsung SM-G973F (S10) / ChromeBeta80 / Fails
Samsung SM-G973F (S10) / SystemWebView79 / Fails
Xiaomi MiMix2S / Chrome79 / Fails
Xiaomi MiMix2S / Chrome72 / Fails
Android Emulator / SystemWebView74 / Works
Test code:
var win = Ti.UI.createWindow({
backgroundColor: 'white'
});
var webview = Ti.UI.createWebView({
width: Ti.UI.FILL,
height: Ti.UI.FILL,
url:"https://www.pizzartfano.com/Pagamento/metodo:paypal_cc/id:59238/mobile:1/"
});
win.add(webview);
win.open();
I did many other tests, can't find a way to solve the problem.
I can add more details: the problem is related to css vh propriety. In Titanium's WebView implementation isn't work properly and any related size results in 0 pixel. I've added a test page to the test app and screenshot. Meanwhile I had to implement PayPal buttons, that use the same page in a fixed height iframe and works in Titanium WebView.
Test link updated
Hello @Carlo . Good afternoon / evening. I have implemented paypal in these days using a local html, and everything is working good. Suggestion: Please try to add this property to your webview:
,and try again. Please let me know how it goes, and whether you have any doubt or question. Thanks, and best, Antonio Duran."#mWebView" : { borderRadius : 1 }thank you for the workaround borderRadius makes css vh propery work correctly and I can browse PayPal credit card page correctly ...but why??? vh propery is widely used in the web and nobody found this problem?