This repository showcases a reference implementation for ATM Locations using APIs from Mastercard Developers.
Try the demo.
Note: The demo uses live ATM locations data and therefore it is restricted to New York, NY 10011, United States.
- Spring Framework 3.2.17
- jQuery 3.1.1
- sanitize 4.1.0
- Java 7 and above
- Set up the
JAVA_HOME
environment variable to match the location of your Java installation.
- Create an account at Mastercard Developers.
- Create a new project and add
Locations
API to your project. A.p12
file is downloaded automatically. Note: On Safari, the file name will beUnknown
. Rename it to a .p12 extension. - Copy the downloaded
.p12
file tosrc/main/resources
. - Open
src/main/resources/mastercard-api.properties
and configure:
mastercard.api.debug
-true
if you need console logging, otherwisefalse
.mastercard.api.p12.path
- Path to keystore (.p12). Uses Spring's resource strings.mastercard.api.consumer.key
- Consumer key. Copy this from "My Keys" on your project pagemastercard.api.key.alias
- Key alias. Default key alias for sandbox iskeyalias
.mastercard.api.keystore.password
- Keystore password. Default keystore password for sandbox project iskeystorepassword
.mastercard.api.sandbox
-true
if you are using sandbox environment, otherwisefalse
.
- Get a Google Maps API key at Google Maps APIs.
- Open
src/main/resources/google-maps.properties
and configure:
google.maps.api.key
- This value is automatically applied to src/main/frontend/index.html during the maven build process.
Windows:
mvnw.cmd clean tomcat7:run-war
Linux / Mac:
./mvnw clean tomcat7:run-war
Open http://localhost:9090/ref-impl-atm-locations/.
Windows:
mvnw.cmd clean package
Linux / Mac:
./mvnw clean package
Deploy ref-impl-atm-locations.war
in target/
directory to your container.