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