I leave here my code to DineroMail (dineromail.com) payment gateway:
You could add this below another payment processor in the nopcart.js file or you could replace an existing one if you are not going to use it:
- Code: Select all
if ( PaymentProcessor == 'dm' ) {
//Process hidden values for dineromail.
strOutput += "<input type=hidden name=\"NombreItem\" value=\"Pedido\">";
strOutput += "<input type=hidden name=\"PrecioItem\" value=\""+ moneyFormat((fTotal)) + "\">";
strOutput += "<input type=hidden name=\"NroItem\" value=\"1\">";
strOutput += "<input type=hidden name=\"TipoMoneda\" value=\"Nro de item\">";
strOutput += "<input type=hidden name=\"E_Comercio\" value=\"xxx\">";
strOutput += "<input type=hidden name=\"image_url\" value=\"http://www.your page/logo.JPG\">";
strOutput += "<input type=hidden name=\"DireccionExito\" value=\"http://www.yourpage.html\">";
strOutput += "<input type=hidden name=\"DireccionFracaso\" value=\"http://www.yourpage.htm\">";
strOutput += "<input type=hidden name=\"DireccionEnvio\" value=\"0\">";
strOutput += "<input type=hidden name=\"Mensaje\" value=\"1\">";
replace xxx with your own client code
Remember to include the following script between tags <head> and </head> in the page when you are going to call the function (the button thats redirects to payment processor):
- Code: Select all
<SCRIPT type="text/javascript" language="JavaScript">
PaymentProcessor = 'dm';
</SCRIPT>
Hope helps
You are welcome!
