GithubHelp home page GithubHelp logo

vivezmobile / s2ap-quickstart-java Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rpanwar/walletobjects-quickstart-java

0.0 0.0 0.0 37.3 MB

Java Save to Android Pay Quickstart

License: Apache License 2.0

Shell 0.71% Java 93.15% JavaScript 4.24% HTML 1.90%

s2ap-quickstart-java's Introduction

s2ap-quickstart-java

This sample demonstrates integration of the basic components of the Save to Android Pay API. Review the quickstart guide to run the sample.

This sample showcases several aspects of the API

  • Creation of Classes and Objects
  • Save to Android Pay insertion of classes and objects
  • The Web Service API

##Creation of Classes and Objects The code for creation of classes and objects can be found under the src/com/google/wallet/objects/verticals directory. Each Object type, such as loyalty, is broken out into its own file. Classes are inserted using the WobInsertServlet.

Save to Android Pay insertion of classes and objects

Save to Android Pay is handled on both the client and server. The index.html file is the landing page for the application and includes app.js. The app.js file makes a request to the WobGenerateJwtServlet to generate Object type-specific JWTs. You must update the origins list in WobGenerateJwtServlet to run this on a domain other than localhost. The app.js file inserts the appropriate g:savetowallet tags and the Save to Android Pay JavaScript after all of the JWTs are generated. The JavaScript must be appended after the g:savetowallet tags because it parses the page to render Save to Android Pay buttons when it's completed loading.

Webservice API

The Webservice API handler is WobWebserviceHandlerServlet. This servlet handles Webservice requests, generates Loyalty Objects, converts Loyalty Objects to JWTs, and responds with the JWT. The URL to this handler is defined within the war/web.xml file. You can configure your discoverable to point to the URL handled by WobWebserviceHandlerServlet.

Analytics

s2ap-quickstart-java's People

Contributors

samtstern avatar pengying avatar zcancio avatar daisy1754 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.