2 if ( $payment_results['error'] ) {
3 // an error at this stage isn't meaningful to the user
4 // but make sure it's logged
5 error_log("[start_thirdparty] $error");
6 $error = 'Internal error communicating with payment processor.';
8 } elseif ( isset($payment_results['url']) ) {
9 $url = $payment_results['url'];
11 <H3>Redirecting to payment processor...</H3>
12 <DIV STYLE="display:none">
13 <FORM ID="autoform" METHOD="POST" ENCTYPE="multipart/form-data" ACTION="<?
17 if (isset($payment_results['post_params'])) {
18 foreach ($payment_results['post_params'] as $key => $value) {
19 echo("<INPUT TYPE=\"hidden\" NAME=\"$key\" VALUE=\"$value\">\n");
22 <INPUT TYPE="submit" VALUE="submit">
25 <SCRIPT TYPE="text/javascript">
26 window.onload = function() {
27 document.getElementById('autoform').submit();
31 $error = 'Internal error: no redirect URL.';