Open kafuuma opened 4 years ago
Hi @kafuuma why do you think it is a good idea to remove required validations?
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.
Thoughts? @mossplix
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
We can make it optional. That should work better
Appreciate the suggestions @kafuuma @sicelo Pull requests welcome! 👍
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.