Jump to content

Building Payment Gateways


Recommended Posts

OK, this is something I said I wouldn't be doing because at the time I was trying to install CubeCart 3.0b + things weren't going well to put it lightly..

Anyway, my apologies to those who were after this gateway for the latest version of CubeCart, who feel let down by me, + for keeping y'all waiting s'long...

First things:

Goto the folderwhereyouinstalledcubecart -> modules -> gateway folder + create a folder called PPPay (+ NO it doesn't need to be called that if you want to be akward :blink: ).

Create a notepad file here + name it transfer.inc.php (NOT transfer.inc.php.txt +, yes, it should be in plain text!!)


You need another folder called PPPay in admin -> modules -> gateway (if you named the last folder something else then change the name on this to match).

There should be 2 files in here:



The index.php can basically be copied straight from any of the other gateway folders. The code below is the slightly tweaked code I am using:




|   CubeCart v3.0.0

|   ========================================

|   by Alistair Brookbanks

| CubeCart is a Trade Mark of Devellion Limited

|   © 2005 Devellion Limited

|   Devellion Limited,

|   Westfield Lodge,

|   Westland Green,

|   Little Hadham,

|   Nr Ware, HERTS.

|   SG11 2AL


|   http://www.devellion.com

| UK Private Limited Company No. 5323904

|   ========================================

|   Web: http://www.cubecart.com

|   Date: Friday, 1 July 2005

|   Email: [email protected]

| License Type: CubeCart is NOT Open Source Software and Limitations Apply

|   Licence Info: http://www.cubecart.com/site/faq/license.php


| index.php

|   ========================================

| Configure PPPay






$db = new db();


$config = fetchDbConfig("config");


$enableSSl = 1;





header("Location: ".$GLOBALS['rootRel']."admin/401.php");






$module = fetchDbConfig($_GET['folder']);

$msg = writeDbConf($_POST['module'], $_GET['folder'], $module);


$module = fetchDbConfig($_GET['folder']);


<p><a href="http://www.pppay.com/"><img src="logo.gif" alt="" border="0" /></a></p>



echo $msg;



<p class="copyText">&quot;Receive & Send Payments In $, £, + €&quot;</p>

<form action="<?php echo $GLOBALS['rootRel'];?>admin/modules/<?php echo $_GET['module']; ?>/<?php echo $_GET['folder']; ?>/index.php?module=<?php echo $_GET['module']; ?>&amp;folder=<?php echo $_GET['folder']; ?>" method="post" enctype="multipart/form-data">

<table border="0" cellspacing="0" cellpadding="3" class="mainTable">


    <td colspan="2" class="tdTitle">Configuration Settings </td>



    <td align="left" class="tdText"><strong>Status:</strong></td>

    <td class="tdText">

<select name="module[status]">

  <option value="1" <?php if($module['status']==1) echo "selected='selected'"; ?>>Enabled</option>

  <option value="0" <?php if($module['status']==0) echo "selected='selected'"; ?>>Disabled</option>





   <td align="left" class="tdText"><strong>Description:</strong>


    <td class="tdText"><input type="text" name="module[desc]" value="<?php echo $module['desc']; ?>" class="textbox" size="30" /></td>



  <td align="left" class="tdText"><strong>Email Address:</strong></td>

    <td class="tdText"><input type="text" name="module" value="<?php echo $module['email']; ?>" class="textbox" size="30" /></td>


  <td align="left" class="tdText"><strong>Default:</strong></td>

      <td class="tdText">

<select name="module[default]">

  <option value="1" <?php if($module['default'] == 1) echo "selected='selected'"; ?>>Yes</option>

  <option value="0" <?php if($module['default'] == 0) echo "selected='selected'"; ?>>No</option>





    <td align="right" class="tdText">&nbsp;</td>

    <td class="tdText"><input type="submit" class="submit" value="Edit Config" /></td>




<?php include("../../../includes/footer.inc.php"); ?>

Just create a text file, copy the above code into it, + name it index.php before placing it with the logo.gif.

The logo.gif can be found here (ready formatted to the correct size :D !).

Finally, the transfer.inc.php that I mentionned before carries all the important variables that you need to make the gateway work. - I have not completed this for PPPay yet, but at least now you know how to get going with a new payment gateway.

As far as I can tell there is no messing-around with SQL required for most of the gateways, this being no exception. I will post more just as soon as I have more. Meantime if have Gold level of membership with PPPay + want the gateway to cover that please tell me, otherwise you will just get the straighforward version :) !

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...