I was in a similar boat where I couldn't get this figured out. After hours of searching, I found this wonderful human beings page. I dont wanna take any credit from him so I will just post a link to his page. He provides a super easy way to integrate moneris, just need to copy past and change the values in the "Payload" variable.
Hope this helps
https://www.narindersingh.in/moneris-payment-gateway-using-curl-javascript/