You can use the cart bindings to insert those values in the appropriate places.
What I always do when integrating a new payment gateway is:
1) I use their examples to get it working outside of the shopping cart
2) I copy/paste from ecart bindings to get the values from the cart instead
3) I copy/paste the form bindings to get the purchaser and card information coming from the form