Jump to content

ouldfella

Member
  • Posts

    86
  • Joined

  • Last visited

About ouldfella

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

ouldfella's Achievements

Member

Member (2/3)

1

Reputation

  1. thanks for your reply, no it's not the same and it can't be the same, because the gateway must have for every attempt a new idorder, so for the same invoice we can find many orderid(s). i found in tblorders that for every invoiceid there is one orderid. thanks a lot for your help.
  2. Thank you for yor reply, i tried your code but doesn't work, try { $v= Capsule::table('tblorders')->latest('date')->first(); } catch (\Exception $e) { // Handle any error which may occur } var_dump($v);exit(); first i created a new table orders, because i can't use tblorders , the gateway must have for every attempt i new order id second i need to get the last result for list where id order=x, not the last in table. just i need replace this code : $table = "orders"; $fields = "orderNumber,invoiceid, orderId"; $where = array("orderNumber" => $resultConfirm["OrderNumber"]); $result = select_query($table, $fields, $where); while ($data = mysql_fetch_array($result)) { $invoiceId = $data['invoiceid']; }
  3. Hello, i need to replace this code : $table = "orders"; $fields = "orderNumber,invoiceid, orderId"; $where = array("orderNumber" => $resultConfirm["OrderNumber"]); $result = select_query($table, $fields, $where); while ($data = mysql_fetch_array($result)) { $invoiceId = $data['invoiceid']; } because is deprecated, i used this code but doesn't work : use WHMCS\Database\Capsule; try { $v= Capsule::table('orders') ->latest()->first(); } catch (\Exception $e) { // Handle any error which may occur } var_dump($v)
  4. i have this code : try { Capsule::connection()->transaction( function ($connectionManager) { $connectionManager->table('orderssatim') ->where('orderNumber', $orderNumber) ->update( [ 'orderId' => $resultStep['orderId'] ] ); } ); } catch (\Exception $e) { echo "I couldn't update. {$e->getMessage()}"; } i dont find the update in my table
  5. it doesn't work proprly, i removed that line but the page is empty
  6. 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
  7. thank for your reply, i commented this line //Menu::addContext(); the error doesn't existe, but i don't see the content of mypage.tpl mypage.php display an empty page in browser this is the content of mypage.php <?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'; if ($ca->isLoggedIn()) { $clientName = Capsule::table('tblclients') ->where('id', '=', $ca->getUserID())->pluck('firstname'); $ca->assign('clientname', $clientName); } else { $ca->assign('clientname', 'Random User'); } Menu::addContext(); Menu::primarySidebar('announcementList'); Menu::secondarySidebar('announcementList'); $ca->setTemplate('mypage'); $ca->output();
  8. Hello, how to create a new page in WHMCS ??? i try this code https://developers.whmcs.com/advanced/creating-pages/ but i have an error " Oops! Something went wrong and we couldn't process your request. " I just copied and past their own code, it doesn't work how can create a new page then
  9. I need to develop a gateway for paying invoices, the problem is that the first step is recording the order at the gateway site before launching into payment. I tried to make a code with CURl but in vain, it loops on the command without doing the redirection
  10. is there someone who masters the creation of gateways?
  11. i must replace this code : <div class="cartbox">{foreach key=num item=gateway from=$gateways} <label><input type="radio" name="paymentmethod" value="{$gateway.sysname}" onclick="{if $gateway.type eq "CC"}showCCForm(){else}hideCCForm(){/if}"{if $selectedgateway eq $gateway.sysname} checked{/if} /> {$gateway.name}</label>{/foreach}</div> but where is it ? how can i find it ?
  12. how to use curl to send identification to the gateway ?
  13. Thanks Brian for your reply, i added it in header.tpl that contain the menu link thanks alot.
×
×
  • 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