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

Add field/params validation to /payment/request route #22

Closed
kn9ts opened this issue May 22, 2016 · 0 comments
Closed

Add field/params validation to /payment/request route #22

kn9ts opened this issue May 22, 2016 · 0 comments
Assignees
Milestone

Comments

@kn9ts
Copy link
Owner

kn9ts commented May 22, 2016

/payment/request route recieves 4 params, 2 required, 2 optional (system generates replacements for these)

Parameters:

  • phoneNumber - The phone number of your client
  • totalAmount - The total amount you are charging the client
  • referenceID - The reference ID of the order or service [optional]
  • merchantTransactionID - This specific order's or service's transaction ID [optional]

We need to validate the required params, namely:

  • phoneNumber - 10 digit numerical value that starts with +25 (plus sign optional)
  • totalAmount - numerical values only
@kn9ts kn9ts added this to the v1.0.0 milestone May 22, 2016
@kn9ts kn9ts self-assigned this May 22, 2016
@kn9ts kn9ts closed this as completed May 22, 2016
kn9ts added a commit that referenced this issue May 23, 2016
* develop: (27 commits)
  Added CURL example to README
  Added missing mongodb installation steps
  Renamed http_code to status_code
  Replaced image with one delivered from js.co.ke
  Updated banner
  Added banner image to readme
  Adding project banner
  Finished #17 Add installations steps to README
  Finished #22 Add field/params validation to /payment/request route
  Finished #10 Refactor ES6 import and any ES2015 feature not supported by Argon (Node.js v4.4.4.)
  Updated express and some of dependencies
  Updated /payment/request paymentDetails to use underscore notation on response
  Updated response JSON example in README
  Finshed #19 Wrap successful responses in response object
  Finished #20 Add sample request and response to README
  Finished #20 Add sample request and response to README
  Made /payment/request a POST request
  Replaced include method with indexOf while checking for extraParams
  Added payment request details to JSON response
  Added missing return code: 43
  ...
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

1 participant