Jump to content

need to display php variables in php


Recommended Posts

hello,

i executed the callback fille of the gateway in new page

<?php
use WHMCS\ClientArea;
use WHMCS\Database\Capsule;
define('CLIENTAREA', true);
require __DIR__ . '/init.php';
$ca = new ClientArea();
$ca->setPageTitle('Your Page Title Goes Here');
$ca->addToBreadCrumb('index.php', Lang::trans('globalsystemname'));
$ca->addToBreadCrumb('mypage.php', 'Your Custom Page Name');
$ca->initPage();
require __DIR__ . '/modules/gateways/callback/gatewaysatimmodule.php';

......

it works,

and i collect informations in variables from gateway callbak fille like( errorcode ,  ErrorMessage,  depositAmount,  cardholderName,...)

i need to display this varibles in tpl (mypage.tpl)

i created a hook but doesn't work :

<?php
function satim_confirm_vars($vars) {
    $extraTemplateVariables = array();
//$resultConfirm variable filled in callback file
    $extraTemplateVariables['resultConfirm'] = $resultConfirm;
    $extraTemplateVariables['orderId'] = $orderId;

    $extraTemplateVariables['invoiceId'] = vars['invoiceId'];
    return $extraTemplateVariables;
}

add_hook('AddInvoicePayment', 1, 'satim_confirm_vars');

in tpl i can't display it

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.

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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