All requests require an encrypted password, make it a route middleware (to stop deduping it)
Closed this issue · 0 comments
kn9ts commented
data.timeStamp = moment().format('YYYYMMDDHHmmss'); // In PHP => "YmdHis"
data.encryptedPassword = new EncryptPassword(data.timeStamp).hashedPassword;
Move the above piece of code to an express route middleware for any request targeting a request to any URL involving /payment/...
It then shall be added to the req
object passed in all route handlers, and used/referenced from there.