cic-internal-integration/apps/cic-ussd/transitions/transaction_transitions.json
Louis Holbrook 1e7fff0133 Minor refactors:
- Renames s_assemble to s_brief
-  Link s_local to s_brief
2021-03-04 16:47:13 +00:00

64 lines
2.1 KiB
JSON

[
{
"trigger": "scan_data",
"source": "enter_transaction_recipient",
"dest": "enter_transaction_amount",
"after": [
"cic_ussd.state_machine.logic.transaction.save_recipient_phone_to_session_data",
"cic_ussd.state_machine.logic.transaction.retrieve_recipient_metadata"
],
"conditions": "cic_ussd.state_machine.logic.transaction.is_valid_recipient"
},
{
"trigger": "scan_data",
"source": "enter_transaction_recipient",
"dest": "exit_invalid_recipient"
},
{
"trigger": "scan_data",
"source": "enter_transaction_amount",
"dest": "transaction_pin_authorization",
"conditions": [
"cic_ussd.state_machine.logic.transaction.is_valid_transaction_amount",
"cic_ussd.state_machine.logic.transaction.has_sufficient_balance"
],
"after": "cic_ussd.state_machine.logic.transaction.save_transaction_amount_to_session_data"
},
{
"trigger": "scan_data",
"source": "enter_transaction_amount",
"unless": "cic_ussd.state_machine.logic.transaction.has_sufficient_balance",
"dest": "exit_insufficient_balance",
"after": "cic_ussd.state_machine.logic.transaction.save_transaction_amount_to_session_data"
},
{
"trigger": "scan_data",
"source": "exit_insufficient_balance",
"dest": "start",
"conditions": "cic_ussd.state_machine.logic.menu.menu_zero_zero_selected"
},
{
"trigger": "scan_data",
"source": "exit_insufficient_balance",
"dest": "exit",
"conditions": "cic_ussd.state_machine.logic.menu.menu_ninety_nine_selected"
},
{
"trigger": "scan_data",
"source": "enter_transaction_amount",
"dest": "exit_invalid_input"
},
{
"trigger": "scan_data",
"source": "transaction_pin_authorization",
"dest": "exit_successful_transaction",
"conditions": "cic_ussd.state_machine.logic.pin.is_authorized_pin",
"after": "cic_ussd.state_machine.logic.transaction.process_transaction_request"
},
{
"trigger": "scan_data",
"source": "transaction_pin_authorization",
"dest": "exit_pin_blocked",
"conditions": "cic_ussd.state_machine.logic.pin.is_locked_account"
}
]