Google pay isReadyToPay() returns false in Google Chrome in Android mobile - google-pay

I am running into an issue where isReadyToPay() from google.payments.api.PaymentsClient always returns false in Android Chrome version.(all other devices it works fine)
If I switch to Desktop version in chrome, it starts working and isReadyToPay() returns true.
enter image description here
Payload passed to isReadyToPay()
{
"apiVersion":2,
"apiVersionMinor":0,
"allowedPaymentMethods":[
{
"type":"CARD",
"parameters":{
"allowedAuthMethods":[
"PAN_ONLY",
"CRYPTOGRAM_3DS"
],
"allowedCardNetworks":[
"AMEX",
"DISCOVER",
"JCB",
"MASTERCARD",
"VISA"
]
}
}
]
}
I tried changing allowedAuthMethods and Payment methods to see if it helps but it didn't.

Related

strange behaviour Laravel Livewire with 2 instances

I have a simple page in Laravel 8 with livewire (jetstream). On that page i can open a modal form. In fact i have 2 modal forms in that page, one for editing and one for confirming prior to a delete.
I was testing and had Edge open with one instance (logged in a test user) and one instance in Chrome (logged in as another user).
When i opened the edit-modal on Chrome, the confirm-delete modal opened in my Edge browser.
I display my ConfirmDelete model with this:
<x-jet-dialog-modal wire:model="confirmDelete">
...
i watched my variable and it did go from false to true when i opende the other modal on my other browser.
{{-- modal form --}}
<x-jet-dialog-modal wire:model="modalFormVisible">
When i look at my Network tab in the Chrome diagnostics is see this:
{
"data": {
"modalFormVisible": true
},
"checksum": "7697e888b4472a9519f206d733a5d15e42a3f346b0d7fbcd349a25f67de67c86"
}
And at that same time, doing nothing in my edge browser, there i see this in my network tab:
{
"htmlHash": "f65525e2",
"data": {
"confirmDelete": true,
"modelId": null,
"name": null,
"myPermissions": null
},
"checksum": "60117ff32a9956f915e1a2dab4a6671ce2ff236435ae10c4955f94cb7f9d590d"
}
I am using Apache and am using browsersync.
Any Ideas? Is this normal behaviour?

Get notified when execution context is changed or created

