Compare commits

...

5 Commits

11 changed files with 55 additions and 13 deletions

View File

@ -146,6 +146,9 @@ func (ls *LocalHandlerService) GetHandler(accountService remote.AccountService)
ls.DbRs.AddLocalFunc("send_mpesa_min_limit", appHandlers.SendMpesaMinLimit)
ls.DbRs.AddLocalFunc("send_mpesa_preview", appHandlers.SendMpesaPreview)
ls.DbRs.AddLocalFunc("initiate_send_mpesa", appHandlers.InitiateSendMpesa)
ls.DbRs.AddLocalFunc("calculate_pay_debt", appHandlers.CalculatePayDebt)
ls.DbRs.AddLocalFunc("confirm_debt_removal", appHandlers.ConfirmDebtRemoval)
ls.DbRs.AddLocalFunc("initiate_pay_debt", appHandlers.InitiatePayDebt)
ls.first = appHandlers.Init

View File

@ -0,0 +1,2 @@
{{.confirm_debt_removal}}
Enter your PIN:

View File

@ -0,0 +1,13 @@
LOAD confirm_debt_removal 0
MAP confirm_debt_removal
CATCH api_failure flag_api_call_error 1
CATCH invalid_credit_send_amount flag_invalid_amount 1
MOUT back 0
MOUT quit 9
HALT
LOAD authorize_account 6
RELOAD authorize_account
CATCH incorrect_pin flag_incorrect_pin 1
INCMP _ 0
INCMP quit 9
INCMP initiate_pay_debt *

View File

@ -0,0 +1,4 @@
LOAD reset_incorrect_pin 6
CATCH _ flag_account_authorized 0
LOAD initiate_pay_debt 0
HALT

View File

@ -71,4 +71,10 @@ msgid "You will get a prompt for your M-Pesa PIN shortly to send %s ksh and rece
msgstr "Utapokea kidokezo cha PIN yako ya M-Pesa hivi karibuni kutuma %s ksh na kupokea ~ %s cUSD"
msgid "Your request has been sent. Thank you for using Sarafu"
msgstr "Ombi lako limetumwa. Asante kwa kutumia huduma ya Sarafu"
msgstr "Ombi lako limetumwa. Asante kwa kutumia huduma ya Sarafu"
msgid "You can remove a maximum of %s %s from %s pool\n"
msgstr "Unaweza kuondoa kiwango cha juu cha %s %s kutoka kwenye bwawa la %s.\n"
msgid "Please confirm that you will use %s %s to remove your debt of %s %s\n"
msgstr "Tafadhali thibitisha kwamba utatumia %s %s kulipa deni lako la %s %s.\nWeka PIN yako:"

View File

@ -7,20 +7,22 @@ LOAD check_balance 128
RELOAD check_balance
MAP check_balance
MOUT send 1
MOUT swap 2
MOUT vouchers 3
MOUT select_pool 4
MOUT mpesa 5
MOUT account 6
MOUT help 7
MOUT pay_debt 2
MOUT swap 3
MOUT vouchers 4
MOUT select_pool 5
MOUT mpesa 6
MOUT account 7
MOUT help 8
MOUT quit 9
HALT
INCMP credit_send 1
INCMP swap_to_list 2
INCMP my_vouchers 3
INCMP select_pool 4
INCMP mpesa 5
INCMP my_account 6
INCMP help 7
INCMP pay_debt 2
INCMP swap_to_list 3
INCMP my_vouchers 4
INCMP select_pool 5
INCMP mpesa 6
INCMP my_account 7
INCMP help 8
INCMP quit 9
INCMP . *

View File

@ -0,0 +1,2 @@
{{.calculate_pay_debt}}
Enter amount:

View File

@ -0,0 +1,6 @@
LOAD calculate_pay_debt 0
RELOAD calculate_pay_debt
MAP calculate_pay_debt
MOUT back 0
HALT
INCMP confirm_debt_removal *

View File

@ -0,0 +1 @@
Pay debt

View File

@ -0,0 +1 @@
Lipa deni

View File

@ -0,0 +1,2 @@
{{.calculate_pay_debt}}
Weka kiwango: