payex 0.0.1 → 0.1.0.rc
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/Gemfile.lock +1 -1
- data/lib/payex.rb +10 -6
- data/payex.gemspec +1 -1
- data/spec/fixtures/{Initialize7 → initialize7}/initialize_ok.xml +0 -0
- metadata +7 -6
data/.gitignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
/pkg/
|
data/Gemfile.lock
CHANGED
data/lib/payex.rb
CHANGED
@@ -52,16 +52,20 @@ def PayEx.complete_transaction! id
|
|
52
52
|
|
53
53
|
case status
|
54
54
|
when :sale, :authorize
|
55
|
-
|
55
|
+
error = nil
|
56
56
|
when :initialize
|
57
|
-
|
57
|
+
error = 'Transaction not completed'
|
58
58
|
when :failure
|
59
|
-
|
60
|
-
|
59
|
+
begin
|
60
|
+
error = response[:error_details][:third_party_error]
|
61
|
+
rescue
|
62
|
+
error = 'Transaction failed'
|
63
|
+
end
|
61
64
|
else
|
62
|
-
|
63
|
-
status.to_s.upcase
|
65
|
+
error = 'Unexpected transaction status: ' + status.to_s.upcase
|
64
66
|
end
|
67
|
+
|
68
|
+
[response[:order_id], error]
|
65
69
|
end
|
66
70
|
|
67
71
|
def PayEx.parse_transaction_status(status)
|
data/payex.gemspec
CHANGED
File without changes
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: payex
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.1.0.rc
|
5
|
+
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Daniel Brockman
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-09-
|
12
|
+
date: 2012-09-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nori
|
@@ -145,6 +145,7 @@ executables: []
|
|
145
145
|
extensions: []
|
146
146
|
extra_rdoc_files: []
|
147
147
|
files:
|
148
|
+
- .gitignore
|
148
149
|
- Gemfile
|
149
150
|
- Gemfile.lock
|
150
151
|
- Guardfile
|
@@ -155,7 +156,7 @@ files:
|
|
155
156
|
- lib/payex/pxorder.rb
|
156
157
|
- payex.gemspec
|
157
158
|
- spec/api_unit_spec.rb
|
158
|
-
- spec/fixtures/
|
159
|
+
- spec/fixtures/initialize7/initialize_ok.xml
|
159
160
|
- spec/integration_spec.rb
|
160
161
|
- spec/spec_helper.rb
|
161
162
|
homepage:
|
@@ -173,9 +174,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
173
174
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
174
175
|
none: false
|
175
176
|
requirements:
|
176
|
-
- - ! '
|
177
|
+
- - ! '>'
|
177
178
|
- !ruby/object:Gem::Version
|
178
|
-
version:
|
179
|
+
version: 1.3.1
|
179
180
|
requirements: []
|
180
181
|
rubyforge_project:
|
181
182
|
rubygems_version: 1.8.24
|