Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Environment variables explained #11

Open
mtuchi opened this issue Jan 14, 2020 · 3 comments
Open

Environment variables explained #11

mtuchi opened this issue Jan 14, 2020 · 3 comments
Assignees

Comments

@mtuchi
Copy link

mtuchi commented Jan 14, 2020

Is your feature request related to a problem? Please describe.
There is no clear process to outline how and where to get the values for all environment variables

Describe the solution you'd like
A short brief could help connect the dots on where and to setup those environment variables, For-example the SSL variables is there a procedure to guide how the setup should be like

@lykmapipo lykmapipo self-assigned this Jan 14, 2020
@lykmapipo
Copy link
Owner

@mtuchi

You will have to create .env file in your current working directory with required variables. Also you can just use process.env.{variableName} e.g process.env.TZ_MPESA_USSD_PUSH_USERNAME=mpesa before import the library.

Hope it helps.

@mtuchi
Copy link
Author

mtuchi commented Jan 14, 2020

@mtuchi

You will have to create .env file in your current working directory with required variables. Also you can just use process.env.{variableName} e.g process.env.TZ_MPESA_USSD_PUSH_USERNAME=mpesa before import the library.

Hope it helps.

@lykmapipo
I was hopping to under stand these items,

TZ_MPESA_USSD_PUSH_USERNAME=
TZ_MPESA_USSD_PUSH_PASSWORD=
TZ_MPESA_USSD_PUSH_BUSINESS_NAME=
TZ_MPESA_USSD_PUSH_BUSINESS_NUMBER=
TZ_MPESA_USSD_PUSH_CALLBACK_URL=
TZ_MPESA_USSD_PUSH_BASE_URL=
TZ_MPESA_USSD_PUSH_LOGIN_PATH=
TZ_MPESA_USSD_PUSH_REQUEST_PATH=
TZ_MPESA_USSD_SSL_CA_FILE_PATH=
TZ_MPESA_USSD_SSL_CERT_FILE_PATH=
TZ_MPESA_USSD_SSL_KEY_FILE_PATH=
TZ_MPESA_USSD_SSL_PASSPHRASE=

Forexample BUSINES_NAME & NUMBER values. Do i need to be registered with mpesa-lipa or is there a process for acquiring a business name & number, Similar to SSLhow do i setup these
Perhaps a simple example app will help

@lykmapipo
Copy link
Owner

@mtuchi Sure I will have to add setup section on documentation as well as example usage.

As of now:

  • Below has to be obtain from MPESA provider(Vodacom TZ) and follow their setup process.
USERNAME - Valid MPESA provided username
PASSWORD - Valid MPESA provided password
BUSINESS_NAME - Valid MPESA provided business name
BUSINESS_NUMBER - Valid MPESA provided bisiness number
CA_FILE - Valid MPESA provided CA file
CERT_FILE - Valid MPESA provided cert file
KEY_FILE - Valid MPESA provided key file
PASSPHRASE - Valid MPESA provided passphrase
  • The library offer defaults to may of options except the above which have to pass through the process of acquiring them.
  • PUSH_CALLBACK_URL this has to be your http(s) path(endpoint) in your application or api to be called by MPESA engine for the updates.
  • Simple setup example can be found on charge spec

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants