Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

As a Farmer I want to purchase items from a shop and make payments using the Helium app

 

 

Lesson Outcomes

 

Scenario

The app use case for this lesson is that a farmer would like to make purchases from a specific shop using the application. This includes making a payment to the shop using Helium pay framework.

Firstly, a farmer will select a shop and use a submit button to confirm his selection. The view will then be updated to display a table of all the stock items that a shop has in stock. This includes the name of the item, the current stock level and the current unit price for the stock item. The farmer will then select a stock item using a row action on this table.

Once this selection has been make the view will again be updated to include info widgets showing the currently selected stock item, its stock level and unit price as well as a text area where the farmer can specify the quantity of the item he would like to purchase. Another submit button to calculate the total cost of the selection can then be pressed.

Once this has been done additional view components appear. This will be a summary of the price for the goods, the discount offered if the farmer has previously uploaded a government assistance certificate and the final cost to the farmer. Once the farmer confirms this, the payment will be recorded and sent to Helium for processing using the payment framework.

 

 

Tutorial App Files of Interest

 

Data Model Additions for Farmer Purchases

The only addition required for our data model is an object to keep track of purchases made by farmers:

 

 

Overview of View and Unit Additions for Making Purchases

 

Widget Visibility

 

Pay Built-In Function

 

@OnPaymentUpdate Annotation for Payment Callback Functions 

 

  • No labels