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 ADDED
@@ -0,0 +1 @@
1
+ /pkg/
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- payex (0.0.1)
4
+ payex (0.0.2)
5
5
  nori (~> 1.1)
6
6
  savon (~> 1.1)
7
7
 
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
- response[:order_id]
55
+ error = nil
56
56
  when :initialize
57
- raise PayEx::Error, 'Transaction not completed'
57
+ error = 'Transaction not completed'
58
58
  when :failure
59
- message = response[:error_details][:third_party_error] rescue nil
60
- raise PayEx::Error, message
59
+ begin
60
+ error = response[:error_details][:third_party_error]
61
+ rescue
62
+ error = 'Transaction failed'
63
+ end
61
64
  else
62
- raise PayEx::Error, 'Unexpected transaction status: ' +
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
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |gem|
4
4
  gem.name = 'payex'
5
- gem.version = '0.0.1'
5
+ gem.version = '0.1.0.rc'
6
6
  gem.summary = 'PayEx SOAP API glue'
7
7
  gem.author = 'Daniel Brockman'
8
8
  gem.files = `git ls-files 2>/dev/null`.split($\)
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.1
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-04 00:00:00.000000000 Z
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/Initialize7/initialize_ok.xml
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: '0'
179
+ version: 1.3.1
179
180
  requirements: []
180
181
  rubyforge_project:
181
182
  rubygems_version: 1.8.24