Stripe Checkout not working on phone browers, desktop browers fine - android

I've got stripe working fine on my webpage but once I go on the webpage with my Android phone browser and try to checkout it gives me an error saying "The payment couldn't be completed because the original page seems to no longer be open. Close your tabs and try again.." I think it has something to do with the fact that on phone browsers the stripe Checkout form opens up in a new tab whereas on desktops it opens in a modal...
anyone ever experience this?

There was a similar problem with regards to the OAuth flow on mobile devices: https://groups.google.com/forum/#!topic/meteor-talk/8B1kjjvRimE
It seems to be a limitation with how mobile browsers are implemented so there's not much that can be done on that side. I think the best (only?) option is to integrate your checkout form into the page instead of in a popup. Not sure if Stripe offers this functionality but they probably do and if not, I'm sure there are other payment processors that do.

I emailed them and got it fixed. The thing to look out for is importing a download of checkout on your own server rather than just using the link they provide. For example, use:
<script
src="https://checkout.stripe.com/checkout.js" class="stripe-button"
data-key="YOUR_KEY"
data-amount="2000"
data-name="Pay"
data-description="Pay $20.00"
data-image="myimg.png">
</script>
instead of something like:
<script
src="/files/checkout.js" class="stripe-button"
data-key="YOUR_KEY"
data-amount="2000"
data-name="Pay"
data-description="Pay $20.00"
data-image="myimg.png">
</script>
Not entirely sure what I may have done in my server file to cause the error, but this change fixed it, so hopefully that helps!

Related

In Firefox for Android not a single link clicks, it only highlights in grey

If you go on my site on Firefox for Android (either a mobile or a tablet) the links either in the menu, or anywhere else for that matter refuse to click, they only highlight in grey as if they're active, but don't actually do anything.
It works fine in Chrome for Android...I can't figure this one out. Help greatly appreciated.
The site is built in Wordpress
Total Lawn Care link
There seems to be a missing closing </div> tag in the html. I think the div <div class="gwrapper"> is the one causing the problem. Chrome is smart enough to "guess" where things should be closed and still work correctly but firefox has more strict of standards.
try modifying the html and add the </div> where you think it needs to be.
you can go to W3C validator.org
to check for errors in your html. I used an editor like Webstorm to help track the problems.
I hope this helps!

Loading Chrome Android Intents from an iframe

I'm trying to use Chrome's new Intent:// structure, and I've determined these intent URLs don't resolve when inside an iframe.
For example:
iframe.html
Take a QR code
test.html
<iframe src="iframe.html" width="300px" height="300px"> </iframe>
When you click on the link, you'll get a 302 UNKNOWN_URL_SCHEME within the iframe. This happens both Chrome and Chrome Beta.
Is there any plan to support this use case? What is the reasoning behind this design choice? Is there any way I can load an intent from an iframe?
Thanks,
https://developers.google.com/chrome/mobile/docs/intents
Quick answer: No, it is a potential security risk.
I have replicated the three ways developers used it here http://jsbin.com/ozecok/latest (all fail)
Intents are the officially supported way to launch Android applications from the web and you have to do that either via a user gesture in the host page (not an iframe) or via a redirect to the intent syntax.
Try to add target="_blank" in your link tag, this worked for me.

Mobile Firefox addon development: window.BrowserApp.deck is null

I'm trying to write a simple little addon for Firefox Mobile, starting from this skeleton. Ultimately I'd like to be running a bit of code against every new page loaded, which seems to be best accomplished by adding a "DOMContentLoaded" listener to every new tab, which fires when that tab loads a new page. To that end I need to detect new tabs, which is apparently in turn done by adding a "TabOpen" listener to the BrowserApp's deck.
Problem: At startup (but not when installing into an already loaded session), window.BrowserApp.deck is null for the only window. The documentation, what little there is, doesn't seem to suggest this is possible.
To test this yourself, download the skeleton linked above and add
window.NativeWindow.toast.show(window.BrowserApp, "long");
below line 48 of bootstrap.js, then build, install on Mobile Firefox, and restart. You'll see a toast reporting BrowserApp's properties, including 'deck: null'. (I'm also currently hosting a copy of the extension you'll so obtain on my server, which is be much quicker to test: just point your Mobile Firefox browser to that link, install, and restart.)
What gives? Am I misreading something? Is there a better way of doing what I'm trying to do which won't run into this problem? Is there more extensive documentation somewhere?
Wait for the UIReady event.
window.addEventListener("UIReady", function(){your code}, false);

Posting form to a hidden iframe in Android browser

