summaryrefslogtreecommitdiff
path: root/ng_selfservice/elements/post_thirdparty.php
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2013-07-24 12:56:21 -0700
committerIvan Kohler <ivan@freeside.biz>2014-04-23 23:55:30 -0700
commit759c31ea0334763f69c1f8bad4439f41b10d40dd (patch)
tree0459382370d85ec61848878031303c156b8cbcdb /ng_selfservice/elements/post_thirdparty.php
parentb7413978df0af2ae80f492b7d0f578b2cebaabfa (diff)
NG selfservice webpay interface, #23579
Diffstat (limited to 'ng_selfservice/elements/post_thirdparty.php')
-rw-r--r--ng_selfservice/elements/post_thirdparty.php29
1 files changed, 29 insertions, 0 deletions
diff --git a/ng_selfservice/elements/post_thirdparty.php b/ng_selfservice/elements/post_thirdparty.php
new file mode 100644
index 000000000..a543be93a
--- /dev/null
+++ b/ng_selfservice/elements/post_thirdparty.php
@@ -0,0 +1,29 @@
+<?
+if ( $payment_results['error'] ) {
+ // an error at this stage isn't meaningful to the user
+ $error = 'Internal error communicating with payment processor.';
+} 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.';
+} ?>