changes from 1.2.3 release, fixes from webdemo
[freeside.git] / htdocs / docs / man / FS / cust_pay_batch.html
1 <HTML>
2 <HEAD>
3 <TITLE>FS::cust_pay_batch - Object methods for batch cards</TITLE>
4 <LINK REV="made" HREF="mailto:none">
5 </HEAD>
6
7 <BODY>
8
9 <!-- INDEX BEGIN -->
10
11 <UL>
12
13         <LI><A HREF="#NAME">NAME</A>
14         <LI><A HREF="#SYNOPSIS">SYNOPSIS</A>
15         <LI><A HREF="#DESCRIPTION">DESCRIPTION</A>
16         <LI><A HREF="#METHODS">METHODS</A>
17         <LI><A HREF="#VERSION">VERSION</A>
18         <LI><A HREF="#BUGS">BUGS</A>
19         <LI><A HREF="#SEE_ALSO">SEE ALSO</A>
20 </UL>
21 <!-- INDEX END -->
22
23 <HR>
24 <P>
25 <H1><A NAME="NAME">NAME</A></H1>
26 <P>
27 FS::cust_pay_batch - Object methods for batch cards
28
29 <P>
30 <HR>
31 <H1><A NAME="SYNOPSIS">SYNOPSIS</A></H1>
32 <P>
33 <PRE>  use FS::cust_pay_batch;
34 </PRE>
35 <P>
36 <PRE>  $record = new FS::cust_pay_batch \%hash;
37   $record = new FS::cust_pay_batch { 'column' =&gt; 'value' };
38 </PRE>
39 <P>
40 <PRE>  $error = $record-&gt;insert;
41 </PRE>
42 <P>
43 <PRE>  $error = $new_record-&gt;replace($old_record);
44 </PRE>
45 <P>
46 <PRE>  $error = $record-&gt;delete;
47 </PRE>
48 <P>
49 <PRE>  $error = $record-&gt;check;
50 </PRE>
51 <P>
52 <HR>
53 <H1><A NAME="DESCRIPTION">DESCRIPTION</A></H1>
54 <P>
55 An FS::cust_pay_batch object represents a credit card transaction ready to
56 be batched (sent to a processor). FS::cust_pay_batch inherits from
57 FS::Record. Typically called by the collect method of an FS::cust_main
58 object. The following fields are currently supported:
59
60 <DL>
61 <DT><STRONG><A NAME="item_trancode">trancode - 77 for charges</A></STRONG><DD>
62 <DT><STRONG><A NAME="item_cardnum">cardnum</A></STRONG><DD>
63 <DT><STRONG><A NAME="item_exp">exp - card expiration</A></STRONG><DD>
64 <DT><STRONG><A NAME="item_amount">amount</A></STRONG><DD>
65 <DT><STRONG><A NAME="item_invnum">invnum - invoice</A></STRONG><DD>
66 <DT><STRONG><A NAME="item_custnum">custnum - customer</A></STRONG><DD>
67 <DT><STRONG><A NAME="item_payname">payname - name on card</A></STRONG><DD>
68 <DT><STRONG><A NAME="item_first">first - name</A></STRONG><DD>
69 <DT><STRONG><A NAME="item_last">last - name</A></STRONG><DD>
70 <DT><STRONG><A NAME="item_address1">address1</A></STRONG><DD>
71 <DT><STRONG><A NAME="item_address2">address2</A></STRONG><DD>
72 <DT><STRONG><A NAME="item_city">city</A></STRONG><DD>
73 <DT><STRONG><A NAME="item_state">state</A></STRONG><DD>
74 <DT><STRONG><A NAME="item_zip">zip</A></STRONG><DD>
75 <DT><STRONG><A NAME="item_country">country</A></STRONG><DD>
76 </DL>
77 <P>
78 <HR>
79 <H1><A NAME="METHODS">METHODS</A></H1>
80 <DL>
81 <DT><STRONG><A NAME="item_new">new HASHREF</A></STRONG><DD>
82 <P>
83 Creates a new record. To add the record to the database, see <A HREF="#insert">insert</A>.
84
85 <P>
86 Note that this stores the hash reference, not a distinct copy of the hash
87 it points to. You can ask the object for a copy with the <EM>hash</EM> method.
88
89 <DT><STRONG><A NAME="item_insert">insert</A></STRONG><DD>
90 <P>
91 Adds this record to the database. If there is an error, returns the error,
92 otherwise returns false.
93
94 <DT><STRONG><A NAME="item_delete">delete</A></STRONG><DD>
95 <P>
96 Delete this record from the database. If there is an error, returns the
97 error, otherwise returns false.
98
99 <DT><STRONG><A NAME="item_replace">replace OLD_RECORD</A></STRONG><DD>
100 <P>
101 #inactive # #Replaces the OLD_RECORD with this one in the database. If
102 there is an error, #returns the error, otherwise returns false.
103
104 <DT><STRONG><A NAME="item_check">check</A></STRONG><DD>
105 <P>
106 Checks all fields to make sure this is a valid transaction. If there is an
107 error, returns the error, otherwise returns false. Called by the insert and
108 repalce methods.
109
110 </DL>
111 <P>
112 <HR>
113 <H1><A NAME="VERSION">VERSION</A></H1>
114 <P>
115 $Id: cust_pay_batch.html,v 1.2 2000-03-03 18:22:43 ivan Exp $
116
117 <P>
118 <HR>
119 <H1><A NAME="BUGS">BUGS</A></H1>
120 <P>
121 There should probably be a configuration file with a list of allowed credit
122 card types.
123
124 <P>
125 <HR>
126 <H1><A NAME="SEE_ALSO">SEE ALSO</A></H1>
127 <P>
128 <A HREF="../FS/cust_main.html">FS::cust_main</A>, <A HREF="../FS/Record.html">FS::Record</A>
129
130
131
132 </BODY>
133
134 </HTML>