Stop Braintree paypal in modal opening in new tab - ruby-on-rails

I need to make PayPal show in model, when user presses it's button, right now it just open new tab, which is not great UX.
Didn't find that in documentation

I am a developer at Braintree.
Let me know if you have any other questions at support#braintreepayments.com
Braintree's Pay with PayPal integration will always force a pop-up window hosted on a PayPal domain in all the environments and browsers that support it. This means that you cannot make PayPal appear in a modal; whether it does or not will be decided based on the browser you are using. The reason for this is that it provides a higher level of verifiability if you can see the PayPal domain name in your browser's location bar.
The Braintree docs will be updated to reflect this.

Related

Integrate 3D secure with Stripe in iOS

I've been trying to implement 3D secure payments in my iOS app for a few days now and feel completely lost. Even though the SDK integrates this functionality, there seems to be very few mentions to it in the docs and even less on the forums out here.
I followed what's explained here in the official stripe docs:
https://stripe.com/docs/sources/three-d-secure
https://stripe.com/docs/mobile/ios/sources
and also on this tutorial:
https://www.hitchhq.com/stripe/activities/591b075c9659a6263d0ccd0e
But still couldn't get how to proceed exactly. Small precision, I was until now using tokens to charge my users and it works on production, but I now have to use sources for threedsecure.
Until now I've managed to show the confirmation view (both the test one or the one from my bank on production) and authorize the payment. But then I am always prompted a blank view only containing an ugly blue button saying "Go back to MyApp". I don't understand that, this is ugly and useless, and I guess I'm doing something wrong so that I get this right ? I would expect to be redirected to my app right after the user confirms his credit card.
Then, when the user authorized the credit card, I'm back in my app, and the docs say I have to call startPollingSource on the iOS side which will act as a hook to inform me when the charge is complete. On my server I should also implement a webhook which will get notified when the card is authorized and confirm the charge.
There I am completely confused, why can't I just send the source_id to my server and confirm the charge through this one simple call ? This double-hooks workflow makes no sense to me ..
Here I am, this doesn't work, and I guess I missed something somewhere here.
My advice is to not try to implement stripe from scratch.Even though the integration is not that hard,they miss a lot of things in the documentation.
Better work on this sample project from their repo
https://github.com/stripe/stripe-ios

Automating apple pay integration in mobile web with safari browser

I got a requirement to integrate Apple pay to our E-commerce website. This is intended only to run in safari mobile browsers. I am in search for a way to automate the apple pay integration. We will have an option from cart page to choose Apple pay. Once user selects this a panel is displayed which have options to select the saved credit card, addresses in the mobile phone (we call this as apple payment sheet). These informations are prefilled but user can change this. I believe this is some kind of native code which displays this panel above the safari. I need to device an end-to-end test which has both normal web simulation and the payment sheet simulation so that it could complete an order successfully.
For this, I have few roadblocks:
We need a common tool which can simulate user interaction in mobile web (this is currently done by webdriverIO) and the payment sheet provided by safari for apple pay(No idea how to inspect or simulate user interaction on this panel).
2.We need to simulate fingerprint authorization from the test automation tool. I am still to get a solution for this. Have considered many tools but found out that none of them can help. Not sure about the capabilities of Appium in this regard. It would be of great help if someone can point me in the right direction of choice of tool that can be used here.

Branch.io how to migrate from universal links on primary domain

