Very Spacy Food is a food ordering demo application built with VGS Collect SDK for securely collecting credit card data.
- The organization should be registered in VGS Dashboard;
- Android Studio;
- Android 4.4 (API level 19) and above.
Go to your VGS organization and establish Inbound connection. For this demo you can import pre-built route configuration:
- Find the configuration.yaml file inside the app repository and download it.
- Go to the Routes section on the Dashboard page and select the Inbound tab.
- Press Manage button at the right corner and select Import YAML file.
- Choose configuration.yaml file that you just downloaded and tap on Save button to save the route.
Now the data you sent with the VGS Collect SDK will be secured.
Clone Very Spacy Food application repository.
git@github.com:vgs-samples/very-spacy-food-android.git
Go to build.gradle and find the code:
buildConfigField "String", "VAULT_ID", "<VAULT_ID>"
buildConfigField "String", "BASE_URL", "<VGS_COLLECT_AND_PAY_SERVER_URL>"
Replace "<VAULT_ID>"
with your vault id,
"<VGS_COLLECT_AND_PAY_SERVER_URL>"
with URL to your API for storing redacted payment data collection and revealing this data to a third-party payment services.
Rebuild Project.
Run the application and try to order some Very Spacy Food.
You can use the following test card data to make the order:
Joe Business
as a Cardholder Name;4111111111111111
as a Card Number;11/22
as an Expiration Date;123
as a Card Verification Code (CVC);
Press Save button. Now data should be submitted to VGS.
Go to the Logs tab on Dashboard, find request and secure a payload.
Instruction for this step you can find here.
Press Checkout button. After successful response you may go to your Stripe dashboard and find your order.