an 0.0.1.rc4 → 0.0.1.rc5
Sign up to get free protection for your applications and to get access to all the features.
- data/an.gemspec +1 -1
- data/lib/an.rb +0 -53
- metadata +7 -7
data/an.gemspec
CHANGED
data/lib/an.rb
CHANGED
@@ -161,57 +161,4 @@ private
|
|
161
161
|
new(URI.parse(url))
|
162
162
|
end
|
163
163
|
end
|
164
|
-
|
165
|
-
end
|
166
|
-
|
167
|
-
__END__
|
168
|
-
|
169
|
-
module AN
|
170
|
-
require_relative "an/client"
|
171
|
-
require_relative "an/model"
|
172
|
-
require_relative "an/aim"
|
173
|
-
require_relative "an/cim"
|
174
|
-
|
175
|
-
class << self
|
176
|
-
attr_accessor :login_id
|
177
|
-
attr_accessor :transaction_key
|
178
|
-
end
|
179
|
-
|
180
|
-
class PaymentResponse
|
181
|
-
RESPONSE_FIELDS = %w[code subcode reason_code reason_text
|
182
|
-
authorization_code avs_response trans_id
|
183
|
-
invoice_number description amount method
|
184
|
-
transaction_type customer_id first_name
|
185
|
-
last_name company address city state zip
|
186
|
-
country phone fax email
|
187
|
-
shipping_first_name shipping_last_name
|
188
|
-
shipping_company shipping_address shipping_city
|
189
|
-
shipping_state shipping_zip shipping_country
|
190
|
-
tax duty freight tax_exempt purchase_order_number
|
191
|
-
md5_hash card_code_response cavv_response
|
192
|
-
account_number card_type split_tender_id
|
193
|
-
requested_amount balance_on_card]
|
194
|
-
|
195
|
-
attr :fields
|
196
|
-
|
197
|
-
def initialize(data, delimiter = ",")
|
198
|
-
@fields = Hash[RESPONSE_FIELDS.zip(data.split(delimiter))]
|
199
|
-
end
|
200
|
-
|
201
|
-
def success?
|
202
|
-
fields["code"] == "1" && fields["reason_code"] == "1"
|
203
|
-
end
|
204
|
-
|
205
|
-
def code
|
206
|
-
fields["code"]
|
207
|
-
end
|
208
|
-
|
209
|
-
def message
|
210
|
-
fields["reason_text"]
|
211
|
-
end
|
212
|
-
|
213
|
-
def trans_id
|
214
|
-
fields["trans_id"]
|
215
|
-
end
|
216
|
-
end
|
217
164
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: an
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.1.
|
4
|
+
version: 0.0.1.rc5
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-02-15 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mote
|
16
|
-
requirement: &
|
16
|
+
requirement: &2151853360 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2151853360
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: xml-simple
|
27
|
-
requirement: &
|
27
|
+
requirement: &2151852820 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *2151852820
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: cutest
|
38
|
-
requirement: &
|
38
|
+
requirement: &2151851920 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *2151851920
|
47
47
|
description: AN is a simplified client for integration with Authorize.NET.
|
48
48
|
email:
|
49
49
|
- me@cyrildavid.com
|