Currently we have universal links which look like http://example.com/sharing/< id >/ which open our iOS app through the safari smart banner. But smart banners sucks, so we'd like to use the Branch.io journeys banner, which actually appears when people load the page. Since these links are already in the wild, they need to continue to work have have some way into the app. In the future we'll generate branch.io sharing links from inside the app, but these landing pages on the web will continue to exist.
I'm calling branch.init('key_test_foo'); from javascript, and the Journeys banner appears. It only ever shows the "Get" button and never "Open". I'm not clear how I pass the object ID through branch.io so that the app can navigate to the right place.
The app is built in Xamarin, and I think I have the integration built correctly following the example. It is not in our production build through the app store, I'm just running the app through the debugger in Visual Studio.
I'd even settle for an "Open in App" link like imgur has, as long as there's something I can click in safari to open the app in the right place.
I don't feel like I should have to "make a link" every time this page gets viewed, right?
EDIT:
One additional question. I think I want to change my og:url so that when facebook scrapes my page, it will open through branch (instead of back to my site). But how would I set that? Facebook isn't going to run any JS when it loads the page is it? Can I just set it to my.app.link and magic will happen from the al:ios:url that drives the deeplink routing?
I think this: https://stackoverflow.com/a/34596340/401636 might be the solution.
1. The Journey's banner navigating to your app.
Branch uses the domain of the format -alternate.app.link domain for the link behind the Journeys button. To ensure that clicking on Journeys CTA, navigates to your app ensure that you have added the -alternate.app.link domain for your app in the 'Associated Domains' file. You can check the documentation providing information on how to add the domains here.
2. The Get v/s Open issue for the Journeys CTA
Branch uses a variable has_app to determine whether the device has the app or not. For this variable to be set to true, a user should click on the Journey CTA and be redirected to the app (not the App Store). Also, the issue of the CTA not updating is common during development, because the app is frequently re-installed on the device. Due to this testing, the flag, has_app, goes in a faulty state.
To force reset the has_app variable to change the Journey's banner CTA from 'Download' to 'Open', please follow these steps:
Click on the Download button - this should redirect to the Play or App Store
Install the app
Return to the web page with the Journeys banner, which should still display the Download button
Tap on the Download button again - the app should open
Close and then re-load the web page with the Journeys banner - the banner should now have an "Open" button
Tap on the "Open" button
Please note that the above steps are required only during development mode for testing purposes. Out in the wild in production, users will not see this issue. Also, it might take some time (as long as 30 minutes) for the flag to updated.
3. Navigating to the right place in your App
If you plan on using your old domain links for deeplinking, you can update your Link domain on the Branch dashboard to the domain your links are currently using. You can then recreate the links again with the Branch API. Please note, Branch will be the authoritative registrar for your domain and you cannot host anything on this domain.
If you do not wish to do that, you can append additional link parameters to your Journeys button. These link parameters will be available in your app when the user clicks on the Journey CTA and is redirected to the App Store/your app. You can refer to the documentation here for more information.
For both the above scenarios, in order to read the link parameters in your app, you should integrate the Branch SDK in your Xamarin app. (Reference documentation here)

IOS Paypal MPL reinitialization issue

I'm using Paypal's MPL Framework and all works fine. I have a requirement to change the Paypal application id dynamically (application works with different ids based on user prefs). I'm initializing the Paypal on my main page to follow Paypal documentation.
I was wondering if I can reinitialize paypal if user changed to a different setting?!
I tried calling the [PayPal initializeWithAppID:appKey forEnvironment:e]; more than once but it seems only first key/call is effective. The calls after the Paypal is initialized i simply ignored.
The only option is to ask user to kill the application and run it again which is annoying at the best.
Help is appreciated as usual.

Add a link to my iPhone app before submission ("Catch 22")

I use the Facebook API for iOS, which enables posting content to the Facebook wall. The API allows custom links to be added next to "Like" and "Comment". I would like to add "Get App" here which links to my app on App Store, but how do I do this when my App ID will not be known to be before the app is actually approved? ("Chicken-and-egg" situation)
Possible solutions:
A) Link to a temporary URL which is changed to the App Store link after approval
B) Wait until version 1.1 to add this, when the App ID is known
Is there any other way to accomplish this?
You get an App ID once you create an app in iTunes Connect. That means you get the ID before you publish the app and it doesn't change when the app goes trough review or publishing process. I'm not able to make a screenshot right now, but it's easily found in top left corner when you click on manage apps > your app.
Some ISPs and independent providers offer domain name services that would help here, possibly.
I use EasyDNS, but there are other options.
The idea is that you register a domain name with them and purchase a plan that includes web forwarding. Web forwarding lets you send any web traffic for your domain to a specific URL.
You temporarily forward to any URL you like (presumably a page on your regular site, maybe a "Coming soon" page). Then, when you receive the real URL, change the forwarding to point there.
It might take a day or so for the change to percolate across the while interweb, but generally you can see and test results fairly quickly yourself, or at least that's been my experience.

Resources