Tuve el mismo problema. Me llevó todo el día. En mi caso, el problema con Chrome era que Chrome estaba bloqueando mis acciones y afirmaba que Chrome estaba bloqueando las ventanas emergentes. Aquí está el código que solía resolver:
/** This is the script that will redraw current screen and submit to paypal. */
echo '<script>'."\n" ;
echo 'function serverNotifySelected()'."\n" ;
echo '{'."\n" ;
echo ' window.open(\'\', \'PayPalPayment\');'."\n" ;
echo ' document.forms[\'paypal_form\'].submit();'."\n" ;
echo ' document.forms[\'server_responder\'].submit();'."\n" ;
echo '}'."\n" ;
echo '</script>'."\n" ;
/** This form will be opened in a new window called PayPalPayment. */
echo '<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" name="paypal_form" method="post" target="PayPalPayment">'."\n" ;
echo '<input type="hidden" name="cmd" value="_s-xclick">'."\n" ;
echo '<input type="hidden" name="custom" value="'.$transaction_start.'">'."\n" ;
echo '<input type="hidden" name="hosted_button_id" value="'.$single_product->hosted_button_id.'">'."\n" ;
echo '<table>'."\n" ;
echo ' <tr>'."\n";
echo ' <td><input type="hidden" name="'.$single_product->hide_name_a.'" value="'.$single_product->hide_value_a.'">Local</td>'."\n" ;
echo ' </tr>'."\n" ;
echo ' <tr>'."\n" ;
echo ' <td>'."\n" ;
echo ' <input type="hidden" name="'.$single_product->hide_name_b.'" value="'.$single_product->hide_value_b.'" />'.$single_product->short_desc.' $'.$adj_price.' USD'."\n" ;
// <select name="os0">
// <option value="1 Day">1 Day $1.55 USD</option>
// <option value="All Day">All Day $7.50 USD</option>
// <option value="3 Day">3 Day $23.00 USD</option>
// <option value="31 Day">31 Day $107.00 USD</option>
// </select>
echo ' </td>'."\n" ;
echo ' </tr>'."\n" ;
echo '</table>'."\n" ;
echo '<input type="hidden" name="currency_code" value="USD">'."\n" ;
echo '</form>'."\n" ;
/** This form will redraw the current page for approval. */
echo '<form action="ProductApprove.php" name="server_responder" method="post" target="_top">'."\n" ;
echo '<input type="hidden" name="trans" value="'.$transaction_start.'">'."\n" ;
echo '<input type="hidden" name="prod_id" value="'.$this->product_id.'">'."\n" ;
echo '</form>'."\n" ;
/** No form here just an input and a button. onClick will handle all the forms */
echo '<input type="image" src="https://www.sandbox.paypal.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" alt="PayPal - The safer, easier way to pay online!" onclick="serverNotifySelected()">'."\n" ;
echo '<img alt="" border="0" src="https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">'."\n" ;
Este código no aparece como una ventana emergente en Chrome. Es el código para un solo botón. Cuando se presiona el botón, cambia la pantalla actual a preaprobación Y abre una nueva página para que PayPal la llene.
Lo que descubrí es que si la nueva ventana se abre CON un botón, entonces Chrome no lo trata como una ventana emergente. Si intenta abrir esa nueva ventana con un temporizador, Chrome trata la ventana cronometrada que se abre como una ventana emergente.
No, en realidad tengo que enviar los dos formularios, es decir, el primero y el nombre = "frmRight1" – Linto
¡De acuerdo, vea mi tercera respuesta final! –
Tuvo el problema, para enviar el formulario con Firefox y Chrome. Pero después de especificar el formulario específico por nombre, todo funciona bien. Gracias –