Google Wallet for digital goods - building the tutorial - android-pay

So I'm working on getting Wallet for Digital Goods going and running into a few problems getting a Java sample up and running.
Problem #1 - I was trying to build jsontoken package and it references other packages and therefore the problem. Fortunately someone posted a jar file and am now using that.
Problem #2 - Am using the sample java snippet at link below to get the getJWT() function to work:
https://developers.google.com/commerce/wallet/digital/docs/tutorial#2
Using the above mentioned jsontoken lib.
I'm getting undefined for
JsonObject
The type org.joda.time.Instant cannot be resolved. It is indirectly referenced from required .class files main.java /jsontoken/src line 1 Java Problem
I can also see some other problems ISSUER, SIGNING_KEY, Issuer class etc.
After some searching, I added:
gson-2.2.4.jar and guava-gtw-14.0.1.jar files.
and am now down to undefines for
org.joda.time.Instant
ISSUER
SIGNING_KEY
Before I invest too much time, I just wanted to make sure I was headed in
the right path.
I'm planning to sell digital-goods over the web (not in-app) and was planning
to use WALLET FOR DIGITAL GOODS api - correct???
Looking at the state of these sample tutorials - is it a little bit too early
to look at it or hold off a few months.

The "Resources -> Samples" section of the documentation contains a fully working sandbox Java sample including the source code. Give it a try at:
https://developers.google.com/commerce/wallet/digital/docs/samples#iap-java

Related

Youtube API Node.js quickstart not working: "The API returned an error: Error: invalid_grant"

I followed the tutorial Node.js Quickstart, including installing the libraries googleapis and google-auth-library. I believe I followed the instructions for setting up the credentials properly to my best ability, but I lack the experience to know for sure.
I was unable to exactly follow the tutorial, specifically this line:
e. Select the application type Other, enter the name "YouTube Data API Quickstart", and click the Create button.
because the drop down selection box had no "Other" type.
I had a project using this system working in the past, but it suddenly stopped working. I had not used the program for months, so it is possible something happened in the meantime, but I also absentmindedly revoked the program's access to my Google account.
I am not using the same credentials as before it broke -- in the developer console, I not only deleted the old credentials and downloaded brand-new ones, I created a new project altogether.
Here is an image of the credential:
Of course, I downloaded and renamed the client_secret JSON as instructed.
Here are my project files:
Since I directly copied the code, I have not tried changing it, though I did look through it to make sure there were no IDs I needed to copy in or anything of the sort.
I tried looking through this article, but I had no idea where to even begin the stated debugging processes, as my only experience with OAuth, Node.js, and the YouTube API is this project, and I don't even understand how I got it working originally.
If anyone has any ideas on ways I could try fixing this, or more thorough instructions on how I could begin debugging, I would be immensely grateful.
If relevant at all, I am using the WebStorm IDE.
Screenshot of the terminal:

node-quickbooks vs intuit-oauth

I am doing research on quickbooks online integration using node and angular 8.
The official intuit developer site provides two node packages.
one is official from intuit and one is from community.
I have glanced through both of them.
the official package is fairly universal. It essentially is just a API client to send a request to remote server and the payload is basic json format.
the community package seems a bit more specific but the documentation seems a bit confusing.
Which one would you choose to do the work and why?
I would love to hear your input.
Thanks :)
The Intuit provided library (intuit-oauth) is specifically for authenticating and getting the OAuth token you need to communicate with the Quickbooks API, the other library (node-quickbooks) is for making the actual calls against the API endpoints.
You will need both libraries, unless you are handling authentication in a different way.
Fwiw for whoever finds this useful:
I forked intuit-oauth, added typescript and fixed vulnerabilities that have been fixed in the PRs of their repo for years and never updated here: https://www.npmjs.com/package/intuit-oauth-ts
Additionally I forked node-quickbooks, updated the api to return promises rather than relying on callbacks, resolved the discovery URLs automatically, changed the format of response objects to be more sensible, and added (unfortunately only some) of the typescript definitions for it here: https://www.npmjs.com/package/qbo. I don't have enough time to add the definitions for all of the files (largey because the included ones should be completely exhaustive for every property in the QBO api, which is timeconsuming to define). If someone would like to contribute by adding more of the typescript definitions or adding all of them, I would really appreciate it.
I am interested in any example angular app using intuit-oauth
Trying to work it out but getting issues since there is no document for typescript.

IBM Natural Language Processing Projects (Beginner getting started question)

I've been digging into the IBM Cloud Services, Watson and NLP. Just installed the CLI and tried with Node SDKs, and a starterkit, unfortunately I did not succeed by trying to get a sample code by default to understand how it works.
After that, I did some research get a better open minded approach to how actually I could use some of their free services to get started, but there's actually to vague information, even though the IBM Docs are pretty extensive and well written, it can get very confusing.
I would appreciate any open source repo, or working/live project that you are willing to share to make a better image in my mind about it IBM cloud services.
A few days ago I wrote a sample application using the Natural Language Understanding service. Check the source code here: https://github.com/watson-developer-cloud/natural-language-understanding-code-pattern
The README has instructions on how to get the apikey which is the way you will use to authenticate your API calls.
Since you are using Node.js you can start with the sample above and also look at this page: https://cloud.ibm.com/apidocs/natural-language-understanding/natural-language-understanding?code=node which includes examples for all the features in Node.js using the node-sdk: https://github.com/watson-developer-cloud/node-sdk/

Running sample projects in MvvmCross v3 (Hot Tuna)

I'm trying to run sample projects (viz. BestSellers and Conference) that are present in MvvmCross v3 branch. I resolved the strong assembly reference issues successfully. However each time I run a sample project, I get System.TypeLoadException in MvxFullBinding and MvxValueConverterRegistryFiller classes.
Exception in MvxFullBinding class:
Exception in MvxValueConverterRegistryFiller class:
Is anybody able to run the sample projects successfully? How do I get around these exceptions?
It looks like you're running this as the 'Touch' projects from Visual Studio? In which case you are way ahead of what I've managed to achieve.
If that is correct, then I suspect that what you are seeing is that you have:
built proper PCLs built in VS/Windows against the portable reference assemblies
but these cannot be executed against the current MonoTouch/Xamarin.iOS runtime.
If you try, you may see issues like: iOS black screen and MissingMethodException: Method not found: 'System.Type.op_Equality'
For some more info see 'almost portable binaries' on http://slodge.blogspot.co.uk/2013/01/almost-portable-binaries.html
There is 'proper' PCL support currently being worked on within XamLabs - so I am hopeful that there may be a solution to this problem arriving in the Xamarin.Android Alpha channel any day now - but don't expect this to be painless initially.
Of course, I might be wrong on this - this really is new territory and I will be fascinated to hear/read about your adventures. If you want to try to find more detail, then it may help to try looking deeper into the exception details, and looking into the console log trace on your mac.
For these two particular exceptions, I can confirm that both samples...
... although that is when I'm working on my Mac.

File System Filter and CryptoAPI issue in Win CE

I have been working on a file system filter for the past two weeks and I have come across an interesting issue. I basically built the encoding/decoding implementation in an app that runs on the OS startup in Platform Builder first to verify that it works and for debugging purposes. This app works fine and is able to acquire a context ,generate keys , encrypt /decrypt without issue.
When I try to do the same thing on filesys dll load (this is the point at which file system filters are loaded in my understanding), no CSP services seem available to my file system filter. CryptAcquireContext fails with NTE_BAD_KEYSET or when I attempt to use the default provider, it fails with NTE_PROV_TYPE_NOT_DEF.
In frustration I wrote some code to enumerate all the providers available at that time and it turns out there arent any when filesys is loaded, wondering if anyone has any experience or ideas that can help. I have officially run out of ideas.
Cheers
Bernard

Resources