I just noticed that one of the things that keep working in browsers on PC, does not work on an Android browser.
I want to POST a form to a hidden iframe. This is basically to initiate a file download after verifying user credentials.
<form method="post" action='/downloader.php' target="hiddenframe">
....
......
...
<input type="submit" value="Download">
</form>
<iframe name="hiddenframe" style="display:none;"></iframe>
This doesn't work on Android browsers. I suppose I should be concerned of the iframe. What should I take care of or what alternatives I have to make this work?
Thank you for any insight.
check this notes about using iframe in Android:
dose apple and Android Browsers support Iframe??
I hope this helps you.
I don't know how Android handles frames, plus different Android roms use different browsers.
What I do know is that as of HTML5 frames are deprecated, therefore not a very good practise. If not anything you are going to have more and more compatibility issues with new browsers in the future.
Why don't you do the request on the same page? If the downloader.php has the proper headers the download process should start without breaking or changing the current page at all.

Easiest way to launch webpage in android with an icon

We have a website that offers an e-mail service. We would like to create a fully fledged app for this but cannot afford this right now. In the mean time it would be great if we could give users an icon on their phones that will take them to a page formatted for mobile on the internet. So what I'd like to know is how can we get an icon on an android users phone that will simply launch a web link in a browser- does this have to be an app, is there an easier way, or am I over estimating how complicated it would be to make this as an app anyway?
Thanks in advance
Create a new Android project (after following the SDK installation steps provided at http://developer.android.com)
on the directory /res/drawable-*dpi you have the laucher icons. Modify all of them.
In the main activity, delete all inside the onCreate method an put this:
String url = "http://www.YOUR-URL.com";
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(url));
startActivity(i);
This will open the android browser with the URL provided.
I have done projects like this in the past, it is very simple. You need to create a website formatted for a smaller screen. Once you do this, building an android app that displays your website inside it is simple. You can even remove all of the android browser toolbars so it appears as if your website is a real android application. Google android webviews, this will point you in the right direction.
See here for what's probably the best instruction page on how to do exactly that:
http://intelnav.50webs.com/app_project.html
It's based on a Webview, that is it opens the page and does all the navigation in the app window, not in the default browser. So if you want to open it in the browser, you have to use Intent, as said in previous answers.
My 2 pennies worth, I think it's better in the app window unless you really want complex navigation with the possibility of opening additional tabs, windows and so on. The drawback with the external browser is that, as far as I could see, there's no way to tell if the page is already open in the browser so you'll launch a different copy (in a new tab) every time. If the user doesn't close the tab at the end, they usually don't, it can become quite annoying. Besides, within an app you'll probably have somewhat better possibilities for ads should you ever want them.
Versus a simple home-screen bookmark, as others pointed out, it's simpler and more convenient for end users to just download an app from an online store (usually Google Play). It's what they're used to do. And they do have a lot of additional info available, like what it does, what others say about it, screen shots (if you provide some for them but you should). Plus a way to comment / complain themselves. It's a different thing. Technically it may not make a lot of sense but from a simple user's perspective it's clearly better IMO.
One way is to bookmark the site and then add it to your home screen. Source
It seems to me like you need a mobile version of your web page. Do you have that already? Once you have your mobile website (ie. website optimized for mobile devices), you could create a simple application with only one WebView. All content would be fetched from your site and displayed inside a webview. This is trivial to make, however, making an entire mobile website will take some time.
Note that you do not HAVE TO have a mobile website, you could pack you existing website into a WebView, but this would lower user experience.
you would build an app that launches a browser intent linking to your website, or a custom WebView to launch your website in full screen without any navigation bar etc..
The only easier way is to put instructions on your site (directly, or as a contextual pop-up) on how to add the bookmark as an icon on your home screen. This can be slightly more complicated on Android, and depends on the browser. A simpler option for your potential users is to provide a wrapper app via the Marketplace.
It is not overly complicated to create a simple wrapper Android app in Java that launches the browser, using Intents. The essential browser launch code is basically this:
Uri uriUrl = Uri.parse("http://www.yourwebpage.com");
Intent launchBrowser = new Intent(Intent.ACTION_VIEW, uriUrl);
startActivity(launchBrowser);
A more detailed tutorial for creating this is available here:
http://mobile.tutsplus.com/tutorials/android/launch-android-browser/
Try this kick-start mobile device app for showing websites. Written with cordova for platforms like android, ios, browser and so on: https://github.com/jetedonner/ch.kimhauser.cordova.kickstartwebsite (GooglePlay: https://play.google.com/store/apps/details?id=ch.kimhauser.cordova.kickstartwebsite, Website: http://kimhauser.ch/index.php/projects/cordova-phonegap/kick-start-website)

Categories

Resources