momoapi-node icon indicating copy to clipboard operation
momoapi-node copied to clipboard

RequestToPay not throwing an error in case of unaccepted characters in the payerMessage and payeeNote

Open ArmarJosh opened this issue 2 years ago • 0 comments

Describe the bug RequestToPay returns the transaction id, but does not throw an error in case mtn has not returned 200 ok. If the payerMessage and payeeNote includes unaccepted characters such as "&" ampersand, the telco rejects the transaction and returns an error, but the sdk does not capture it. Hence just throw ResourceNotFoundError on getTransaction.

To Reproduce Steps to reproduce the behavior:

  1. include "&" in the payerMessage and payeeNote.
  2. Not sure what other characters the mtn api does not support. Hence should include character sanitization

Expected behavior Should return an error in case the telco does not return a 200 status on RequestToPay

ArmarJosh avatar May 25 '23 10:05 ArmarJosh