Jump to content

Manol

Members
  • Posts

    292
  • Joined

  • Last visited

Everything posted by Manol

  1. Manol

    Pay method

    Still not working, maybe something to do with htaccess?
  2. I'm trying to implement a pay method, this is the code I pasted into a pw page. The problem is when I click at the bottom image (tpvirtual.jpg) I get a new blank window, but when I do it without pw as a normal php file under xampp it works ok. <?PHP // If form is submitted with all required data then show the form // else show error page empty($Formulario) ? ShowForm($Ds_Merchant_Amount,$Ds_Merchant_Currency,$prod) : ShowError(); exit; ?> <?PHP function ShowError () { echo "<html><head><title>Results</title></head><body><table width=100% height=50%><tr><td><p><h2><center>Compruebe que todos los datos del formulario son correctos!!</center></h2></p></td></tr></table></body></html>\n"; } # End of function ShowError function ShowForm ($amount,$currency,$producto) { // Posted data global $HTTP_POST_VARS; // Valores constantes del comercio $url_tpvv='https://sis-t.redsys.es:25443/sis/realizarPago'; $clave='qwertyasdf0123456789'; $name='Comercio Pruebas'; $code='272043225'; $terminal='1'; $order=date('ymdHis'); $amount='25'; $currency='978'; $transactionType='0'; $urlMerchant='http://www.redsys.es'; $producto='Zapatos'; // Now, print the HTML script echo "<html><head><title>Comercio Simulador</title></head> <script language=JavaScript> function calc() { vent=window.open('','tpv','width=725,height=600,scrollbars=no,resizable=yes,status=yes,menubar=no,location=no'); document.forms[0].submit();} </script> <body bgcolor=white> <form name=compra action=$url_tpvv method=post target=tpv> <pre> <table> <tr><td> <h2>Comercio de prueba.</h2> </td></tr><tr><td> Comercio: <font color=blue>$name</font> </td></tr><tr><td> FUC: <font color=blue>$code</font> </td></tr><tr><td> Terminal: <font color=blue>$terminal</font> </td></tr><tr><td> Pedido: <font color=blue>$order</font> </td></tr><tr><td> Producto: <font color=blue>$producto</font> </td></tr><tr><td> Importe: <font color=blue>$amount</font> </td></tr><tr><td> Tipo de Operacion: <font color=blue>$transactionType (Autorización)</font> </td></tr><tr><td> URL del comercio: <font color=blue>$urlMerchant</font> </td></tr><tr><td>"; // Currency strings if ($currency == "978") { echo "Moneda: <font color=blue>Euros</font>"; } echo "</td> </tr><tr><td> <input type=hidden name=Ds_Merchant_Amount value='$amount'> </td></tr><tr><td> <input type=hidden name=Ds_Merchant_Currency value='$currency'> </td></tr><tr><td> <input type=hidden name=Ds_Merchant_Order value='$order'> </td></tr><tr><td> <input type=hidden name=Ds_Merchant_MerchantCode value='$code'> </td></tr><tr><td> <input type=hidden name=Ds_Merchant_Terminal value='$terminal'> </td></tr><tr><td> <input type=hidden name=Ds_Merchant_TransactionType value='$transactionType'> </td></tr><tr><td> <input type=hidden name=Ds_Merchant_MerchantURL value='$urlMerchant'> </td></tr><tr><td>"; // Compute hash to sign form data // $signature=sha1_hex($amount,$order,$code,$currency,$clave); $message = $amount.$order.$code.$currency.$transactionType.$urlMerchant.$clave; $signature = strtoupper(sha1($message)); echo "<input type=hidden name=Ds_Merchant_MerchantSignature value='$signature'> </td></tr> </table> <center><a href='javascript:calc()'><img src='/tpvirtual.jpg' border=0 ALT='TPV Virtual'></a></center> </pre> </form> </body></html>"; } # End of function ShowForm ?> Any ideas?, thanks
  3. Thanks renobird I saw it long time ago and your calendar looks awesome.
  4. Hello guys. I've been asked to create a calendar for a motorbike school (booking, events, colors, d&d, gantt ...). Now is a great opportunity to create a general events calendar module which can be used in many ambits and share it with this great community that has given me so many things. I've been looking around for some calendars and found the two shown in the title as possible candidates, what do you think, do you know any others? DHXScheduler Arshaw's Fullcalendar
  5. Hello. I haven't developed a module yet but the time has come to get my hands dirty. I've been looking some modules ( PageListBetterLabels.module, PageListImageLabel.module) but couldn't figure out how to do what I need. As an example, I would like to hide all children from cities but berlin ( I'll have a user called berlin_mark and he'll be allowed to see just this page but not the other cities ). home --cities ----amsterdam ----new-york ----berlin ----london --other-things Thanks.
  6. Marvelous, easy when you now how to. $t->useRoles = 1; $t->set("roles", array('1316','2006')); //view $t->set("editRoles", array('1316','2006')); //edit $t->set("createRoles", array('1316','2006')); //create $t->set("addRoles", array('1316','2006')); //add children The array contains as Martijn said the roles's ids. Thanks to you three.
  7. Hello Martijn. Your code is working I used $t->useRoles = 1; $t->set("roles", array('1316','2006')); // where 1234 is the ID of the role you want to add. It allows those roles to view pages using this templates but edit, create and add. Hi Soma. This page will have many roles and users I prefer do to it automatically with the api.
  8. I've got that: <?php // fieldgroup $fg = new Fieldgroup(); $fg->name = "myfg"; $fg->add("title"); // add some fields $fg->save(); // template $t = new Template(); $t->name = "mytpl"; $t->fieldgroup = $fg; $t->save(); ?> and wish to add access ( view, edit, create,a add children to this template ) to certain roles, and remove access to this template to other roles? When I create a template it gives view access to all roles but I'm interested in getting something like the image down.
  9. You're totally right about using $user, big mistake from my part. One last question, how can I set access ( view, edit, create,a add children ) to certain roles? Thank you.
  10. How about setting the language? $user = new User(); $user->name= "me"; $user->pass = "me"; $user->addRole("guest"); $user->addRole("myrole"); $user->language=1;
  11. Need some help, how can I set view, edit, delete, move..., permissions through the api? $role = new Role(); $role->name= "myrole; $role->save(); $role->set("page-edit",true); Thanks.
  12. Thank you Martijn, more info here, it might be usefull for somebody.
  13. Hello. Following Soma's instructions I have removed some tabs for a page, now I would like to hide some buttons in the following image: for the tabs it was $this->addHookAfter("ProcessPageEdit::buildForm", $this, "removeTabs"); ... $fieldset = $form->find("id=ProcessPageEditSettings")->first(); $form->remove($fieldset); what would be the hook and how do I get the buttons I wish? Thank you.
  14. Unify theme. With adamspruijt' Unify theme and using Ryan's marker module I'm getting some view problems, controls are gone. I solved that adding those lines to style.css (admin-theme) .gmnoprint img { max-width: none; }
  15. I'm facing a problem with Ryan's module map marker, the map shows just a little square at the top left of the div and resizing the window it shows the whole map, has anybody got that problem before?
  16. Hello posidude, This is what I was looking for, I have used Soma´s module is another page but for this case yours fits me better, thank you.
  17. I'm using the same template because sometimes I need to look for all cities (template=city) and they don't share the same father, if so I would get cities->children() but is not the case. In any case thank you for your help I'm reconsidering moving all cities under the same father so I could use your approach which is simple and simplicity is in most cases the best solution.
  18. Thanks Joss it could be an approach but rather will look for a different solution because I need all cities to have the same template.
  19. Happy Christmas. I'm developing a site, it follows this structure: cities ----city1 (city template ) --------building1 (building template) --------building2 --------building3 --------building4 ----city2 --------building1 --------building2 ----city3 --------building1 --------building2 --------building3 --------building4 ... then I've got roles city1, city2, city3 ... My question is: I wish users with role city1 to be able to edit only buildings within its city role but not others, is it possible without a hook? Thank you.
  20. Hello. I would like to save all assets/files to a different domain, is it possible hooking PagefilesManager::url()?
  21. Hi Teppo, did you manage to move assets/files to another domain?
×
×
  • Create New...