Skip to content
Multibanco for WHMCS
PHP
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/modules/gateways
CompraFacilMB-12-01-2016.zip
README.md

README.md

Multibanco WHMCS

  1. Extract the files to the root of WHMCS
  2. Enable the Gateaway:
Add the Multibanco reference to Invoice PDF
  1. Edit the file of your template invoicepdf.tpl
  2. Add to these file the following code at the end
#HiPay CompraFacil multibanco
$result = select_query('tblmultibanco', 'entity, reference, value', array('orderId' => $invoicenum, 'pagName' => $paymentmethod));
$data = mysql_fetch_array($result);

if (sizeof($data) > 2 && $status != 'Paid') {
  $entity = $data['entity'];
  $reference = $data['reference'];
  $value = $data['value'];

  $pdf->Ln(5);
  $tblhtml = '<div>
    <table border="0" cellpadding="0" cellspacing="0" width="110px;" >
      <tbody>
        <tr>
          <td valign="top" style="border-bottom: solid 1px #222; padding-top: 5px; padding-bottom: 5px;"><img src="[YOUR URL]/modules/gateways/mb.gif" border="0"></td>
          <td valign="middle" width="100%" style="padding-left: 10px; border-bottom: solid 1px #222; padding-top: 5px; padding-bottom: 5px; "><strong>Multibanco</strong></td>
        </tr>
        <tr>
          <td valign="top" align="left" style="border-bottom: solid 1px #222; padding-top: 2px; padding-bottom: 2px;"><strong>Entidade:</strong></td>
          <td valign="top" align="right" style="border-bottom: solid 1px #222; padding-top: 2px; padding-bottom: 2px; ">'.$entity.'</td>
        </tr>
        <tr>
          <td valign="top" align="left" style="border-bottom: solid 1px #222; padding-top: 2px; padding-bottom: 2px;"><strong>Refer&ecirc;ncia:</strong></td>
          <td valign="top" align="right" style="border-bottom: solid 1px #222; padding-top: 2px; padding-bottom: 2px;">'.substr($reference, 0, 3).' '.substr($reference, 3, 3).' '.substr($reference, 6, 3).'</td>
        </tr>
        <tr>
          <td valign="top" align="left" style="border-bottom: solid 1px #222; padding-top: 2px; padding-bottom: 2px; "><strong>Valor:</strong></td>
          <td valign="top" align="right" style="border-bottom: solid 1px #222; padding-top: 2px; padding-bottom: 2px; ">&euro;&nbsp;'.$value.'</td>
        </tr>
      </tbody>
    </table>
  </div>';

  $pdf->writeHTML($tblhtml, true, false, false, false, '');
}

You can’t perform that action at this time.