Unlimited Shared hosting & Unlimited Disk Space from $5.95 - Dreamhost
Solid Managed VPS with 4 IP's from $60 - Liquid Web
Lightning Fast Dedicated Servers & 1GB RAM from $149 - Liquid Web
#1 Domain Registration with WHOIS Privacy - Just $9.95
This Dreamhost support thread was started by CajuCLC on 2009-12-17 11:11:09:
Post Reply? So, we are from Brasil and we are a store. So now we have our online store (Magento). We will accept Visa, and they need us to have a WINDOWS SERVER (dedicated), but it’s too expensive. So we can use Linux and use a Payment Gateway. Ok. But they have a anti-block popup. Because when it’s redirected to Visa, it opens a POPUP and browser blocks it. So they have an ASP “solution” and we changed it to PHP. But it doesn’t work anyway! And VISA says we need to have it, but everyone is having this problem. lol I will post codes too. File Redirect.php is the file that redirects to Visa. If you check this line: $script .= ‘ window.location = “redirecionaCBP.php”‘; This is to open that other file, that should be the solution to be an anti-block popup. Really, they are crazy, but if you could help me, or some option, I don’t know, anything, it would be great. Redirect.php: In reply to: <?php class Campoy_Visanet_Block_Standard_Redirect extends Mage_Core_Block_Abstract { protected function _construct() { $this->setTemplate(’visanet/standard/redirect.phtml’); parent::_construct(); } protected function _toHtml() { $html = ‘<html>’; $html .= ‘<head>’; $html .= ‘<meta http-equiv=”Content-Type” content=”text/html; charset=ISO-8859-1″ />’; $html .= $this->getScriptCode(); $html .= ‘</head>’; $html .= ‘<body>’; $html .= ‘<p align=”center”>’ . $this->__(’Você será redirecionado para a Visanet em alguns instantes. Se isso não acontecer, clique no botão abaixo.’) . ‘</p>’; $html .= ‘<p align=”center”>’ . $this->getFormCode() . ‘</p>’; $html .= ‘<script type=”text/javascript”>document.getElementById(”visanet_standard_checkout”).submit();</script>’; $html .= ‘</body></html>’; return $html; } private function getFormCode() { $standard = Mage::getModel(’visanet/standard’); $formFields = $standard->getStandardCheckoutFormFields(); $total = $formFields['damount']; $total = number_format($total, 2, ‘.’, ”); if (!Mage::getModel(’wlpayment/wlpayment’)->saveReg($formFields['orderid'], $formFields['tid'], $formFields['parcelas'], $total, $formFields['bandeira'])) { echo ‘Falha ao gravar transaç$atilde;o.’; } $form = ‘<form id = “visanet_standard_checkout” name=”visanet_standard_checkout” action=”‘ . $standard->getVisanetUrl() . ‘” method=”post” target=”mpg_popup” onSubmit=”javascript:fabrewin()”>’; foreach ($formFields as $field=>$value) { $form .= ‘<input type=”hidden” name=”‘ . $field . ‘” value=”‘ . $value . ‘” />’; } $form .= ‘<p align=”center”>’; $form .= ‘<input type=”image” src=”‘ . $standard->getSkinUrl(’images/visa.jpg’) . ‘” /> . <br />’; $form .= ‘<input type=”submit” value=”Clique aqui para entrar na página da Visa” />’; $form .= ‘</p>’; $form .= ‘</form>’; return($form); } private function getScriptCode() { $script = ‘<script language=”JavaScript” type=”text/javascript”>’; $script .= ‘var retorno;’; $script .= ‘var mpg_popup;’; $script .= ‘window.name=”loja”;’; $script .= ‘function fabrewin()’; $script .= ‘{’; $script .= ‘ if(navigator.appName.indexOf(”Netscape”) != -1) {’; $script .= ‘ mpg_popup = window.open(”", “mpg_popup”,”toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=0,screenX=0,screenY=0,left=0,top=0,width=800,height=600″);’; $script .= ‘ }’; $script .= ‘ else {’; $script .= ‘ mpg_popup = window.open(”", “mpg_popup”,”toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=0,screenX=0,screenY=0,left=0,top=0,width=800,height=600″);’; $script .= ‘ }’; $script .= ‘ window.location = “redirecionaCBP.php”‘; $script .= ‘ return true;’; $script .= ‘}’; $script .= ‘</script>’; return($script); } } redirecionaCBP.php: In reply to: <html> <head> <title>Multitech Informática</title> <meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″> </head> <body bgcolor=”#ffffff” text=”#000000″ onload=”document.forms[0].submit();”> <form name=”frmRedireciona” method=”post” action=”https://cbp.3dsolution.com.br/cbp/retornoEC.asp”> <input type=”hidden” name=”url” value=”https://cbp.3dsolution.com.br/cbp/aguardeEC.html”> </form> </body> </html> VISIT MY WEBSITE!
Join in on the original post at the Dreamhost Forum, Apply for a Dreamhost Account or view our Dreamhost Review.
Hosting Discounts
All Hosts
- 1&1
- A Small Orange
- Aplus
- Bluehost
- BurstNET
- CalPOP
- CariNet
- CheapVPS
- DailyRazor
- Dreamhost
- DynDNS
- Eapps
- EasyCGI
- Eleven2
- Elief
- Engine Yard
- Exmasters
- Fastservers
- Fat Cow
- Fluid
- Fused Network
- Future Hosting
- Geek Storage
- Globat
- GoDaddy
- GoGrid
- Good Avocado
- HiVelocity
- HostDime
- Hostgator
- HostICan
- Hostmonster
- HostV
- HostWay
- ICDSoft
- InMotion
- iWeb
- IX
- Joyent
- JustHost
- KnownHost
- Laughing Squid
- Layered Tech
- Limestone Networks
- LiquidWeb
- Litespeed
- LunarPages
- Media Temple
- Micfo
- MidPhase
- Mosso
- Myriad Network
- NetDepot
- Netfirms
- Peer1
- ProVPS
- Rackspace
- Razorservers
- ResellerZoom
- Right Scale
- SeeksAdmin
- Servage
- ServerBeach
- ServerPronto
- ServINT
- SilverRack
- Singlehop
- SiteGround
- Slhost
- Slicehost
- Softlayer
- SolarVPS
- Steadfast Networks
- TekTonic
- The Planet
- TheNYNoc
- Thinkhost
- Ultra Hosting
- Ultra Website Hosting
- Umbra Hosting
- URLJet
- Velcom
- VolumeDrive
- Voxtreme
- VPSLand
- WebHostingPad
- WiredTree
- WireNine
- XLHost
- Yahoo
- Yourserving

