Jump to content

Trying to make Module gateway work!


Belier

Recommended Posts

Im making a module Gateway, but it isnt working. I dont know what Im doing wrong! can you help me out? =)

 

Thank you!

 

Posting the code:

<?php
// Desarrollado por Diseño & Programación, Hosting IT Polar
// www.itpolar.com

function cuentadigital_config() {
   $configarray = array(
    "CuentaDigital" => array("Type" => "System", "Value"=>"CuentaDigital"),
    "id" => array("CuentaDigital" => "Cuenta ID", "Type" => "text", "Size" => "20", ),
    "empresa" => array("CuentaDigital" => "Nombre Empresa", "Type" => "text", "Size" => "20", ),
   );
return $configarray;
}

function cuentadigital_link($params) {

# Gateway Specific Variables
$id = $params['id'];
$empresa = $params['empresa'];

# Invoice Variables
$invoiceid = $params['invoiceid'];
$description = $params["description"];
   $amount = $params['amount']; # Format: ##.##
   $currency = $params['currency']; # Currency Code

# Client Variables
$firstname = $params['clientdetails']['firstname'];
$lastname = $params['clientdetails']['lastname'];
$email = $params['clientdetails']['email'];
$address1 = $params['clientdetails']['address1'];
$address2 = $params['clientdetails']['address2'];
$city = $params['clientdetails']['city'];
$state = $params['clientdetails']['state'];
$postcode = $params['clientdetails']['postcode'];
$country = $params['clientdetails']['country'];
$phone = $params['clientdetails']['phonenumber'];

# System Variables
$companyname = $params['companyname'];
$systemurl = $params['systemurl'];
$currency = $params['currency'];

# Enter your code submit to the gateway...
$comision = $amount*0.0484;
if ($comision < 1.82)
{
	$comision=1.82;
}
$preciofinal = $amount + $comision;

$code = "
<p><u><font face=\"Verdana\" size=\"2\">
Sólo para residentes de Argentina Pagofacil,Rapipago o Bapropagos
</font></u></p><p><font face=\"Verdana\" size=\"1\">
Click en el botón <b>"imprimir cupón"</b> 
para imprimir cupon de pago<br>Monto final en 
<b>ar$ = ar$'.$precio.' + ar$ '.$comision.' de comision = <font color=\"#FF0000\">total ar$ ".$preciofinal."</font></b></font></p>
<FORM target=_blank action=\"https://www.cuentadigital.com/string.php\" METHOD=\"get\">	<p>	<input type=\"submit\" value=\"Imprimir cupón de pagos\"></p>	
<input type=\"hidden\" value=\"".$id."\" name=\"id\">
<input type=\"hidden\" value=\"WHMCSpagos\" name=\"codigo\"><
input type=\"hidden\" value=\"".$preciofinal."\" name=\"precio\">
<input type=\"hidden\" value=\"30\" name=\"venc\">
<input type=\"hidden\" value=\"".$empresa."\" name=\"site\">
<input type=\"hidden\" value=\"".$email."\" name=\"desde\">
<input type=\"hidden\" value=\"".$email."\" name=\"hacia\">
<input type=\"hidden\" value=\"Pago por Factura Nº ".$invoiceid." - ".$email." name=\"concepto\"></form>
";
return $code;
}

?>

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