HOWTO: Roll your own Gateway Payment Module

You are viewing a wiki page. You are welcome to join the group and then edit it. Be bold!

I haven't a clue how to "Roll my own" payment module.
This is a wiki to start my path towards creating one.
Hopefully someone will have more information and chime in to help. :-)

Then the next bloke who comes this way will have something better to start with.

Now let's begin.
The best advice I've found so far is to use a currently existing payment gateway and transform it.
This is great and all.. just hope it works for a Non-XML interface (the one i have to work with).

I'm going to tear apart this module:
\modules\ecommerce\contrib\authorize_net
But I also found this module:
http://drupal.org/project/ec_lacaixa
To help get bearing on creating a module.

Looks like modules have a file format of:
/path/{module_name}/
/path/{module_name}/{module_name}.install // For installing
/path/{module_name}/{module_name}.module // Runs program
/path/{module_name}/{module_name}.mysql // For direct SQL injection for creating tables, (ref install)
/path/{module_name}/{module_name}.info // Information about the Module

Here is some information on eC v3 Payment Gateways:
http://drupalecommerce.org/content/create-new-payment-gateway