Cs-Cart custom Payment button without iframe <p>I created a payment module for Cs-Cart 4, everything works well. However, loading my inline payment gateway(see paystack.com for demo) which loads a popup in an iframe is not aesthetically pleasing. </p> <p>Is there a way I can still use my custom payment button that loads a popup outside the iframe? I don't want to use the redirect to another website method, it's not nice either. </p> <p><a href="http://i.stack.imgur.com/MmdRZ.png" rel="nofollow">That's what the checkout button looks like on the page</a></p> <p><a href="http://i.stack.imgur.com/k6BLu.png" rel="nofollow">This is meant to be a fullscreen popup</a></p> <p>Current code sample for the payment module <pre><code>function fn_paystack_adjust_amount($price, $payment_currency){ $currencies = Registry::get('currencies'); if (array_key_exists($payment_currency, $currencies)) { if ($currencies[$payment_currency]['is_primary'] != 'Y') { $price = fn_format_price($price / $currencies[$payment_currency]['coefficient']); } } else { return false; } return $price; } function fn_paystack_place_order($original_order_id){ $cart = &amp; $_SESSION['cart']; $auth = &amp; $_SESSION['auth']; list($order_id, $process_payment) = fn_place_order($cart, $auth); $data = array ( 'order_id' =&gt; $order_id, 'type' =&gt; 'S', 'data' =&gt; TIME, ); db_query('REPLACE INTO ?:order_data ?e', $data); $data = array ( 'order_id' =&gt; $order_id, 'type' =&gt; 'E', // extra order ID 'data' =&gt; $original_order_id, ); db_query('REPLACE INTO ?:order_data ?e', $data); return $order_id; } if (!defined('BOOTSTRAP')) { die('Access denied'); } // Return from payment if (defined('PAYMENT_NOTIFICATION')) { if ($mode == 'return' &amp;&amp; !empty($_REQUEST['merchant_order_id'])) { if (isset($view) === false){ $view = Registry::get('view'); } $view-&gt;assign('order_action', __('placing_order')); $view-&gt;display('views/orders/components/placing_order.tpl'); fn_flush(); $code = $_REQUEST['merchant_order_id']; $merchant_order_id = fn_paystack_place_order($_REQUEST['merchant_order_id']); $amount = $_REQUEST['amount']; if(!empty($merchant_order_id) and !empty($amount)){ if (fn_check_payment_script('paystack.php', $merchant_order_id, $processor_data)) { $mode = $processor_data['processor_params']['paystack_mode']; if ($mode == 'test') { $key = $processor_data['processor_params']['paystack_tsk']; }else{ $key = $processor_data['processor_params']['paystack_lsk']; } // $key_secret = $processor_data['processor_params']['key_secret']; $order_info = fn_get_order_info($merchant_order_id); $pp_response = array(); $success = false; $error = ""; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,"https://api.paystack.co/transaction/verify/".$code); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $headers = [ 'Authorization: Bearer '.$key, ]; curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $response = curl_exec($ch); $verification = json_decode($response); if (curl_errno($ch)) { // should be 0 // curl ended with an error $cerr = curl_error($ch); curl_close($ch); throw new Exception("Curl failed with response: '" . $cerr . "'."); } curl_close ($ch); if(($verification-&gt;status===false) || (!property_exists($verification, 'data')) || ($verification-&gt;data-&gt;status !== 'success')){ $success = false; $error = ""; }else{ if ($amount == ($verification-&gt;data-&gt;amount/100)) { $success = true; }else{ $success = false; $error = "Invalid Amount"; } } if($success === true){ $pp_response['order_status'] = 'P'; $pp_response['transaction_id'] = $code; $pp_response['Status'] = 'Payment Successful'; fn_finish_payment($merchant_order_id, $pp_response); fn_order_placement_routines('route', $merchant_order_id); }else { $pp_response['order_status'] = 'O'; $pp_response['transaction_id'] = $code; $pp_response['Status'] = 'Payment Failed'; fn_finish_payment($merchant_order_id, $pp_response); fn_set_notification('E', __('error'), 'Payment Failed #'.$code); fn_order_placement_routines('checkout_redirect'); } } } else { fn_set_notification('E', __('error'), 'Payment Unsuccessful'.$_REQUEST['merchant_order_id']); fn_order_placement_routines('checkout_redirect'); } } exit; }else { $url = fn_url("payment_notification.return?payment=paystack", BOOTSTRAP, 'current'); $maintotal = $order_info['total']+$order_info['payment_surcharge']; $mode = $processor_data['processor_params']['paystack_mode']; if ($mode == 'test') { $key = $processor_data['processor_params']['paystack_tpk']; }else{ $key = $processor_data['processor_params']['paystack_lpk']; } $html = ' &lt;form action="'.$url.'" method="POST" target="_parent"&gt; &lt;input type="hidden" name="paystack_payment_id" id="paystack_payment_id" /&gt; &lt;input type="hidden" name="merchant_order_id" id="order_id" value="'.$order_id.'"/&gt; &lt;input type="hidden" name="amount" value="'.$maintotal.'"/&gt; &lt;script src="https://js.paystack.co/v1/inline.js" data-key="'.$key.'" data-email="'.$order_info['email'].'" data-amount="'.($maintotal*100).'" data-ref="'.$order_id.'" &gt; &lt;/script&gt; &lt;/form&gt;'; echo &lt;&lt;&lt;EOT {$html} &lt;/body&gt; &lt;/html&gt; EOT; exit; } ?&gt; </code></pre>