exact4r 0.6 → 0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,243 +0,0 @@
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>File: README</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="fileHeader">
50
- <h1>README</h1>
51
- <table class="header-table">
52
- <tr class="top-aligned-row">
53
- <td><strong>Path:</strong></td>
54
- <td>README
55
- </td>
56
- </tr>
57
- <tr class="top-aligned-row">
58
- <td><strong>Last Update:</strong></td>
59
- <td>Sun Jul 20 11:24:33 +1000 2008</td>
60
- </tr>
61
- </table>
62
- </div>
63
- <!-- banner header -->
64
-
65
- <div id="bodyContent">
66
-
67
-
68
-
69
- <div id="contextContent">
70
-
71
- <div id="description">
72
- <h1>exact4r</h1>
73
- <p>
74
- A gem which provides access to E-xact&#8216;s Web Services API, allowing
75
- the submission of financial transactions via REST, JSON or SOAP.
76
- </p>
77
- <h2>Getting Started</h2>
78
- <p>
79
- To submit requests to our transaction processing service, you must first
80
- have a Gateway ID, and a password. Test logins are as follows:
81
- </p>
82
- <pre>
83
- Account 1: :gateway_id =&gt; &quot;A00049-01&quot;, :password =&gt; &quot;test1&quot;
84
- Account 2: :gateway_id =&gt; &quot;A00427-01&quot;, :password =&gt; &quot;testus&quot;
85
- </pre>
86
- <h1>1. Submit a transaction</h1>
87
- <pre>
88
- require 'rubygems'
89
- require 'exact4r'
90
-
91
- # build a purchase request
92
- request = EWS::Transaction::Request.new({
93
- :transaction_type =&gt; :purchase,
94
- :amount =&gt; 10.50,
95
- :cardholder_name =&gt; &quot;Simon Brown&quot;,
96
- :cc_number =&gt; &quot;4111111111111111&quot;,
97
- :cc_expiry =&gt; &quot;1012&quot;, # MUST be MMYY format
98
- :gateway_id =&gt; &quot;XXXXXXX&quot;, # which gateway to submit the request to
99
- :password =&gt; &quot;YYYYYY&quot; # your password for that gateway
100
- })
101
-
102
- transporter = EWS::Transporter.new
103
- response = transporter.submit(request) # submits using REST (XML) by default
104
-
105
- # submit using JSON, or
106
- response = transporter.submit(request, :json)
107
-
108
- # submit using SOAP, or
109
- response = transporter.submit(request, :soap)
110
-
111
- # submit explicitly via REST
112
- response = transporter.submit(request, :rest)
113
-
114
- # The response object is independent of type of transport chosen.
115
- # We decode the payload into a regular object
116
- response.transaction_tag # 1234
117
- response.exact_resp_code # &quot;00&quot;
118
- response.exact_message # &quot;Transaction Normal&quot;
119
- response.bank_resp_code # &quot;00&quot;
120
- response.bank_message # &quot;APPROVED&quot;
121
- </pre>
122
- <h1>2. Find information on an existing transaction</h1>
123
- <pre>
124
- require 'rubygems'
125
- require 'exact4r'
126
-
127
- # build a purchase request
128
- request = EWS::Transaction::Request.new({
129
- :transaction_type =&gt; :purchase,
130
- :amount =&gt; 10.50,
131
- :cardholder_name =&gt; &quot;Simon Brown&quot;,
132
- :cc_number =&gt; &quot;4111111111111111&quot;,
133
- :cc_expiry =&gt; &quot;1012&quot;, # MUST be MMYY format
134
- :gateway_id =&gt; &quot;XXXXXXX&quot;, # which gateway to submit the request to
135
- :password =&gt; &quot;YYYYYY&quot; # your password for that gateway
136
- })
137
-
138
- transporter = EWS::Transporter.new
139
- response = transporter.submit(request) # submits using REST (XML) by default
140
-
141
- # you need to know the transaction tag of the transaction you are looking for
142
- find_request = EWS::Transaction::Request.new({
143
- :transaction_type =&gt; :transaction_details,
144
- :transaction_tag =&gt; response.transaction_tag,
145
- :gateway_id =&gt; &quot;XXXXXXX&quot;,
146
- :password =&gt; &quot;YYYYYY&quot;
147
- })
148
-
149
- find_response = transporter.submit(find_request, :json) # again, can choose your transport type as before
150
- find_response.cc_number # 4111111111111111
151
- find_response.amount # 10.50
152
- </pre>
153
- <h1>3. Re-using a Transporter</h1>
154
- <pre>
155
- require 'rubygems'
156
- require 'exact4r'
157
-
158
- # The transporter object can be re-used across multiple transactions, so set it up once
159
- # and forget about it.
160
- # In this example, we will continue to use E-xact's default web-service URL, but we
161
- # will specify a default transport_type of :soap
162
- transporter = EWS::Transporter.new(&quot;https://api.e-xact.com/&quot;, {:transaction_type =&gt; :soap})
163
-
164
- # now let's submit do a recurring seed purchase...
165
- rsp_req = EWS::Transaction::Request.new({
166
- :transaction_type =&gt; :recurring_seed_purchase,
167
- :amount =&gt; 12.00,
168
- :cardholder_name =&gt; &quot;Simon Brown&quot;,
169
- :cc_number =&gt; &quot;4111111111111111&quot;,
170
- :cc_expiry =&gt; &quot;1012&quot;,
171
- :gateway_id =&gt; &quot;XXXXXX&quot;,
172
- :password =&gt; &quot;YYYYYY&quot;
173
- })
174
-
175
- rsp_resp = transporter.submit(rsp_req)
176
- raise &quot;Seed Purchase failed&quot; unless rsp_resp.approved?
177
-
178
- # ...then do multiple refunds against it
179
- 1.upto(10) do
180
- rf_req = EWS::Transaction::Request.new({
181
- :transaction_type =&gt; :tagged_refund,
182
- :transaction_tag =&gt; rsp_resp.transaction_tag, # need to know which transaction we're refunding against...
183
- :authorization_num =&gt; rsp_resp.authorization_num, # and its authorization_num
184
- :amount =&gt; 1.00, # refund a dollar at a time
185
- :gateway_id =&gt; &quot;XXXXXX&quot;,
186
- :password =&gt; &quot;YYYYYY&quot;
187
- })
188
- rf_resp = transporter.submit(rf_req)
189
- raise &quot;Refund failed: #{rf_resp.exact_resp_code}, #{rf_resp.exact_message}&quot; unless rf_resp.approved?
190
- end
191
- </pre>
192
- <h2>Rake tasks</h2>
193
- <p>
194
- spec
195
- </p>
196
- <pre>
197
- Run all test in spec/ folder (default)
198
- </pre>
199
- <p>
200
- rdoc
201
- </p>
202
- <pre>
203
- Generate rdoc html in doc/
204
- </pre>
205
- <p>
206
- gem
207
- </p>
208
- <pre>
209
- Build gem
210
- </pre>
211
-
212
- </div>
213
-
214
-
215
- </div>
216
-
217
-
218
- </div>
219
-
220
-
221
- <!-- if includes -->
222
-
223
- <div id="section">
224
-
225
-
226
-
227
-
228
-
229
-
230
-
231
-
232
- <!-- if method_list -->
233
-
234
-
235
- </div>
236
-
237
-
238
- <div id="validator-badges">
239
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
240
- </div>
241
-
242
- </body>
243
- </html>
@@ -1,107 +0,0 @@
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>File: VERSION</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="fileHeader">
50
- <h1>VERSION</h1>
51
- <table class="header-table">
52
- <tr class="top-aligned-row">
53
- <td><strong>Path:</strong></td>
54
- <td>VERSION
55
- </td>
56
- </tr>
57
- <tr class="top-aligned-row">
58
- <td><strong>Last Update:</strong></td>
59
- <td>Thu Jul 31 17:15:57 +1000 2008</td>
60
- </tr>
61
- </table>
62
- </div>
63
- <!-- banner header -->
64
-
65
- <div id="bodyContent">
66
-
67
-
68
-
69
- <div id="contextContent">
70
-
71
- <div id="description">
72
- <p>
73
- 0.6
74
- </p>
75
-
76
- </div>
77
-
78
-
79
- </div>
80
-
81
-
82
- </div>
83
-
84
-
85
- <!-- if includes -->
86
-
87
- <div id="section">
88
-
89
-
90
-
91
-
92
-
93
-
94
-
95
-
96
- <!-- if method_list -->
97
-
98
-
99
- </div>
100
-
101
-
102
- <div id="validator-badges">
103
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
104
- </div>
105
-
106
- </body>
107
- </html>
@@ -1,101 +0,0 @@
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>File: fake_response.rb</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="fileHeader">
50
- <h1>fake_response.rb</h1>
51
- <table class="header-table">
52
- <tr class="top-aligned-row">
53
- <td><strong>Path:</strong></td>
54
- <td>lib/ews/transaction/fake_response.rb
55
- </td>
56
- </tr>
57
- <tr class="top-aligned-row">
58
- <td><strong>Last Update:</strong></td>
59
- <td>Fri Jun 27 10:54:58 +1000 2008</td>
60
- </tr>
61
- </table>
62
- </div>
63
- <!-- banner header -->
64
-
65
- <div id="bodyContent">
66
-
67
-
68
-
69
- <div id="contextContent">
70
-
71
-
72
-
73
- </div>
74
-
75
-
76
- </div>
77
-
78
-
79
- <!-- if includes -->
80
-
81
- <div id="section">
82
-
83
-
84
-
85
-
86
-
87
-
88
-
89
-
90
- <!-- if method_list -->
91
-
92
-
93
- </div>
94
-
95
-
96
- <div id="validator-badges">
97
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
98
- </div>
99
-
100
- </body>
101
- </html>
@@ -1,109 +0,0 @@
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>File: mapping.rb</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="fileHeader">
50
- <h1>mapping.rb</h1>
51
- <table class="header-table">
52
- <tr class="top-aligned-row">
53
- <td><strong>Path:</strong></td>
54
- <td>lib/ews/transaction/mapping.rb
55
- </td>
56
- </tr>
57
- <tr class="top-aligned-row">
58
- <td><strong>Last Update:</strong></td>
59
- <td>Thu Jul 31 16:18:36 +1000 2008</td>
60
- </tr>
61
- </table>
62
- </div>
63
- <!-- banner header -->
64
-
65
- <div id="bodyContent">
66
-
67
-
68
-
69
- <div id="contextContent">
70
-
71
-
72
- <div id="requires-list">
73
- <h3 class="section-bar">Required files</h3>
74
-
75
- <div class="name-list">
76
- builder&nbsp;&nbsp;
77
- activesupport&nbsp;&nbsp;
78
- </div>
79
- </div>
80
-
81
- </div>
82
-
83
-
84
- </div>
85
-
86
-
87
- <!-- if includes -->
88
-
89
- <div id="section">
90
-
91
-
92
-
93
-
94
-
95
-
96
-
97
-
98
- <!-- if method_list -->
99
-
100
-
101
- </div>
102
-
103
-
104
- <div id="validator-badges">
105
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
106
- </div>
107
-
108
- </body>
109
- </html>
@@ -1,108 +0,0 @@
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>File: request.rb</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="fileHeader">
50
- <h1>request.rb</h1>
51
- <table class="header-table">
52
- <tr class="top-aligned-row">
53
- <td><strong>Path:</strong></td>
54
- <td>lib/ews/transaction/request.rb
55
- </td>
56
- </tr>
57
- <tr class="top-aligned-row">
58
- <td><strong>Last Update:</strong></td>
59
- <td>Thu Jul 31 16:52:55 +1000 2008</td>
60
- </tr>
61
- </table>
62
- </div>
63
- <!-- banner header -->
64
-
65
- <div id="bodyContent">
66
-
67
-
68
-
69
- <div id="contextContent">
70
-
71
-
72
- <div id="requires-list">
73
- <h3 class="section-bar">Required files</h3>
74
-
75
- <div class="name-list">
76
- ews/transaction/validator&nbsp;&nbsp;
77
- </div>
78
- </div>
79
-
80
- </div>
81
-
82
-
83
- </div>
84
-
85
-
86
- <!-- if includes -->
87
-
88
- <div id="section">
89
-
90
-
91
-
92
-
93
-
94
-
95
-
96
-
97
- <!-- if method_list -->
98
-
99
-
100
- </div>
101
-
102
-
103
- <div id="validator-badges">
104
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
105
- </div>
106
-
107
- </body>
108
- </html>