How do I go about integrating the payment gateway code from a payment gateway provider not currently available in ZenCart? Do I need to build a module? Is there an API that I can handover to a programmer?
Thanks in advance.
How do I go about integrating the payment gateway code from a payment gateway provider not currently available in ZenCart? Do I need to build a module? Is there an API that I can handover to a programmer?
Thanks in advance.
From what I've seen, most use an existing module as a model of sorts, and construct theirs using the existing module as an example.
Thanks! I saw a post that explained how to customize a shipping module.
But, I wonder if I didn't express myself clearly. What I basically want to do is to integrate the code of my payment gateway provider into Zen Cart. Is this the same as writing a new payment module for ZenCart (or using an existing one to customize)?
I have the same question. I have received some php coding from my payment company but do not know where to put it in Zencart.
I am assuming that first I should close one of the existing payment modules, and then add this php code to some location in that cloned module.
So, I have two questions:
a. How do I clone a payment module? Any step by step instructions anywhere? I have found instructions to clone a shipping module but nothing for a payment module.
b. Once I successfully clone a payment module, and rename it to some appropriate name, where would I add my payment php code? The code that the payment company gave me is something like this:
Thanks!Code:<? $datestr=date("Ymd",time()); $billstr=date("His",time()); $mer_code="000015"; $amount="0.02"; $billno=$mer_code.$billstr; $strcert="GDgLwwdK270Qj1w4xho8lyTpRQZV9Jm5x4NwWOTThUa4fMhEBK9jOXFrKRT6xhlJuU2FEa89ov0ryyjfJuuPkcGzO5CeVx5ZIrkkt1aBlZV36ySvHOMcNv8rncRiy3DQ"; $strcontent=$billno.$amount.$datestr."RMB".$strcert; $signmd5=MD5($strcontent) ?>
Please ignore my previous request. I found what I was looking for in another thread. For the record, it is:
http://www.zen-cart.com/forum/showth...payment+module
Oh, yeah, you're right...I only answered one of my questions, i.e. how to make a clone of a payment module.
For the other question, where to put the payment gateway code, i still do not know the answer, but Jack from zen-cart.cn very graciously offered to create the module for me, so once he does that, I will post it here for you to see.
While I am waiting for Jack's help, I can tell you how I would approach it if I had to do it on my own: Clone one of the credit card modules that come with Zencart, then open the php file (the one in includes/modules/payment/) and look at the code. You will probably see something that looks just like the code that you need to add for your specific custom gateway. So then just modify that file's code to make it do what your gateway needs to do.
In other words, these credit card gateways all basically work the same way: the php page collects and sends some specific data about the purchase to the credit card company (such as buyer's name, value of purchase, a credit card number, etc). Additionally they send along a customer ID and maybe some sort of password code. So you just need to modify the cloned gateway so that it sends the right info in the right format to your chosen credit card processing company.
Thanks!
So, that means one needs to create two modules, one a clone of the payment module and the other a clone of the credit card module? Okay, I will wait until you're through with the process:-)
But, I think your approach is correct.