svn: /pear/packages/Payment_DTA/trunk/docs/examples/ show_dta.php
| From: | Martin Schütte | Date: | Mon, 06 Sep 2010 15:24:10 +0000 |
| Subject: | svn: /pear/packages/Payment_DTA/trunk/docs/examples/ show_dta.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-60278@lists.php.net to get a copy of this message | ||
mschuett Mon, 06 Sep 2010 15:24:10 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=303095
Log:
default to file upload; rename labels; add fields for type and sender
Changed paths:
U pear/packages/Payment_DTA/trunk/docs/examples/show_dta.php
Modified: pear/packages/Payment_DTA/trunk/docs/examples/show_dta.php
===================================================================
--- pear/packages/Payment_DTA/trunk/docs/examples/show_dta.php 2010-09-06 15:14:22 UTC (rev 303094)
+++ pear/packages/Payment_DTA/trunk/docs/examples/show_dta.php 2010-09-06 15:24:10 UTC (rev 303095)
@@ -3,7 +3,7 @@
/**
* Example how to use the DTA/DTAZV parser.
*
- * $dtafilestring is for easy testing. Rename/Remove it to upload own files.
+ * Uncomment $dtafilestring for easy testing without uploading.
*
* PHP version 5
*
@@ -32,6 +32,9 @@
}
}
+/*
+ * Uncomment to test example files.
+
// correct file
$dtafilestring =
'0128AGK1605000000000000SENDERS NAME 300110 3503'.
@@ -47,7 +50,7 @@
'0128E 000000200000000000000000000002715800000000000066668888'.
'0000000155646 ';
-// incorrect file to check error handling/reporting
+ // incorrect file to check error handling/reporting
$dtafilestring =
'0128AGK1605000000000000SENDERS NAME 300110 3503'.
'0077670000000000 1'.
@@ -96,6 +99,7 @@
' '.
' '.
' ';
+*/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
@@ -174,7 +178,8 @@
die();
} elseif (get_class($e) == "Payment_DTA_ParseException") {
print "<li class='status error'>Fehler: ".
- $e->getMessage()."</li>";
+ $e->getMessage()."<br/>Ursache: ".
+ $e->getCause()->getMessage()."</li>";
} elseif (get_class($e) == "Payment_DTA_ChecksumException") {
print "<li class='status error'>Datei enthält falsche
Prüfsumme: ".
$e->getMessage()."</li>";
@@ -191,6 +196,13 @@
<h2>Begleitdaten:</h2>
<table>
<tr>
+ <td class="label">Datei-Art:</td>
+ <td class="value"><?php
+ print ($meta["type"] == "DEBIT") ? "Lastschrift" :
"Gutschrift/Überweisung";
+ ?></td>
+ </tr>
+
+ <tr>
<td class="label">Erstellungsdatum:</td>
<td class="value"><?php print strftime("%d.%m.%y",
$meta["date"]); ?></td>
</tr>
@@ -203,7 +215,7 @@
<tr> <td colspan="2"> </td> </tr>
<tr>
- <td class="label">Anzahl der Überweisungen:</td>
+ <td class="label">Anzahl der Transaktionen:</td>
<td class="value"><?php print $meta["count"]; ?></td>
</tr>
@@ -231,6 +243,11 @@
<tr> <td colspan="2"> </td> </tr>
<tr>
+ <td class="label">Auftraggeber:</td>
+ <td class="value"><?php print $meta["sender_name"];
?></td>
+ </tr>
+
+ <tr>
<td class="label">Auftraggeber Bankleitzahl:</td>
<td class="value"><?php print $meta["sender_bank_code"];
?></td>
</tr>
@@ -241,7 +258,7 @@
</tr>
</table>
- <h2>Überweisungen:</h2>
+ <h2>Transaktionen:</h2>
<ol>
<?php
foreach ($dta as $transaction) {
@@ -311,4 +328,4 @@
?>
</ol>
</body>
-</html>
\ No newline at end of file
+</html>