whmcs

Getting the pdf invoice from WHMCS?

拟墨画扇 提交于 2021-02-07 19:21:45
问题 For a small side project, I had to create a call that gets the PDF via WHMCS. I see the API can get the variables, such as quantity, invoice items etc, but I want the same PDF that the system would send if a client had placed an order. I have a PHP app. UPDATE Following the awesome advice below, I was able to solve this in one line: $pdf->Output('invoice.'.$invoicenum.'.pdf', 'F'); Now every time the invoice is viewed, or emailed, the latest version (paid or unpaid) is stored at the location

Python array of base64 encode and serialized array for WHMCS

被刻印的时光 ゝ 提交于 2021-01-29 15:55:32
问题 I am trying to add new order in WHMCS. According to documentation for AddOrder method, it is required to specify an array of base64 encoded serialized array for customfields and configoptions parameters. Example of such method in PHP is described in example: array( 'action' => 'AddOrder', .... 'customfields' => array(base64_encode(serialize(array("1" => "Google"))), base64_encode(serialize(array("1" => "Google")))), 'configoptions' => array(base64_encode(serialize(array("1" => 999))), base64

WHMCS如何进行数据库备份

心已入冬 提交于 2020-04-08 00:22:06
随着计算机网络的飞速发展,信息安全的重要性日趋明显,但是,作为信息安全的一个重要内容——数据库备份的重要性却往往被人们所忽视。定期备份数据库是非常重要的——毕竟硬盘损坏、******对服务器网站造成的破坏都是毁灭性的!这时,如果没有采取数据库备份的话,服务器上的数据会全部丢失,这个严重性是不言而喻的。那么WHMCS是如何进行数据库备份?下面跟随小编一起去了解下吧,希望能帮助到大家。 在 WHMCS 上备份数据库文件非常简单,我们可以选择将备份的数据同步上传到另一个服务器上,那么不至于该服务器出现问题时备份文件也跟着丢失。这里我们在WHMCS上备份数据库时只需要创建一个FTP主机账户指定账户的IP,端口,以及数据库的备份目录。下面我们一起来看下具体的操作步骤。 1.登录到WHMCS账户,在导航栏找到Setup(设置)点击进去找到Other(其他)最后找到Database Backups(数据库备份)点击进去进入下一页页面。 2. 2.现在需要创建一个FPT账户,这里填写主机IP、端口号、登录FTP的用户名、密码和目录,全部设置完成后点击Test Connection创建连接。这里需要说明的是这个FPT账户的创建意味着我们备份的数据库文件会同步上传到我们指定的FTP账户上。 3.这个时候我们已经指定到FTP主机账户,这里你可以登录你的WHM账户(在WHMCS中指定的那个)

WHMCS 安装图文教程

谁说胖子不能爱 提交于 2020-04-08 00:01:36
WHMCS 安装 前提 1.你已经到官方购买的正版授权的whmcs 2.已经配置好服务器环境,并且添加好站点和配置好域名证书等 3.操作人员具备一般的linux系统操作能力 开始安装 1.到官方购买并下载最新版的安装文件,上传到网站根目录后,访问域名即可看到如下界面,点击开始安装: 2.同意安装协议: 3.自动环境检测通过: 4.填写你购买所得的授权码,以及数据库链接信息,点击进入下一步: 5.设置whmcs后台管理员账号信息,点击完成设置: 6.然后安装下图步骤,进行一些安全设置: 补充说明下上图第三步,在服务器添加定时任务,本次安装服务器为 centOS 7.6,所以我们需要通过 putty 等客户端软件,登录服务器后,依次通过以下命令添加定时任务: #输入命令打开定时任务管理界面: crontab -e #windows系统下按一下 i 字母键,进入编辑状态 #在原有文件内容的底部,回车添加一行,输入如下内容,请务必根据上图第三步提供的目录修改以下代码中对应的路径: /10 * php -q /www/wwwroot/p.wpkeji.com/crons/cron.php #按一下 ECS 键,退出编辑状态,然后输入 :wq (含前面的半角冒号),然后回车进行保存。 来源: 51CTO 作者: loveer1 链接: https://blog.51cto.com

how to solve the error Unsupported Gateway Type for Storage in whmcs using stripe?

爷,独闯天下 提交于 2020-01-16 08:33:59
问题 I want to save the credit card details for future use and i want to save the data in whmcs database credit card last 4 digit or card_data in blobformat. I am using stripe payment gateway and whmcs. <?php $command = 'AddPayMethod';//save the data in api format $postData = array( 'clientid' => $ca->getUserID(),//client id 'type' => 'CreditCard', //credit card type 'description' => 'Mohit - check',//account holder name 'card_number' => '4640823519584356',//credit card number 'card_expiry' =>

Combine results for SQL query

隐身守侯 提交于 2020-01-06 20:04:47
问题 I am in a bit of a pinch. I am using WHMCS and building a custom report but am running into trouble with one of my queries. Here is an overview: I have 2 tables; tblinvoices which has the subtotal, tax, total, etc. of the invoice and tblinvoiceitems which has the individual line items that appear on the invoice. I am wanting to run a query that returns all of the individual line items and their price which I have been able to do. I run into problems when I do 'GROUP BY' and group the results

Redirect to custompage.php instead of viewinvoice.php if payment fails in WHMCS Vs 6.2.0

不打扰是莪最后的温柔 提交于 2019-12-25 10:01:32
问题 I wish to redirect to a custom page following the failure in payment as returned by payment gateway. To this end, I am using the ShoppingCartCheckoutCompletePage hook to check this using the variable $vars['ispaid']. When payment is successful, $vars['ispaid'] is true and the redirect to the thankyou page works. add_hook('ShoppingCartCheckoutCompletePage', 1, function ($vars) { # Will be true if the order has been paid if($vars['ispaid'] == true) { #redirect to thank you page header('location

wrap new line variable with <li>

筅森魡賤 提交于 2019-12-25 05:34:05
问题 We are using WHMCS and within the product section I want to wrap the product with <li></li> on every new line. So far I have done the following, which gets me all the items but puts them all in one line, but I haven't been able to work out how to assign these stripped values to a new var to be wrapped with the list tag. {foreach from=$product.features key=feature item=value} {$value|strip_tags} {foreachelse} {$product.description|strip_tags} {/foreach} 回答1: You can use the following code:

smarty displaying only first character from foreach

谁说我不能喝 提交于 2019-12-24 19:26:52
问题 I am just starting to use Smarty templates and have this very simple query: $result = mysql_query("SELECT `name`, `min_price` FROM `tblproductgroups` WHERE `hidden` != 'on' ORDER BY `order` ASC"); $data = mysql_fetch_array($result); $ca->assign('products', $data); And tempate file is like this: {foreach from=$products key=key item=product} {$product.name} - {$product.id}<br/> {/foreach} And the outcome comes out like this: V - V V - V 6 - 6 6 - 6 V is the first character for VPS (name) and 6

Get Order & Client Information in a Hook [closed]

半腔热情 提交于 2019-12-23 05:47:20
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . i have been working on Whmcs for a while now and i am trying to run a custom hook when Admin Accepts and order but there are two things that i am not sure of doing How Can I call Api Of Whmcs From A Hook file? What i want to do is when a Admin accepts an order, A hook runs and in that hook I am trying to get