I am injecting bunch of javascript code to a website by means of selenium webdriver (over chromedriver).
While the method i use works most of the time, it fails when an iframe is loaded or page is reloaded by website's javascript code.
I can trace the problem from the chromedriver's log.
For example:
[6.203][DEBUG]: DEVTOOLS EVENT Runtime.executionContextDestroyed {
"executionContextId": 1
}
[6.203][DEBUG]: DEVTOOLS EVENT Runtime.executionContextsCleared {
}
[6.203][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated {
"context": {
"auxData": {
"frameId": "274.1",
"isDefault": true
},
"id": 5,
"name": "",
"origin": "https://<some url>"
}
}
When i see executionContextDestroyed i know that, most probably my injected scripts are destroyed too. I have tried bunch of options like switch_to.default_content() or switch_to.parent_frame but they didn't help, as there is nothing to do in case of reload but re-inject the scripts.
My question is, is there a way to hook into executionContextCreated events, so i can inject my scripts/functions into the context again and again.

Calling phone with appcelerator

I'm trying on device make calls but device do not nothing...
This is my code, i'm using Appcelerator 4.4.0.201511241829, IOS 9.2
var dialog = Ti.UI.createAlertDialog({
cancel: 0,
buttonNames: ['Cancel', 'Ok'],
message: "Are you sure?"
});
dialog.addEventListener('click', function(e){
if (e.index !== e.source.cancel){
// IF WE ARE BUILDING FOR DEVELOPMENT PURPOSES - TRY CALLING A FAKE NUMBER
if(ENV_DEV){
Titanium.Platform.openURL('tel:00000000');
}
// ELSE IF WE ARE BUILDING PRODUCTION - THEN USE THE LISTED NUMBER
else if(ENV_PRODUCTION){
Titanium.Platform.openURL('tel:00000000');
}
}
});
dialog.show();
any help?
Your code for call a number seems correct. I suppose that nothing happen because ENV_DEV and ENV_PRODUCTION variables are not True, and so the two if statements are not satisfy.
First of all I suggest you to add an else statement for be sure that one one condition is satisfy. You can modify your code like this:
// IF WE ARE BUILDING FOR DEVELOPMENT PURPOSES - TRY CALLING A FAKE NUMBER
if(ENV_DEV){
Titanium.Platform.openURL('tel:00000000');
}
// ELSE IF WE ARE BUILDING PRODUCTION - THEN USE THE LISTED NUMBER
else if(ENV_PRODUCTION){
Titanium.Platform.openURL('tel:00000000');
}else{
Titanium.Platform.openURL('tel:00000000');
}
Secondly you can add a console log like this Ti.API.info("yourMsg") in each statements to check in which if you are.
I hope this is helpful
Your 'dial a number' code indeed seems correct. I would like to suggest you to structure your code a bit different, I'll give you an example from a recent project of mine.
You can configure phone numbers for your different environments(prod, dev) in your config.json(assuming you are working on an Alloy project, and not a Classic Titanium project), an example:
{
"global": {
"phoneNumber": tel:0032499001122"
},
"env:development": {
"phoneNumber": tel:0111111"
},
"env:test": {},
"env:production": {}, ..
This reduces the code in your click-handler to:
if (e.index !== e.source.cancel){
Ti.Platform.openURL(Alloy.CFG.phoneNumber);
}
Because you pass the environment when you start the application, you do not longer need to check the environment in your code.
Don't forget to add your environment flag(-D development) if you run your app via the CLI, eg.
titanium build -p ios -T simulator -D development

Universal Links iOS 9 - Issue

I have implemented Universal links in iOS app. It works perfectly when I put the url in external app such as "Notes" and then tap it. It opens the app.
What I want to achieve is that when someone visits a specific url of my webpage, the ios app should be launched by itself. So in order to accomplish this, I have put:
applinks:www.mydomain.com
in my entitlements.
And the following in my "apple-app-site-association" file
{
"applinks":
{
"apps": [ ],
"details":
[
{
"appID": "team_id.com.teamname.app_name",
"paths": ["/path-CompA/path-CompB/"]
}
]
}
}
But When I navigate through my website, and I reach the path mentioned in json file, it only shows the bar at top of web page saying "Open in App_name" with "Open" button on right side.
I want to know if its the default behaviour of Universal links to not open the app if user is coming from the same domain? If its not the case then how does it open the app form "Notes".
Please note that my json file is not signed but I have put it on my website which is on https.
Thanks,
A couple of things. Can you try changing your apple-app-site-association file code as such?
{
"applinks": {
"apps": [],
"details": [
{
"appID": "team_id.com.teamname.app_name",
"paths": [
"*",
"/"
]
}
]
}
}
You can check your format with this validation tool: https://search.developer.apple.com/appsearch-validation-tool/
The answer is that basically, this behavior is expected as of iOS9.2, with Universal links. Universal links only work from a different domain.
With Branch (https://branch.io/), you can use one domain for links (bnc.lt), so that when you (as a developer using branch) host universal links on your site, they still operate as expected.
Also, for universal links from other domains (not to the same domain), you can 'unbreak' the safari redirect behavior by long-pressing on the link from an application and choosing 'Open in «App»'. I hope this helps!

IBM Worklight 6.0 - Cordova camera simulation in the Mobile Browser Simulator doesn't work

My camera code was working fine in WL 5.0.6 and the mobile browser simulator would correctly display the image. Now I moved to WL 6.0 andI get the following error when using the preview in the Mobile Browser Simulator and using the Cordova camera simulation to get a fake picture.
I am using Chrome for the preview.
Not allowed to load local resource: file:///C:/Users/Administrator/cordova/internal/sim/camera/camera1_m.jpg wljq.js:2374
The code is similar to this
navigator.camera.getPicture(onSuccess, onFail, { quality: 50,
destinationType: Camera.DestinationType.FILE_URI });
Note that if I use the DATA_URL, it seems OK with the mobile browser simulator. Just the FILE_URI doesn't seem to be working with the mobile browser simulator.
The Worklight 6.0 Mobile Browser Simulator supports Cordova 2.6 APIs. For navigator.camera.getPicture the following destination types can be used in WL 6.0:
Camera.DestinationType = {
DATA_URL : 0, // Return image as base64 encoded string
FILE_URI : 1, // Return image file URI
NATIVE_URI : 2 // Return image native URI (eg. assets-library:// on iOS or content:// on Android)
};
Example:
navigator.camera.getPicture(
function(data) {
document.getElementById('camera_status').innerHTML = "Success: picture located at " + data;
var img = document.getElementById('camera_image');
img.style.display = "none";
},
function(e) {
console.log("Error getting picture: " + e);
document.getElementById('camera_status').innerHTML = "Error getting picture.";
},
{ quality: 50, destinationType: navigator.camera.DestinationType.FILE_URI, sourceType: navigator.camera.PictureSourceType.SAVEDPHOTOALBUM, encodingType: fileType});
Try clearing your browser cache and then be sure to accept the applet permission dialogue on Mobile Browser Simulator startup. Also make sure that your file permissions will allow transfer from the C:/Users//cordova/internal/sim/camera/ folder as that is where the applet stores the camera sim image content.
Cordova 2.6 Camera API reference:
http://docs.phonegap.com/en/2.6.0/cordova_camera_camera.md.html
Funny, that there is already a troubleshooting document for your problem.
http://www-01.ibm.com/support/docview.wss?uid=swg21614861
It looks like DATA_URL didnt work in WLv5, while (if you are right) FILE_URI is not working since WLv6.