exact4r 0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,280 @@
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::Response</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::Response</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../../files/lib/ews/transaction/response_rb.html">
59
+ lib/ews/transaction/response.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
+ <a href="Request.html">
69
+ EWS::Transaction::Request
70
+ </a>
71
+ </td>
72
+ </tr>
73
+ </table>
74
+ </div>
75
+ <!-- banner header -->
76
+
77
+ <div id="bodyContent">
78
+
79
+
80
+
81
+ <div id="contextContent">
82
+
83
+ <div id="description">
84
+ <p>
85
+ This class encapsulates all the data returned from the E-xact Web Service.
86
+ </p>
87
+
88
+ </div>
89
+
90
+
91
+ </div>
92
+
93
+ <div id="method-list">
94
+ <h3 class="section-bar">Methods</h3>
95
+
96
+ <div class="name-list">
97
+ <a href="#M000003">approved?</a>&nbsp;&nbsp;
98
+ </div>
99
+ </div>
100
+
101
+ </div>
102
+
103
+
104
+ <!-- if includes -->
105
+
106
+ <div id="section">
107
+
108
+
109
+
110
+
111
+
112
+ <div id="attribute-list">
113
+ <h3 class="section-bar">Attributes</h3>
114
+
115
+ <div class="name-list">
116
+ <table>
117
+ <tr class="top-aligned-row context-row">
118
+ <td class="context-item-name">CTR</td>
119
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
120
+ <td class="context-item-desc"></td>
121
+ </tr>
122
+ <tr class="top-aligned-row context-row">
123
+ <td class="context-item-name">avs</td>
124
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
125
+ <td class="context-item-desc"></td>
126
+ </tr>
127
+ <tr class="top-aligned-row context-row">
128
+ <td class="context-item-name">bank_message</td>
129
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
130
+ <td class="context-item-desc"></td>
131
+ </tr>
132
+ <tr class="top-aligned-row context-row">
133
+ <td class="context-item-name">bank_resp_code</td>
134
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
135
+ <td class="context-item-desc"></td>
136
+ </tr>
137
+ <tr class="top-aligned-row context-row">
138
+ <td class="context-item-name">bank_resp_code_2</td>
139
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
140
+ <td class="context-item-desc"></td>
141
+ </tr>
142
+ <tr class="top-aligned-row context-row">
143
+ <td class="context-item-name">cavv_response</td>
144
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
145
+ <td class="context-item-desc"></td>
146
+ </tr>
147
+ <tr class="top-aligned-row context-row">
148
+ <td class="context-item-name">cvv2</td>
149
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
150
+ <td class="context-item-desc"></td>
151
+ </tr>
152
+ <tr class="top-aligned-row context-row">
153
+ <td class="context-item-name">error_description</td>
154
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
155
+ <td class="context-item-desc"></td>
156
+ </tr>
157
+ <tr class="top-aligned-row context-row">
158
+ <td class="context-item-name">error_number</td>
159
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
160
+ <td class="context-item-desc"></td>
161
+ </tr>
162
+ <tr class="top-aligned-row context-row">
163
+ <td class="context-item-name">exact_message</td>
164
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
165
+ <td class="context-item-desc"></td>
166
+ </tr>
167
+ <tr class="top-aligned-row context-row">
168
+ <td class="context-item-name">exact_resp_code</td>
169
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
170
+ <td class="context-item-desc"></td>
171
+ </tr>
172
+ <tr class="top-aligned-row context-row">
173
+ <td class="context-item-name">logon_message</td>
174
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
175
+ <td class="context-item-desc"></td>
176
+ </tr>
177
+ <tr class="top-aligned-row context-row">
178
+ <td class="context-item-name">merchant_address</td>
179
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
180
+ <td class="context-item-desc"></td>
181
+ </tr>
182
+ <tr class="top-aligned-row context-row">
183
+ <td class="context-item-name">merchant_city</td>
184
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
185
+ <td class="context-item-desc"></td>
186
+ </tr>
187
+ <tr class="top-aligned-row context-row">
188
+ <td class="context-item-name">merchant_country</td>
189
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
190
+ <td class="context-item-desc"></td>
191
+ </tr>
192
+ <tr class="top-aligned-row context-row">
193
+ <td class="context-item-name">merchant_name</td>
194
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
195
+ <td class="context-item-desc"></td>
196
+ </tr>
197
+ <tr class="top-aligned-row context-row">
198
+ <td class="context-item-name">merchant_postal</td>
199
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
200
+ <td class="context-item-desc"></td>
201
+ </tr>
202
+ <tr class="top-aligned-row context-row">
203
+ <td class="context-item-name">merchant_province</td>
204
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
205
+ <td class="context-item-desc"></td>
206
+ </tr>
207
+ <tr class="top-aligned-row context-row">
208
+ <td class="context-item-name">merchant_url</td>
209
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
210
+ <td class="context-item-desc"></td>
211
+ </tr>
212
+ <tr class="top-aligned-row context-row">
213
+ <td class="context-item-name">retrieval_ref_no</td>
214
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
215
+ <td class="context-item-desc"></td>
216
+ </tr>
217
+ <tr class="top-aligned-row context-row">
218
+ <td class="context-item-name">sequence_no</td>
219
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
220
+ <td class="context-item-desc"></td>
221
+ </tr>
222
+ <tr class="top-aligned-row context-row">
223
+ <td class="context-item-name">transaction_approved</td>
224
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
225
+ <td class="context-item-desc"></td>
226
+ </tr>
227
+ <tr class="top-aligned-row context-row">
228
+ <td class="context-item-name">transaction_error</td>
229
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
230
+ <td class="context-item-desc"></td>
231
+ </tr>
232
+ </table>
233
+ </div>
234
+ </div>
235
+
236
+
237
+
238
+ <!-- if method_list -->
239
+ <div id="methods">
240
+ <h3 class="section-bar">Public Instance methods</h3>
241
+
242
+ <div id="method-M000003" class="method-detail">
243
+ <a name="M000003"></a>
244
+
245
+ <div class="method-heading">
246
+ <a href="#M000003" class="method-signature">
247
+ <span class="method-name">approved?</span><span class="method-args">()</span>
248
+ </a>
249
+ </div>
250
+
251
+ <div class="method-description">
252
+ <p>
253
+ Indicates whether or not the transaction was approved
254
+ </p>
255
+ <p><a class="source-toggle" href="#"
256
+ onclick="toggleCode('M000003-source');return false;">[Source]</a></p>
257
+ <div class="method-source-code" id="M000003-source">
258
+ <pre>
259
+ <span class="ruby-comment cmt"># File lib/ews/transaction/response.rb, line 13</span>
260
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">approved?</span>
261
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">transaction_approved</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span>
262
+ <span class="ruby-keyword kw">end</span>
263
+ </pre>
264
+ </div>
265
+ </div>
266
+ </div>
267
+
268
+
269
+ </div>
270
+
271
+
272
+ </div>
273
+
274
+
275
+ <div id="validator-badges">
276
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
277
+ </div>
278
+
279
+ </body>
280
+ </html>
@@ -0,0 +1,251 @@
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::Transporter</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::Transporter</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../../files/lib/ews/transaction/transporter_rb.html">
59
+ lib/ews/transaction/transporter.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
+ A <a href="Transporter.html">Transporter</a> is responsible for
84
+ communicating with the E-xact Web Service in whichever dialect is chosen by
85
+ the user. The available options are:
86
+ </p>
87
+ <pre>
88
+ :json REST with JSON payload
89
+ :rest REST with XML payload
90
+ :soap SOAP
91
+ </pre>
92
+ <p>
93
+ The <a href="Transporter.html">Transporter</a> will connect to the service,
94
+ using SSL if required, and will encode Reqests to <a
95
+ href="Transporter.html#M000002">send</a> to the service, and decode
96
+ Responses received from the service.
97
+ </p>
98
+ <p>
99
+ Once configured to connect to a particular service, it can be used
100
+ repeatedly to <a href="Transporter.html#M000002">send</a> as many
101
+ transactions as required.
102
+ </p>
103
+
104
+ </div>
105
+
106
+
107
+ </div>
108
+
109
+ <div id="method-list">
110
+ <h3 class="section-bar">Methods</h3>
111
+
112
+ <div class="name-list">
113
+ <a href="#M000001">new</a>&nbsp;&nbsp;
114
+ <a href="#M000002">send</a>&nbsp;&nbsp;
115
+ </div>
116
+ </div>
117
+
118
+ </div>
119
+
120
+
121
+ <!-- if includes -->
122
+
123
+ <div id="section">
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+ <!-- if method_list -->
133
+ <div id="methods">
134
+ <h3 class="section-bar">Public Class methods</h3>
135
+
136
+ <div id="method-M000001" class="method-detail">
137
+ <a name="M000001"></a>
138
+
139
+ <div class="method-heading">
140
+ <a href="#M000001" class="method-signature">
141
+ <span class="method-name">new</span><span class="method-args">(url = &quot;https://api.e-xact.com/&quot;, options = {})</span>
142
+ </a>
143
+ </div>
144
+
145
+ <div class="method-description">
146
+ <p>
147
+ Initialize a <a href="Transporter.html">Transporter</a>.
148
+ </p>
149
+ <p>
150
+ You can specify the URL you would like the <a
151
+ href="Transporter.html">Transporter</a> to connect to, although it defaults
152
+ to <a href="https://api.e-xact.com">api.e-xact.com</a>, the location of our
153
+ web service.
154
+ </p>
155
+ <p>
156
+ You can also specify a hash of options as follows:
157
+ </p>
158
+ <pre>
159
+ :server_cert the path to the server's certificate
160
+ :issuer_cert the path to the certificate of the issuer of the server certificate
161
+ :transport_type the default transport_type for this transporter
162
+ </pre>
163
+ <p>
164
+ The default certificates are those required to connect to <a
165
+ href="https://api.e-xact.com">api.e-xact.com</a> and the default
166
+ <tt>transport_type</tt> is <tt>:rest</tt>. The default
167
+ <tt>transport_type</tt> can be overridden on a per-transaction basis, if
168
+ you choose to do so, by specifying it as a parameter to the <tt><a
169
+ href="Transporter.html#M000002">send</a></tt> method.
170
+ </p>
171
+ <p><a class="source-toggle" href="#"
172
+ onclick="toggleCode('M000001-source');return false;">[Source]</a></p>
173
+ <div class="method-source-code" id="M000001-source">
174
+ <pre>
175
+ <span class="ruby-comment cmt"># File lib/ews/transaction/transporter.rb, line 34</span>
176
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">url</span> = <span class="ruby-value str">&quot;https://api.e-xact.com/&quot;</span>, <span class="ruby-identifier">options</span> = {})
177
+ <span class="ruby-ivar">@url</span> = <span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">url</span>)
178
+ <span class="ruby-ivar">@server_cert</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:server_cert</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">&quot;certs/exact.cer&quot;</span>
179
+ <span class="ruby-ivar">@issuer_cert</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:issuer_cert</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">&quot;certs/equifax_ca.cer&quot;</span>
180
+ <span class="ruby-ivar">@transport_type</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:issuer_cert</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">:rest</span>
181
+ <span class="ruby-keyword kw">end</span>
182
+ </pre>
183
+ </div>
184
+ </div>
185
+ </div>
186
+
187
+ <h3 class="section-bar">Public Instance methods</h3>
188
+
189
+ <div id="method-M000002" class="method-detail">
190
+ <a name="M000002"></a>
191
+
192
+ <div class="method-heading">
193
+ <a href="#M000002" class="method-signature">
194
+ <span class="method-name">send</span><span class="method-args">(request, transport_type = nil)</span>
195
+ </a>
196
+ </div>
197
+
198
+ <div class="method-description">
199
+ <p>
200
+ Send a transaction request to the server
201
+ </p>
202
+ <table>
203
+ <tr><td valign="top"><tt>request</tt>:</td><td>the <a href="Request.html">Request</a> object to encode for transmission to
204
+ the server
205
+
206
+ </td></tr>
207
+ <tr><td valign="top"><tt>transport_type</tt>:</td><td>(optional) the transport type to use for this transaction only. If it not
208
+ specified, the default transport type for this <a
209
+ href="Transporter.html">Transporter</a> will be used
210
+
211
+ </td></tr>
212
+ </table>
213
+ <p><a class="source-toggle" href="#"
214
+ onclick="toggleCode('M000002-source');return false;">[Source]</a></p>
215
+ <div class="method-source-code" id="M000002-source">
216
+ <pre>
217
+ <span class="ruby-comment cmt"># File lib/ews/transaction/transporter.rb, line 45</span>
218
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">send</span>(<span class="ruby-identifier">request</span>, <span class="ruby-identifier">transport_type</span> = <span class="ruby-keyword kw">nil</span>)
219
+ <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;Request not supplied&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">request</span>.<span class="ruby-identifier">nil?</span>
220
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">request</span>.<span class="ruby-identifier">valid?</span>
221
+
222
+ <span class="ruby-identifier">transport_type</span> <span class="ruby-operator">||=</span> <span class="ruby-ivar">@transport_type</span>
223
+
224
+ <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;Transport type #{transport_type} is not supported&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@@transport_types</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">transport_type</span>
225
+
226
+ <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">request</span>.<span class="ruby-identifier">is_find_transaction?</span> <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">transport_type</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:soap</span>
227
+ <span class="ruby-identifier">content</span> = <span class="ruby-identifier">post</span>(<span class="ruby-identifier">request</span>, <span class="ruby-identifier">transport_type</span>)
228
+ <span class="ruby-keyword kw">else</span>
229
+ <span class="ruby-identifier">content</span> = <span class="ruby-identifier">get</span>(<span class="ruby-identifier">request</span>, <span class="ruby-identifier">transport_type</span>)
230
+ <span class="ruby-keyword kw">end</span>
231
+
232
+ <span class="ruby-constant">EWS</span><span class="ruby-operator">::</span><span class="ruby-constant">Transaction</span><span class="ruby-operator">::</span><span class="ruby-constant">Mapping</span>.<span class="ruby-identifier">send</span> <span class="ruby-node">&quot;#{transport_type}_to_response&quot;</span>, <span class="ruby-identifier">content</span>
233
+ <span class="ruby-keyword kw">end</span>
234
+ </pre>
235
+ </div>
236
+ </div>
237
+ </div>
238
+
239
+
240
+ </div>
241
+
242
+
243
+ </div>
244
+
245
+
246
+ <div id="validator-badges">
247
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
248
+ </div>
249
+
250
+ </body>
251
+ </html>