exact4r 0.7 → 0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,461 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Class: EWS::Transaction::Request</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Class</strong></td>
53
+ <td class="class-name-in-header">EWS::Transaction::Request</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../../files/lib/ews/transaction/request_rb.html">
59
+ lib/ews/transaction/request.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ Object
69
+ </td>
70
+ </tr>
71
+ </table>
72
+ </div>
73
+ <!-- banner header -->
74
+
75
+ <div id="bodyContent">
76
+
77
+
78
+
79
+ <div id="contextContent">
80
+
81
+ <div id="description">
82
+ <p>
83
+ The <a href="Request.html">Request</a> class allows you to build
84
+ transaction requests for submission to the E-xact Web Service.
85
+ </p>
86
+ <p>
87
+ All requests will result in a financial transaction occurring, with the
88
+ exception of the <tt>:transaction_details</tt> request, which looks up the
89
+ details of a pre-existing transaction.
90
+ </p>
91
+ <p>
92
+ The following fields are <b>mandatory</b> on all requests:
93
+ </p>
94
+ <pre>
95
+ :gateway_id the gateway to which this request should be sent
96
+ :password your password for that gateway
97
+ :transaction_type the type of transaction you want to perform
98
+ </pre>
99
+ <p>
100
+ Different transaction types will have their own additional requirements
101
+ when it comes to mandatory and optional fields, and it is recommended that
102
+ the E-xact Web Service Programming Reference Guide, v8.5 be consulted. This
103
+ document is contained in the Webservice Plugin ZIP file: <a
104
+ href="http://www.e-xact.com/wp-content/uploads/2007/06/E-xact_Payment_Webservice_Plug-In.zip">www.e-xact.com/wp-content/uploads/2007/06/E-xact_Payment_Webservice_Plug-In.zip</a>
105
+ </p>
106
+ <p>
107
+ Please note that, if your chosen transaction requires it, credit card
108
+ expiry dates <b>must</b> be entered in MMYY format.
109
+ </p>
110
+ <h1>Allowable transaction types</h1>
111
+ <pre>
112
+ :purchase
113
+ :pre_auth
114
+ :pre_auth_completion
115
+ :forced_post
116
+ :refund
117
+ :pre_auth_only
118
+ :purchase_correction
119
+ :refund_correction
120
+ :void
121
+ :tagged_purchase
122
+ :tagged_pre_auth
123
+ :tagged_pre_auth_completion
124
+ :tagged_void
125
+ :tagged_refund
126
+ :tagged_online_debit_refund
127
+ :recurring_seed_pre_auth
128
+ :recurring_seed_purchase
129
+ :idebit_purchase
130
+ :idebit_refund
131
+ :secure_storage
132
+ :secure_storage_eft
133
+ :transaction_details
134
+ </pre>
135
+
136
+ </div>
137
+
138
+
139
+ </div>
140
+
141
+ <div id="method-list">
142
+ <h3 class="section-bar">Methods</h3>
143
+
144
+ <div class="name-list">
145
+ <a href="#M000016">is_find_transaction?</a>&nbsp;&nbsp;
146
+ <a href="#M000014">new</a>&nbsp;&nbsp;
147
+ <a href="#M000015">transaction_type=</a>&nbsp;&nbsp;
148
+ </div>
149
+ </div>
150
+
151
+ </div>
152
+
153
+
154
+ <!-- if includes -->
155
+ <div id="includes">
156
+ <h3 class="section-bar">Included Modules</h3>
157
+
158
+ <div id="includes-list">
159
+ <span class="include-name"><a href="Validator.html">Validator</a></span>
160
+ </div>
161
+ </div>
162
+
163
+ <div id="section">
164
+
165
+
166
+
167
+
168
+
169
+ <div id="attribute-list">
170
+ <h3 class="section-bar">Attributes</h3>
171
+
172
+ <div class="name-list">
173
+ <table>
174
+ <tr class="top-aligned-row context-row">
175
+ <td class="context-item-name">amount</td>
176
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
177
+ <td class="context-item-desc"></td>
178
+ </tr>
179
+ <tr class="top-aligned-row context-row">
180
+ <td class="context-item-name">authorization_num</td>
181
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
182
+ <td class="context-item-desc"></td>
183
+ </tr>
184
+ <tr class="top-aligned-row context-row">
185
+ <td class="context-item-name">cardholder_name</td>
186
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
187
+ <td class="context-item-desc"></td>
188
+ </tr>
189
+ <tr class="top-aligned-row context-row">
190
+ <td class="context-item-name">cavv</td>
191
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
192
+ <td class="context-item-desc"></td>
193
+ </tr>
194
+ <tr class="top-aligned-row context-row">
195
+ <td class="context-item-name">cavv_algorithm</td>
196
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
197
+ <td class="context-item-desc"></td>
198
+ </tr>
199
+ <tr class="top-aligned-row context-row">
200
+ <td class="context-item-name">cc_expiry</td>
201
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
202
+ <td class="context-item-desc"></td>
203
+ </tr>
204
+ <tr class="top-aligned-row context-row">
205
+ <td class="context-item-name">cc_number</td>
206
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
207
+ <td class="context-item-desc"></td>
208
+ </tr>
209
+ <tr class="top-aligned-row context-row">
210
+ <td class="context-item-name">cc_verification_str1</td>
211
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
212
+ <td class="context-item-desc"></td>
213
+ </tr>
214
+ <tr class="top-aligned-row context-row">
215
+ <td class="context-item-name">cc_verification_str2</td>
216
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
217
+ <td class="context-item-desc"></td>
218
+ </tr>
219
+ <tr class="top-aligned-row context-row">
220
+ <td class="context-item-name">client_email</td>
221
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
222
+ <td class="context-item-desc"></td>
223
+ </tr>
224
+ <tr class="top-aligned-row context-row">
225
+ <td class="context-item-name">client_ip</td>
226
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
227
+ <td class="context-item-desc"></td>
228
+ </tr>
229
+ <tr class="top-aligned-row context-row">
230
+ <td class="context-item-name">customer_ref</td>
231
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
232
+ <td class="context-item-desc"></td>
233
+ </tr>
234
+ <tr class="top-aligned-row context-row">
235
+ <td class="context-item-name">cvd_presence_ind</td>
236
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
237
+ <td class="context-item-desc"></td>
238
+ </tr>
239
+ <tr class="top-aligned-row context-row">
240
+ <td class="context-item-name">ecommerce_flag</td>
241
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
242
+ <td class="context-item-desc"></td>
243
+ </tr>
244
+ <tr class="top-aligned-row context-row">
245
+ <td class="context-item-name">errors</td>
246
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
247
+ <td class="context-item-desc">
248
+ yeah, it&#8216;s ugly, but otherwise RDoc won&#8216;t pick them up
249
+
250
+ </td>
251
+ </tr>
252
+ <tr class="top-aligned-row context-row">
253
+ <td class="context-item-name">gateway_id</td>
254
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
255
+ <td class="context-item-desc"></td>
256
+ </tr>
257
+ <tr class="top-aligned-row context-row">
258
+ <td class="context-item-name">language</td>
259
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
260
+ <td class="context-item-desc"></td>
261
+ </tr>
262
+ <tr class="top-aligned-row context-row">
263
+ <td class="context-item-name">pan</td>
264
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
265
+ <td class="context-item-desc"></td>
266
+ </tr>
267
+ <tr class="top-aligned-row context-row">
268
+ <td class="context-item-name">password</td>
269
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
270
+ <td class="context-item-desc"></td>
271
+ </tr>
272
+ <tr class="top-aligned-row context-row">
273
+ <td class="context-item-name">reference_3</td>
274
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
275
+ <td class="context-item-desc"></td>
276
+ </tr>
277
+ <tr class="top-aligned-row context-row">
278
+ <td class="context-item-name">reference_no</td>
279
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
280
+ <td class="context-item-desc"></td>
281
+ </tr>
282
+ <tr class="top-aligned-row context-row">
283
+ <td class="context-item-name">secure_auth_required</td>
284
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
285
+ <td class="context-item-desc"></td>
286
+ </tr>
287
+ <tr class="top-aligned-row context-row">
288
+ <td class="context-item-name">secure_auth_result</td>
289
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
290
+ <td class="context-item-desc"></td>
291
+ </tr>
292
+ <tr class="top-aligned-row context-row">
293
+ <td class="context-item-name">surcharge_amount</td>
294
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
295
+ <td class="context-item-desc"></td>
296
+ </tr>
297
+ <tr class="top-aligned-row context-row">
298
+ <td class="context-item-name">tax1_amount</td>
299
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
300
+ <td class="context-item-desc"></td>
301
+ </tr>
302
+ <tr class="top-aligned-row context-row">
303
+ <td class="context-item-name">tax1_number</td>
304
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
305
+ <td class="context-item-desc"></td>
306
+ </tr>
307
+ <tr class="top-aligned-row context-row">
308
+ <td class="context-item-name">tax2_amount</td>
309
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
310
+ <td class="context-item-desc"></td>
311
+ </tr>
312
+ <tr class="top-aligned-row context-row">
313
+ <td class="context-item-name">tax2_number</td>
314
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
315
+ <td class="context-item-desc"></td>
316
+ </tr>
317
+ <tr class="top-aligned-row context-row">
318
+ <td class="context-item-name">track1</td>
319
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
320
+ <td class="context-item-desc"></td>
321
+ </tr>
322
+ <tr class="top-aligned-row context-row">
323
+ <td class="context-item-name">track2</td>
324
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
325
+ <td class="context-item-desc"></td>
326
+ </tr>
327
+ <tr class="top-aligned-row context-row">
328
+ <td class="context-item-name">transaction_tag</td>
329
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
330
+ <td class="context-item-desc"></td>
331
+ </tr>
332
+ <tr class="top-aligned-row context-row">
333
+ <td class="context-item-name">transaction_type</td>
334
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
335
+ <td class="context-item-desc"></td>
336
+ </tr>
337
+ <tr class="top-aligned-row context-row">
338
+ <td class="context-item-name">xid</td>
339
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
340
+ <td class="context-item-desc"></td>
341
+ </tr>
342
+ <tr class="top-aligned-row context-row">
343
+ <td class="context-item-name">zip_code</td>
344
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
345
+ <td class="context-item-desc"></td>
346
+ </tr>
347
+ </table>
348
+ </div>
349
+ </div>
350
+
351
+
352
+
353
+ <!-- if method_list -->
354
+ <div id="methods">
355
+ <h3 class="section-bar">Public Class methods</h3>
356
+
357
+ <div id="method-M000014" class="method-detail">
358
+ <a name="M000014"></a>
359
+
360
+ <div class="method-heading">
361
+ <a href="#M000014" class="method-signature">
362
+ <span class="method-name">new</span><span class="method-args">(hash = {})</span>
363
+ </a>
364
+ </div>
365
+
366
+ <div class="method-description">
367
+ <p>
368
+ Initialize a <a href="Request.html">Request</a> with a hash of values
369
+ </p>
370
+ <p><a class="source-toggle" href="#"
371
+ onclick="toggleCode('M000014-source');return false;">[Source]</a></p>
372
+ <div class="method-source-code" id="M000014-source">
373
+ <pre>
374
+ <span class="ruby-comment cmt"># File lib/ews/transaction/request.rb, line 57</span>
375
+ 57: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">hash</span> = {})
376
+ 58: <span class="ruby-identifier">hash</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">send</span> <span class="ruby-node">&quot;#{k.to_s}=&quot;</span>, <span class="ruby-identifier">v</span>}
377
+ 59: <span class="ruby-ivar">@errors</span> = {}
378
+ 60: <span class="ruby-keyword kw">end</span>
379
+ </pre>
380
+ </div>
381
+ </div>
382
+ </div>
383
+
384
+ <h3 class="section-bar">Public Instance methods</h3>
385
+
386
+ <div id="method-M000016" class="method-detail">
387
+ <a name="M000016"></a>
388
+
389
+ <div class="method-heading">
390
+ <a href="#M000016" class="method-signature">
391
+ <span class="method-name">is_find_transaction?</span><span class="method-args">()</span>
392
+ </a>
393
+ </div>
394
+
395
+ <div class="method-description">
396
+ <p>
397
+ Indicates whether or not this transaction is a
398
+ <tt>:transaction_details</tt> transaction
399
+ </p>
400
+ <p><a class="source-toggle" href="#"
401
+ onclick="toggleCode('M000016-source');return false;">[Source]</a></p>
402
+ <div class="method-source-code" id="M000016-source">
403
+ <pre>
404
+ <span class="ruby-comment cmt"># File lib/ews/transaction/request.rb, line 77</span>
405
+ 77: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">is_find_transaction?</span>
406
+ 78: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">transaction_type</span> <span class="ruby-operator">==</span> <span class="ruby-value str">&quot;CR&quot;</span>
407
+ 79: <span class="ruby-keyword kw">end</span>
408
+ </pre>
409
+ </div>
410
+ </div>
411
+ </div>
412
+
413
+ <div id="method-M000015" class="method-detail">
414
+ <a name="M000015"></a>
415
+
416
+ <div class="method-heading">
417
+ <a href="#M000015" class="method-signature">
418
+ <span class="method-name">transaction_type=</span><span class="method-args">(type_sym)</span>
419
+ </a>
420
+ </div>
421
+
422
+ <div class="method-description">
423
+ <p>
424
+ Set the <tt>transasction_type&lt;tt&gt; using either a symbol or the
425
+ relevant code, e.g: for a purchase you can use either
426
+ &lt;tt&gt;:purchase</tt> or <tt>&#8216;00&#8216;</tt>
427
+ </p>
428
+ <p><a class="source-toggle" href="#"
429
+ onclick="toggleCode('M000015-source');return false;">[Source]</a></p>
430
+ <div class="method-source-code" id="M000015-source">
431
+ <pre>
432
+ <span class="ruby-comment cmt"># File lib/ews/transaction/request.rb, line 64</span>
433
+ 64: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">transaction_type=</span>(<span class="ruby-identifier">type_sym</span>)
434
+ 65: <span class="ruby-comment cmt"># assume we're given a symbol, so look up the code</span>
435
+ 66: <span class="ruby-identifier">value</span> = <span class="ruby-ivar">@@transaction_codes</span>[<span class="ruby-identifier">type_sym</span>]
436
+ 67: <span class="ruby-comment cmt"># if nothing found, then maybe we were given an actual code?</span>
437
+ 68: <span class="ruby-keyword kw">if</span>(<span class="ruby-identifier">value</span>.<span class="ruby-identifier">nil?</span>)
438
+ 69: <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;invalid transaction_type supplied #{type_sym}&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@@transaction_codes</span>.<span class="ruby-identifier">values</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">type_sym</span>)
439
+ 70: <span class="ruby-identifier">value</span> = <span class="ruby-identifier">type_sym</span>
440
+ 71: <span class="ruby-keyword kw">end</span>
441
+ 72:
442
+ 73: <span class="ruby-ivar">@transaction_type</span> = <span class="ruby-identifier">value</span>
443
+ 74: <span class="ruby-keyword kw">end</span>
444
+ </pre>
445
+ </div>
446
+ </div>
447
+ </div>
448
+
449
+
450
+ </div>
451
+
452
+
453
+ </div>
454
+
455
+
456
+ <div id="validator-badges">
457
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
458
+ </div>
459
+
460
+ </body>
461
+ </html>