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

Remove phone number validation or make it optional #30

Open
kafuuma opened this issue Jan 28, 2020 · 6 comments
Open

Remove phone number validation or make it optional #30

kafuuma opened this issue Jan 28, 2020 · 6 comments

Comments

@kafuuma
Copy link

kafuuma commented Jan 28, 2020

Before sending a request to the MoMo API the phone number validated is and 256 is appended.
However, this makes testing in sandbox with the numbers provided for testing difficult. Phone number validation should be made optional.

@raybesiga
Copy link
Member

Hi @kafuuma why do you think it is a good idea to remove required validations?

@kafuuma
Copy link
Author

kafuuma commented Feb 13, 2020

Hi @raybesiga the numbers provided by mtn for sandbox testing, start with 4XXX i.e 46733123450, 46733123451, etc. so you send a request to the format becomes 2564XXX, this does not give the required response as per test cases. In my case, I have to comment out that part of the code in the package to be able to make test requests.

The second case is that when I store my numbers in the database as 25678XXXXX, 256 will be appended to the number when I send the request i.e 256256788XXX, this is not required. The solution is to either save the numbers as 78XXX and or strip save them as 25678XXX and strip the 256 when I am making a request. As you can see this all is more work.
I think the best way is to make the validation optional.

@raybesiga
Copy link
Member

raybesiga commented Dec 4, 2020

Thoughts? @mossplix

@sicelo
Copy link

sicelo commented Dec 4, 2020

Hi @kafuuma why do you think it is a good idea to remove required validations?

One other possibility - the library should be easily used in other MTN countries, where the code is different

@mossplix
Copy link
Member

mossplix commented Dec 4, 2020

We can make it optional. That should work better

@raybesiga
Copy link
Member

Appreciate the suggestions @kafuuma @sicelo Pull requests welcome! 👍

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

No branches or pull requests

4 participants