Jump to content

Custom Gateway Templates


Recommended Posts

Hello,

 

I'm trying to use custom pages for my gateway template but I'm not sure I'm following the right way todo this, does anyone know of a better way todo this.

 

<?php // template.php

function template_config()
{
$configarray = array ( );
return $configarray;
}

function template_storeremote($params)
{
   global $smarty;

   $smarty->assign('foo', 'bar');

   return $smarty->display('orderforms/{template}/{gateway}/{file}.tpl');  
}

function template_3dsecure($params)
{
   global $smarty;

   $smarty->assign('foo', 'bar');

   return $smarty->display('orderforms/{template}/{gateway}/{file}.tpl');  
}

?>

 

<?php // callback/template.php

include("../../../dbconnect.php");
include("../../../includes/functions.php");
include("../../../includes/gatewayfunctions.php");
include("../../../includes/invoicefunctions.php");

$gatewaymodule = "template"; # Enter your gateway module name here replacing template

$GATEWAY = getGatewayVariables($gatewaymodule);

if ( ! $GATEWAY["type"])
{
   $smarty = new Smarty();

   $smarty->assign('foo', 'bar');

   echo $smarty->display('orderforms/{template}/{gateway}/{file}.tpl');  
   exit;
}

// do some staff

$smarty = new Smarty();

$smarty->assign('foo', 'bar');

echo $smarty->display('orderforms/{template}/{gateway}/{file}.tpl');  
exit;

?>

 

Really hope someone can help.

Link to comment
Share on other sites

  • 5 weeks later...

Join the conversation

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

Guest
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...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated