PayPal Checkout JS SDK: Modal instead of Pop-up? - paypal

I upgraded to v2 and use the JS SDK. Played with the client-side integration as well and used the “button generator” on PayPal's site. Noticed this uses a nice JS modal window and not a browser pop-up. Couldn't find anything documented about this.
Anyone knows if there is an option to use modal not pop-up

Related

Is it possible to for an Ionic(5) Capacitor(3) application to complete an Open ID (Auth0) flow?

I am struggling to utlise the angular-auth-oidc-client to add OIDC workflows into my Ionic app (android), although I feel the issues are more Capacitor so not sure that the library is the issue. There are numerous (old) posts on Google of people who have had similar problems, so I'm trying to ascertain the current state of play. I can:
By utilising a custom android scheme in my AndroidManifest, and an 'appUrlOpen' listener in app.component my OIDC login page loads in the Chrome browser on the device, and then returns to the Ionic app and opens the correct app page. Unfortunately because I've opened the login in Chrome it hangs around in the background with the username and password populated. I've no handle to it to close it, and the Capacitor plugins don't help me here.
Alternatively, I can add my ID Provider domain into 'AllowNavigation' in capacitor.config.json. This opens my login page in the app's webview, begins the redirect on successful login but fails (hangs) because Capacitor is not loaded when it attempts Window.Capacitor.triggerevent calls.
This is probably classed as a poor question, and I appreciate that it is light on code, but I'm interested in whether anyone has actually managed to do this successfully, as there are so many dead ends on google and github of people who've given up!
Yes it is possible to complete an Open ID Flow on ionic with capacitor.
You need a capacitor plugin to do so, ionic provides an own payed plugin (https://ionic.io/docs/auth-connect), other alternatives exist.
angular-auth-oidc-client out of the box works only on browser, not on iOS or Android. It seems that some adoption can be made, see https://github.com/damienbod/angular-auth-oidc-client/issues/807.

Is it possible to create multiple facebook SDK instances on a single page without conflict?

I'm working on an application that can be embedded in other pages using an iFrame that requires facebook permissions. The problem is we're running into issues when trying to use the facebook SDK to login from inside an iFrame on iOS (the login window never appears). We're running code on the parent page that places the iFrame, so my question is, can I place our SDK on the parent page without conflicting with any existing Facebook SDKs on that page?
can I place our SDK on the parent page without conflicting with any existing Facebook SDKs on that page?
No, you can’t. The JS SDK can only be embedded and initialized once.
The problem is we're running into issues when trying to use the facebook SDK to login from inside an iFrame on iOS (the login window never appears)
The whole JS SDK popup login flow is not the most suitable for mobile in many cases.
You might have better luck implementing the manual login flow, https://developers.facebook.com/docs/facebook-login/manually-build-a-login-flow
If you open that in a new window, you’d have to find a way to close it again, and have the iframe notified that successful login has happend. (Perhaps postMessage before closing the login window.)
Another possible option would be to redirect in the top window (instead of opening a new window/popup), and then after login back to the 3rd-party site, that loads your iframe again. (But not all people using your plugin on their page might like that.)

Is it possible for the Braintree Drop-In UI PayPal button pop-up to work on a webpage that is displayed inside an Adobe AIR desktop app?

We have a web page that uses the Braintree Drop-In UI. If I visit the page in a normal browser like Chrome, then the pop-up for the PayPal button works properly.
But we want to use this page inside our Adobe AIR desktop app. When you view the page in AIR everything is fine except the PayPal button pop-up doesn't appear on click, so PayPal is essentially disabled.
Why doesn't the pop-up work? I was trying to find the code for the pop-up but I think it is buried somewhere in here:
https://js.braintreegateway.com/v2/braintree.js
Full disclosure: I work for Braintree.
braintree.js is currently not supported in compile-to-native runtimes. I'd suggest investigating the Adobe AIR documentation to determine how it handles pop-ups.

Paypal Rest API and Lightbox

I'm trying to get the Paypal in-context lightbox workflow to work with their REST API. I've been following instructions provided here:
https://go.developer.ebay.com/developers/paypal/documentation-tools/checkoutnow/how-to/ht-Hermes-xo
However, the lightbox does not seem to be working. The behavior I see is that the curtain comes up, the modal briefly appears and then disappears.
The REST PayPal payment process is not currently supported to work within a lightbox or iframe.
A bunch of new features are planned to roll out this year for the REST API calls. I'm not sure if access to use the lightbox will be available though - sorry.

Embedded Paypal adapative payments (using Lightbox) doesn't work on mobile web

Until recently I used a non-embedded Paypal Adaptive payments (Even in Mobile). I am trying to move to the embedded version (using the iFrame/Ligthbox method). It works perfectly on desktop, yet it doesn't work on mobile.
In mobile platforms, the Lightbox modal does open, but if I'm not logged in to PayPal, and click the log in link, the lightbox content is just refreshed and asks me to log in again. I tried to mimic the problem by setting my desktop user agent to a mobile one, and the issue is recreated.
Note: in the ligthbox flow, if a user is not logged in, the entire payment process happens in a popup window and not in the lightbox iframe.
Is there a solution to this? I looked everywhere but there's no documentation for this problem.
UPDATE: After investigating a bit, I found this piece of code in the PayPal javascripts in the iFrame:
if (ua.match(/iPhone|iPod|Android|Mobile|Blackberry.*WebKit/i)) {
window.location.href=this.href;
} else { // open popup code }
Which simply refreshes the login page! Is there a reason for this?
I ran into this same issue with the Lightbox flow and found the mini browser experience to work better on mobile devices.
More information regarding the mini browser experience (expType=mini) can be found here:
Adaptive Payments without modal box or popups?