svn: /pear/packages/Payment_DTA/trunk/docs/examples/ example_dtazv.php
| From: | Martin Schütte | Date: | Wed, 14 Apr 2010 14:07:31 +0000 |
| Subject: | svn: /pear/packages/Payment_DTA/trunk/docs/examples/ example_dtazv.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-59255@lists.php.net to get a copy of this message | ||
mschuett Wed, 14 Apr 2010 14:07:31 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=297992
Log:
add simple DTAZV example
Changed paths:
A pear/packages/Payment_DTA/trunk/docs/examples/example_dtazv.php
Added: pear/packages/Payment_DTA/trunk/docs/examples/example_dtazv.php
===================================================================
--- pear/packages/Payment_DTA/trunk/docs/examples/example_dtazv.php (rev 0)
+++ pear/packages/Payment_DTA/trunk/docs/examples/example_dtazv.php 2010-04-14 14:07:31 UTC (rev
297992)
@@ -0,0 +1,71 @@
+<?php
+
+/**
+ * Payment_DTA example:
+ * Example of creating a DTAZV credit file with one transaction.
+ *
+ * PHP version 4 and 5
+ *
+ * @category Payment
+ * @package Payment_DTA
+ * @author Martin Schütte <info@mschuette.name>
+ * @copyright 2010 Martin Schütte
+ * @license http://www.debian.org/misc/bsd.license BSD
License (3 Clause)
+ * @version SVN: $Id$
+ * @link http://pear.php.net/package/Payment_DTA
+ */
+
+require_once "Payment/DTAZV.php";
+
+
+/**
+* Initialize new DTAZV file.
+* In this example the file contains credits.
+* This means that in an exchange the sender is the person who pays money
+* to the receiver.
+*/
+
+$dtazv_file = new DTAZV();
+
+/**
+* Set file sender. This is also the default sender for transactions.
+*/
+
+$dtazv_file->setAccountFileSender(
+ array(
+ "name" => "Michael Mustermann",
+ "bank_code" => 11112222,
+ "account_number" => 654321
+ )
+);
+
+/**
+* Add transaction.
+*/
+
+$dtazv_file->addExchange(
+ array(
+ "name" => "Franz Mueller", // Name of account
owner.
+ "bank_code" => "COBADEFF374", // Bank code / BIC.
+ "account_number" => "DE89370400440532013000", // Account number /
IBAN.
+ ),
+ 12.01, // Amount of money.
+ array( // Description of the transaction
("Verwendungszweck").
+ "Credit Nr. 01234",
+ "Information"
+ )
+);
+
+/**
+* Output DTAZV-File.
+*/
+
+echo $dtazv_file->getFileContent();
+
+/**
+* Write DTAZV-File.
+*/
+
+// $dta_file->saveFile("DTAZV0");
+
+?>
\ No newline at end of file