function submit_ogone_post() { // The user will briefly see a message on the screen that reads: // "Please wait, your order is being processed..." and then immediately // is redirected to authorize.net. $echo = "<form method=\"post\" class=\"eshop eshop-confirm\" action=\"" . $this->autoredirect . "\"><div>\n"; foreach ($this->fields as $name => $value) { $pos = strpos($name, 'amount'); if ($pos === false) { $echo .= "<input type=\"hidden\" name=\"{$name}\" value=\"{$value}\" />\n"; } else { $echo .= eshopTaxCartFields($name, $value); } } $echo .= '<label for="ppsubmit" class="finalize"><small>' . __('<strong>Note:</strong> Submit to finalize order at ogone.', 'eshop') . '</small><br /> <input class="button submit2" type="submit" id="ppsubmit" name="ppsubmit" value="' . __('Proceed to Checkout »', 'eshop') . '" /></label>'; $echo .= "</div></form>\n"; return $echo; }
function submit_paypal_post() { // this function actually generates an entire HTML page consisting of // a form with hidden elements which is submitted to paypal via the // BODY element's onLoad attribute. We do this so that you can validate // any POST vars from you custom form before submitting to paypal. So // basically, you'll have your own form which is submitted to your script // to validate the data, which in turn calls this function to create // another hidden form and submit to paypal. // The user will briefly see a message on the screen that reads: // "Please wait, your order is being processed..." and then immediately // is redirected to paypal. $echo = "<form method=\"post\" class=\"eshop eshop-confirm\" action=\"" . $this->autoredirect . "\"><div>\n"; foreach ($this->fields as $name => $value) { $pos = strpos($name, 'amount'); if ($pos === false) { $echo .= "<input type=\"hidden\" name=\"{$name}\" value=\"{$value}\" />\n"; } else { $echo .= eshopTaxCartFields($name, $value); } } $echo .= apply_filters('eshoppaypalextra', ''); $echo .= '<label for="ppsubmit" class="finalize"><small>' . __('<strong>Note:</strong> Submit to finalize order at PayPal.', 'eshop') . '</small><br /> <input class="button submit2" type="submit" id="ppsubmit" name="ppsubmit" value="' . __('Proceed to Checkout »', 'eshop') . '" /></label>'; $echo .= "</div></form>\n"; return $echo; }