Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const funcion = 'transaccion/crear';
- let montoFixed = monto.toFixed(2)
- let data = { "trx_id":trx_id.toString(), "medio_pago":medio_pago.toString(), "monto":montoFixed }
- let fecha = moment().toDate().toUTCString();
- let mensaje = funcion+"\n"+trx_id+"\n"+montoFixed+"\n"+fecha
- let firma = this.FirmarMensaje(mensaje, key, secret);
- axios({
- method:'POST',
- url:`${url}`,
- headers: {
- 'Content-Type': 'application/json;charset=utf-8',
- 'Accept-Charset': 'utf-8',
- 'Autorizacion': firma,
- 'Fecha': fecha,
- },
- //json: true,
- //headers: header_array,
- data: data
- })
- .then(function (response) {
- return response
- })
- .catch(function (error) {
- return error
- });
Add Comment
Please, Sign In to add comment