Skip to content

Latest commit

 

History

History
62 lines (41 loc) · 2.1 KB

README.md

File metadata and controls

62 lines (41 loc) · 2.1 KB

PCFTileDemo

alt text

This is a Spring Boot web app that demonstrates how to build an eCommerce web site that can accept payments via the First Data Tile on the Pivotal Cloud Foundry PaaS

Pre-requisites

  1. Get your free PCF account by stopping by the First Data table on the Money 20/20 Hackathon floor.

  2. Login to the PCF console from a Browser at https://console.run.pivotal.io

  3. Click the Marketplace link and then the 'First Data API' Tile.

  4. Select the 'First Data Anonymous Plan' and then tap the 'Select Plan' button.

  5. Provide an instance name (e.g. myteamname_FD_service) and click 'Add'.

(You have now created a PCF 'connection' to a Sandbox merchant and developer account on the First Data API)

  1. Install the PCF command-line tools as per these instructions

Coding

  1. Edit manifest.yml: replace the #service name with the instance name you specified in Step 5 above.

  2. Build the app from the command line with:

$ mvn clean install

Deploy and run

  1. Connect to PCF from the command-line with:
$ cf login -a https://api.run.pivotal.io

Supply the PCF credentials, organization and space names that you obtained when you signed up for your PCF account.

  1. Deploy your app with:
cf push fdtiledemo

Your app will be deployed and launched

  1. Test your app by pointing your Browser at the url specified in the output from cf push (e.g. https://fdtiledemo.cfapps.io)

Supply the following values to make a test payment:

Field Name Value
Name {any string}
Amount (in pennies) {a whole number, eg 1299}
Currency USD
Credit Card Number 4788250000028291
Expiry Date {any MMYY in the future, eg 1218}
CVV {any 3 digits}
Card Type Visa
Transaction Type Authorize

Click the Submit button. The JSON response will appear at the top of the page