cli

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 2, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package cli provides the command line interface for the mpesaoverlay. The cli package is responsible for parsing the command line arguments and passing them to the appropriate function.

The cli package is divided into subpackages:

  1. auth: responsible for the GetToken command.

  2. b2c: responsible for the B2CPayment command.

  3. balance: responsible for the AccountBalance command.

  4. c2b: responsible for the C2BRegisterURL and C2BSimulate commands.

  5. express: responsible for the stkpush and stkpushquery commands.

  6. qrcode: responsible for the generateqrcode command.

  7. reversal: responsible for the Reversal command.

  8. tax: responsible for the RemitTax command.

  9. transaction: responsible for the TransactionStatus command.

  10. log: responsible for the logError and logJSON functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccountBalance

func AccountBalance(sdk mpesa.SDK) error

AccountBalance gets the account balance from the mpesa api.

func AddCommands

func AddCommands(app *fisk.Application, sdk mpesa.SDK)

AddCommands adds the mpesa commands to the application.

func B2CPayment

func B2CPayment(sdk mpesa.SDK) error

B2CPayment initiates a B2C payment request.

func C2BRegisterURL

func C2BRegisterURL(sdk mpesa.SDK) error

C2BRegisterURL registers the confirmation and validation urls.

func C2BSimulate

func C2BSimulate(sdk mpesa.SDK) error

func QRCode

func QRCode(sdk mpesa.SDK) error

func RemitTax

func RemitTax(sdk mpesa.SDK) error

func Reversal

func Reversal(sdk mpesa.SDK) error

func STKPush

func STKPush(sdk mpesa.SDK) error

func STKPushQuery

func STKPushQuery(sdk mpesa.SDK) error

func Token

func Token(sdk mpesa.SDK) error

func TransactionStatus

func TransactionStatus(sdk mpesa.SDK) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL