Created
March 27, 2019 19:49
-
-
Save mauriciogofas/4a4233b204178fd38cd298401b8bc5c5 to your computer and use it in GitHub Desktop.
Módulo Gofas Boleto Fácil para WHMCS: Exemplo de configuração adicional para alterar a data de vencimento do Boleto. /modules/gateways/gofasboletofacil/params/7_new_billet_duedate.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Módulo Boleto Fácil para WHMCS (boletobancario.com) | |
* @author Mauricio Gofas | gofas.net | |
* @see https://gofas.net/ | |
* @copyright 2018/2019 https://gofas.net | |
* @license https://gofas.net?p=9340 | |
* @support https://gofas.net/foruns/ | |
* @version 1.0.4 | |
*/ | |
if(!defined('WHMCS')) { die(); } | |
if( (int)strtotime($invoice_duedate) >= (int)strtotime(date('Y-m-d') ) ) { | |
$plus_due_date = "2"; // Edite aqui o nº de dias adicionais à data de vencimento do boleto | |
// Se a data de vencimento da fatura é igual ou maior que hoje | |
$billet_duedate = date('Y-m-d', strtotime($billet_duedate.' +'.$plus_due_date.' days')); // soma X dias à data de vencimento do Boleto | |
$postfields['dueDate'] = date('d/m/Y',strtotime($billet_duedate)); | |
} | |
if($debug_or_log) { // Salva no log e exibe no debug o resultado do processamento da data de vencimento | |
$log_result['plus_due_date'] = $plus_due_date; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment