SecurePay Payment Module for ZenCart

A Secure Credit Cart Processing Gateway for SecurePay and ZenCart.

When I updated this module, I thought that I would be getting paid for it, entirely due to a misunderstanding on my part. As there was no formal agreement beforehand I cannot ask for it. I was going to ransom this module at first, in order to recoup part of the cost, but I’ve decided that I don’t want to deal with that right now-I’ve got way too many other issues to deal with.

I just ask that if you have the means, if you can donate to offset the lost wages and show your appreciation, it would be delightful.

So, here it is. This SecurePay payment module was updated and tested in ZC1.3.5, but it should work in older versions as well.

This Release


This is a pretty simple module feature-wise. It shows a credit card entry form on the payment checkout page, and when you confirm the order, sends the info to SecurePay.

If SecurePay returns an approval the order is processed.
If SecurePay returns a denial or cannot be contacted, the customer is told this and prompted to enter another card or choose an alternate payment method.

This module will store all cc info EXCEPT the actual credit card number, as that is a security issue. If someone needs this ability, feel free to contract my services to add it.

Note: A field for the CVV number is present, as it may be required by law in some places, but I was unable to determine if SecurePay supported that option. So the form takes the info and stores it in the order, but passes it on as a dummy field to SecurePay. Once they support it, I just have to change the dummy value to the actual field name they need for processing and it will work.


This module is being released as-is with no warranty/help included. You can post to this ZenCart Forum thread but I don’t guarantee I’ll be monitoring it (others might tho). For paid support, you can email

Do note that SecurePay can’t really offer support for this module as it’s not their code-they may try to help you but they should not be your first call. They would only handle issues on their end, not this end.

Known Issues

Diner’s Club and JBC credit cards are in the code, but not enabled until I can verify SecurePay’s acceptance of these cards.

Credit Card CVV numbers are recorded, but not passed to SecurePay until I can verify the correct form field name for them.



This zip includes the following files. You should just be able to drop them in your catalog, but if unsure, I’ve included the destinations.

Does not need to be added.
[dest: /path/to/zenroot/securepay_handler.php]
SecurePay.php (English language file)
[dest: /includes/languages/english/modules/payment/SecurePay.php]
SecurePay.php (Payment module)
[dest: /includes/modules/payment/SecurePay.php]


  1. If you have installed an earlier version, please remove it.
  2. Unzip the files and drop into your catalog (The readme file does not need to be added).
  3. Log into your admin panel and go to Modules -> Payment.
  4. Click on the ‘SecurePay‘ line, then the ‘Install‘ button.
  5. Fill out the fields as directed.

The SecurePay Handler

SecurePay strips all variables from the return url (receipturl). Unfortunately, this means we can’t use the normal return method of pointing to index.php?page=checkout_process

To circumvent this, I’ve implemented a small handler file in the ZenCart root. All this file does is redirect to the checkout_process page. The path should be preset for you, but if needed, you can change it.

Testing the module

  1. Put the module in test mode and make an order.
  2. For the credit card number, enter Visa CC#: 4111111111111111
  3. This should get you a demo approved order (and the order goes through).
  4. Repeat, but this time use: Visa CC#: 4222222222222222
  5. This order should be rejected and you should be directed back to the payment page with an error message about the card being rejected/denied.

If both orders come back as expected, you should be good to go.


1 Patrick Cheng - Nov 21, 03:32 PM

Hi Sara, can you confirm if this payment module would work with Nova viaKlix, who owns Internet Secure?
Thanks, Patrick

2 sara - Dec 23, 09:59 AM


I don’t know-this was not designed for NovaKlix. If you could send me info on their site I could see if I could do something for you.
3 David Hildebrand - Feb 18, 04:29 PM

On the Zen Cart Forum, there is a complaint that the SecurePay module works for Visa but not for MasterCard. Zen Cart returns the following error upon entering a believed valid MasterCard: The Credit Card Number does not match the Credit Card Type.
SecurePay supplied the module but I don’t know if it is the one that you authored. It’s posted at:

Is this your module? Do you know if your module works fine with MasterCard?

Thanx a bunch,

4 alexander sabonge - Mar 19, 07:48 AM

hi, my name is alex sabogne and i install your module on my site, and it works great. the only thing that i have is that the american express does not work. i dont know if this will fall under support, but if you can give us a hint i will appreaciate it. i remeber when i install it i need it to check american express in payment because that was the only one unchecked.

thank you.

5 Adam - Jul 19, 02:44 PM

I know about the space in MasterCard needing removed, this is not referring to that typo in older versions of ZC. Just recently, within the last few days, your securepay mod is not working, it is returning an error “There has been an error processing your credit card. Please try again.” I contacted securepay and they are not receiving anything from processing so it must be an internal code problem. It has spread to two of my stores now. HELP!! please :D

6 gclub - Apr 3, 10:47 PM

thank you for sharing this information

7 casino online - Apr 10, 10:37 PM

i need this on my zencart, thanks!
จี คลับ มือ ถือ

8 ทางเข้าจีคลับ - Apr 10, 10:50 PM

i hope this is secure. thanks anyway
จี คลับ มือ ถือ

9 harry56 - Jul 21, 12:06 AM



Add Your Comment