Forums / Built-in Shipping and Payment Modules / Create payment module for cc gateway

Create payment module for cc gateway

Locked
Results 1 to 8 of 8
This thread is locked. New replies are disabled.
11 Apr 2009, 10:10
#1
ccppll avatar

ccppll

New Zenner

Join Date:
Mar 2009
Posts:
19
Plugin Contributions:
0

Create payment module for cc gateway

Hi all! I need to create a payment module for Zen Cart. I'm using the latest version of Zen Cart. My bank offers a payment system with credit card, they need some information such as order id, total amount, etc. They also want two url, ok and ko page, that are the pages that are called after collecting the cc details (on their website) and checking for the payment. I tried looking at other paymen modules, but didn't find any info. Also, the payment page on the wiki is almost empty, not useful at all. Since the payment is performed by their system, I just need to know something: for example, is the order inserted in the db at checkout? This way I can be sure it's in the db, just in case something goes wrong in the payment process. After this, when the user selects "mypayment", I need to forward the user to the bank website, adding some variables in post such as order id etc. After the payment process, the system will call either the ok or ko page, where I can update the order statu, setting it to payed or to error. In case of error I could contact the user or something like that. Any help would be really appreciated.

thanks
13 Apr 2009, 12:11
#2
ccppll avatar

ccppll

New Zenner

Join Date:
Mar 2009
Posts:
19
Plugin Contributions:
0

Re: Create payment module for cc gateway

Any ideas?
15 Apr 2009, 13:27
#3
ccppll avatar

ccppll

New Zenner

Join Date:
Mar 2009
Posts:
19
Plugin Contributions:
0

Re: Create payment module for cc gateway

Still stuck in this, anyone has a suggestion on how to create a payment module?
20 Apr 2009, 10:21
#4
selleriaweb avatar

selleriaweb

New Zenner

Join Date:
Apr 2009
Posts:
3
Plugin Contributions:
1

Re: Create payment module for cc gateway

Hi,
I'm in the same situation... It's so strange that we are alone trying to develop a module like this.

I'm developing my module starting from the existing ones PayPal and Authorized.net, but I'm a little confused :blink:

If you want we could communicate by email.

My big trouble now is the MAC code. Do you use it?

Bye bye :frusty:

Pier
20 Apr 2009, 10:51
#5
ccppll avatar

ccppll

New Zenner

Join Date:
Mar 2009
Posts:
19
Plugin Contributions:
0

Re: Create payment module for cc gateway

Hi, I've sent you a PM.
22 Apr 2009, 02:20
#6
dionciel avatar

dionciel

New Zenner

Join Date:
Apr 2009
Posts:
2
Plugin Contributions:
0

Re: Create payment module for cc gateway

did you guys figure making a payment module for the zen cart?
22 Apr 2009, 06:26
#7
selleriaweb avatar

selleriaweb

New Zenner

Join Date:
Apr 2009
Posts:
3
Plugin Contributions:
1

Re: Create payment module for cc gateway

Hi dionciel,
we both made some test and it is quite ready... It works fine from my site to gateway site, when the customer pay, it come back, but I have some problems with method "before_process" (in my module payment).

If you want some detailed information, you can contact me. We are speaking about to release a module when everything goes right.

Bye.
22 Apr 2009, 16:00
#8
selleriaweb avatar

selleriaweb

New Zenner

Join Date:
Apr 2009
Posts:
3
Plugin Contributions:
1

Re: Create payment module for cc gateway

Hi,
done! :laugh:

I post this for who's looking for some information.

To develop a payment module for cc through a gateway, you can start from (i.e.) "dirbank.php".

We have to edit the method process_button(), before_process() and after_process(). Of course there are some other methods to change, but they are normally changed for every payment module (I mean install(), remove(), keys(), etc.).

First one is the one that send data to the gateway. Usually with POST method. The url of the gateway is store in "form_action_url" in the class creator.
Second one is called when a customer transaction went well. In this method we need to validate the information returned.
Last one is used to store some information in our db or whatever you want.

For more details you can search "keyclient" in the add ons (in this days I'll do this).

Anyway, every gateway has it's differences, so it's impossible to release a generic module. You must custom it for your needed.

Bye.