adjust EFT Canada processing delay based on time of day, and warn the user, #20384
[freeside.git] / httemplate / misc / xmlhttp-pay_batch-note.html
diff --git a/httemplate/misc/xmlhttp-pay_batch-note.html b/httemplate/misc/xmlhttp-pay_batch-note.html
new file mode 100644 (file)
index 0000000..ef59016
--- /dev/null
@@ -0,0 +1,18 @@
+<% $note %>\
+<%init>
+
+my ($batchnum, $format) = $cgi->param('arg');
+
+my $note = '';
+if ( $batchnum =~ /^(\d+)$/ ) {
+  my $pay_batch = FS::pay_batch->by_key($batchnum);
+  if ( $pay_batch and $format =~ /^(\w+)$/ ) {
+    my $class = "FS::pay_batch::$format";
+    if ( $class->can('download_note') ) {
+      # now we can actually do something
+      $note = $class->download_note($pay_batch);
+    }
+  }
+}
+
+</%init>