Results 1 to 8 of 8
  1. #1
    Join Date
    Apr 2007
    Posts
    47
    Plugin Contributions
    0

    Default How do I create a new payment module?

    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.

  2. #2
    Join Date
    Jul 2005
    Posts
    537
    Plugin Contributions
    0

    Default Re: How do I create a new payment module?

    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.

  3. #3
    Join Date
    Apr 2007
    Posts
    47
    Plugin Contributions
    0

    Default Re: How do I create a new payment module?

    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)?

  4. #4
    Join Date
    Aug 2007
    Location
    Eugene, OR
    Posts
    162
    Plugin Contributions
    0

    Default Re: How do I create a new payment module?

    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:

    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)
    ?>
    Thanks!

  5. #5
    Join Date
    Aug 2007
    Location
    Eugene, OR
    Posts
    162
    Plugin Contributions
    0

    Default Re: How do I create a new payment module?

    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

  6. #6
    Join Date
    Apr 2007
    Posts
    47
    Plugin Contributions
    0

    Default Re: How do I create a new payment module?

    Quote Originally Posted by thomasw98 View Post
    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

    Thanks for the pointer. But, if you don't mind, could you please tell me exactly where you put that code from your payment gateway company? I am still a bit lost on that.

  7. #7
    Join Date
    Aug 2007
    Location
    Eugene, OR
    Posts
    162
    Plugin Contributions
    0

    Default Re: How do I create a new payment module?

    Quote Originally Posted by meeven View Post
    Thanks for the pointer. But, if you don't mind, could you please tell me exactly where you put that code from your payment gateway company? I am still a bit lost on that.

    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.

  8. #8
    Join Date
    Apr 2007
    Posts
    47
    Plugin Contributions
    0

    Default Re: How do I create a new payment module?

    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.

 

 

Similar Threads

  1. Create a new module for International Checkout payment module
    By icecold in forum Addon Payment Modules
    Replies: 63
    Last Post: 27 Apr 2010, 03:04 AM
  2. How to create new payment module?
    By Macedonium in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 15 May 2009, 09:47 PM
  3. How to create new payment module?
    By mscro in forum Built-in Shipping and Payment Modules
    Replies: 9
    Last Post: 28 Apr 2008, 12:23 AM
  4. How to create a payment module?
    By josedanielestrada in forum Addon Payment Modules
    Replies: 4
    Last Post: 15 Aug 2006, 05:08 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg