pxpay 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +8 -8
- data/Rakefile +7 -7
- data/VERSION +1 -1
- data/lib/pxpay/base.rb +12 -9
- data/pxpay.gemspec +13 -13
- data/test/{test_pxpay.rb → pxpay_test.rb} +0 -0
- metadata +91 -97
data/Gemfile.lock
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
GEM
|
2
2
|
remote: http://rubygems.org/
|
3
3
|
specs:
|
4
|
-
builder (
|
4
|
+
builder (3.0.0)
|
5
5
|
git (1.2.5)
|
6
|
-
jeweler (1.6.
|
7
|
-
bundler (~> 1.0
|
6
|
+
jeweler (1.6.4)
|
7
|
+
bundler (~> 1.0)
|
8
8
|
git (>= 1.2.5)
|
9
9
|
rake
|
10
|
-
mime-types (1.
|
11
|
-
nokogiri (1.
|
12
|
-
rake (0.
|
13
|
-
rcov (0.9.
|
14
|
-
rest-client (1.6.
|
10
|
+
mime-types (1.17.2)
|
11
|
+
nokogiri (1.5.0)
|
12
|
+
rake (0.9.2.2)
|
13
|
+
rcov (0.9.11)
|
14
|
+
rest-client (1.6.7)
|
15
15
|
mime-types (>= 1.16)
|
16
16
|
shoulda (2.11.3)
|
17
17
|
|
data/Rakefile
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
1
3
|
require 'rubygems'
|
2
4
|
require 'bundler'
|
3
5
|
begin
|
@@ -22,30 +24,28 @@ Jeweler::Tasks.new do |gem|
|
|
22
24
|
gem.add_dependency 'nokogiri'
|
23
25
|
gem.add_dependency 'rest-client'
|
24
26
|
gem.add_dependency 'builder'
|
25
|
-
#
|
26
|
-
# and development dependencies are only needed for development (ie running rake tasks, tests, etc)
|
27
|
-
# gem.add_runtime_dependency 'jabber4r', '> 0.1'
|
28
|
-
# gem.add_development_dependency 'rspec', '> 1.2.3'
|
27
|
+
# dependencies defined in Gemfile
|
29
28
|
end
|
30
29
|
Jeweler::RubygemsDotOrgTasks.new
|
31
30
|
|
32
31
|
require 'rake/testtask'
|
33
32
|
Rake::TestTask.new(:test) do |test|
|
34
33
|
test.libs << 'lib' << 'test'
|
35
|
-
test.pattern = 'test
|
34
|
+
test.pattern = 'test/**/*_test.rb'
|
36
35
|
test.verbose = true
|
37
36
|
end
|
38
37
|
|
39
38
|
require 'rcov/rcovtask'
|
40
39
|
Rcov::RcovTask.new do |test|
|
41
40
|
test.libs << 'test'
|
42
|
-
test.pattern = 'test
|
41
|
+
test.pattern = 'test/**/*_test.rb'
|
43
42
|
test.verbose = true
|
43
|
+
test.rcov_opts << '--exclude "gems/*"'
|
44
44
|
end
|
45
45
|
|
46
46
|
task :default => :test
|
47
47
|
|
48
|
-
require '
|
48
|
+
require 'rdoc/task'
|
49
49
|
Rake::RDocTask.new do |rdoc|
|
50
50
|
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
51
51
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.4
|
data/lib/pxpay/base.rb
CHANGED
@@ -2,17 +2,20 @@ module Pxpay
|
|
2
2
|
# The base Pxpay class, contains the acceptable currency types and the details that are returned from Payment Express
|
3
3
|
class Base
|
4
4
|
@@pxpay_request_url = "https://sec.paymentexpress.com/pxpay/pxaccess.aspx"
|
5
|
-
cattr_accessor :pxpay_user_id, :pxpay_key, :url_success, :url_failure, :pxpay_request_url
|
6
5
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
6
|
+
class << self
|
7
|
+
attr_accessor :pxpay_user_id, :pxpay_key, :url_success, :url_failure, :pxpay_request_url
|
8
|
+
|
9
|
+
# A list of the acceptable payment currencies
|
10
|
+
# See http://www.paymentexpress.com/technical_resources/ecommerce_hosted/pxpay.html#Properties
|
11
|
+
def currency_types
|
12
|
+
%w( CAD CHF EUR FRF GBP HKD JPY NZD SGD USD ZAR AUD WST VUV TOP SBD PNG MYR KWD FJD )
|
13
|
+
end
|
12
14
|
|
13
|
-
|
14
|
-
|
15
|
-
|
15
|
+
# The currently returned details from Payment Express. Access with Pxpay::Base.return_details
|
16
|
+
def return_details
|
17
|
+
[ :dps_billing_id, :txn_data1, :success, :card_number2, :email_address, :card_number, :amount_settlement, :txn_data2, :client_info, :date_expiry, :currency_settlement, :txn_data3, :txn_id, :txn_type, :date_settlement, :auth_code, :dps_txn_ref, :currency_input, :txn_mac, :card_name, :billing_id, :merchant_reference, :response_text, :card_holder_name ]
|
18
|
+
end
|
16
19
|
end
|
17
20
|
end
|
18
21
|
end
|
data/pxpay.gemspec
CHANGED
@@ -4,14 +4,14 @@
|
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
|
-
s.name =
|
8
|
-
s.version = "0.2.
|
7
|
+
s.name = "pxpay"
|
8
|
+
s.version = "0.2.4"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
-
s.authors = [
|
12
|
-
s.date =
|
13
|
-
s.description =
|
14
|
-
s.email =
|
11
|
+
s.authors = ["Bradley Priest"]
|
12
|
+
s.date = "2011-11-08"
|
13
|
+
s.description = "A Ruby wrapper around the DPS-hosted PxPay service"
|
14
|
+
s.email = "bradleypriest@gmail.com"
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"LICENSE.txt",
|
17
17
|
"README.md"
|
@@ -35,14 +35,14 @@ Gem::Specification.new do |s|
|
|
35
35
|
"lib/pxpay/templates/pxpay.rb",
|
36
36
|
"pxpay.gemspec",
|
37
37
|
"test/helper.rb",
|
38
|
-
"test/
|
39
|
-
"test/
|
38
|
+
"test/pxpay_test.rb",
|
39
|
+
"test/response.xml"
|
40
40
|
]
|
41
|
-
s.homepage =
|
42
|
-
s.licenses = [
|
43
|
-
s.require_paths = [
|
44
|
-
s.rubygems_version =
|
45
|
-
s.summary =
|
41
|
+
s.homepage = "http://github.com/bradleypriest/pxpay"
|
42
|
+
s.licenses = ["MIT"]
|
43
|
+
s.require_paths = ["lib"]
|
44
|
+
s.rubygems_version = "1.8.10"
|
45
|
+
s.summary = "Ruby wrapper for the Payment Express' PxPay API"
|
46
46
|
|
47
47
|
if s.respond_to? :specification_version then
|
48
48
|
s.specification_version = 3
|
File without changes
|
metadata
CHANGED
@@ -1,137 +1,134 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: pxpay
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.4
|
4
5
|
prerelease:
|
5
|
-
version: 0.2.3
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- Bradley Priest
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2011-11-08 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
16
15
|
name: shoulda
|
17
|
-
requirement: &
|
16
|
+
requirement: &70169712566860 !ruby/object:Gem::Requirement
|
18
17
|
none: false
|
19
|
-
requirements:
|
20
|
-
- -
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version:
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
23
22
|
type: :development
|
24
23
|
prerelease: false
|
25
|
-
version_requirements: *
|
26
|
-
- !ruby/object:Gem::Dependency
|
24
|
+
version_requirements: *70169712566860
|
25
|
+
- !ruby/object:Gem::Dependency
|
27
26
|
name: bundler
|
28
|
-
requirement: &
|
27
|
+
requirement: &70169712582340 !ruby/object:Gem::Requirement
|
29
28
|
none: false
|
30
|
-
requirements:
|
29
|
+
requirements:
|
31
30
|
- - ~>
|
32
|
-
- !ruby/object:Gem::Version
|
31
|
+
- !ruby/object:Gem::Version
|
33
32
|
version: 1.0.0
|
34
33
|
type: :development
|
35
34
|
prerelease: false
|
36
|
-
version_requirements: *
|
37
|
-
- !ruby/object:Gem::Dependency
|
35
|
+
version_requirements: *70169712582340
|
36
|
+
- !ruby/object:Gem::Dependency
|
38
37
|
name: jeweler
|
39
|
-
requirement: &
|
38
|
+
requirement: &70169712581440 !ruby/object:Gem::Requirement
|
40
39
|
none: false
|
41
|
-
requirements:
|
40
|
+
requirements:
|
42
41
|
- - ~>
|
43
|
-
- !ruby/object:Gem::Version
|
44
|
-
version:
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '1.6'
|
45
44
|
type: :development
|
46
45
|
prerelease: false
|
47
|
-
version_requirements: *
|
48
|
-
- !ruby/object:Gem::Dependency
|
46
|
+
version_requirements: *70169712581440
|
47
|
+
- !ruby/object:Gem::Dependency
|
49
48
|
name: rcov
|
50
|
-
requirement: &
|
49
|
+
requirement: &70169712580740 !ruby/object:Gem::Requirement
|
51
50
|
none: false
|
52
|
-
requirements:
|
53
|
-
- -
|
54
|
-
- !ruby/object:Gem::Version
|
55
|
-
version:
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
56
55
|
type: :development
|
57
56
|
prerelease: false
|
58
|
-
version_requirements: *
|
59
|
-
- !ruby/object:Gem::Dependency
|
57
|
+
version_requirements: *70169712580740
|
58
|
+
- !ruby/object:Gem::Dependency
|
60
59
|
name: builder
|
61
|
-
requirement: &
|
60
|
+
requirement: &70169712579840 !ruby/object:Gem::Requirement
|
62
61
|
none: false
|
63
|
-
requirements:
|
64
|
-
- -
|
65
|
-
- !ruby/object:Gem::Version
|
66
|
-
version:
|
62
|
+
requirements:
|
63
|
+
- - ! '>='
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: '0'
|
67
66
|
type: :development
|
68
67
|
prerelease: false
|
69
|
-
version_requirements: *
|
70
|
-
- !ruby/object:Gem::Dependency
|
68
|
+
version_requirements: *70169712579840
|
69
|
+
- !ruby/object:Gem::Dependency
|
71
70
|
name: nokogiri
|
72
|
-
requirement: &
|
71
|
+
requirement: &70169712578400 !ruby/object:Gem::Requirement
|
73
72
|
none: false
|
74
|
-
requirements:
|
75
|
-
- -
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
version:
|
73
|
+
requirements:
|
74
|
+
- - ! '>='
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
78
77
|
type: :development
|
79
78
|
prerelease: false
|
80
|
-
version_requirements: *
|
81
|
-
- !ruby/object:Gem::Dependency
|
79
|
+
version_requirements: *70169712578400
|
80
|
+
- !ruby/object:Gem::Dependency
|
82
81
|
name: rest-client
|
83
|
-
requirement: &
|
82
|
+
requirement: &70169712575240 !ruby/object:Gem::Requirement
|
84
83
|
none: false
|
85
|
-
requirements:
|
86
|
-
- -
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
version:
|
84
|
+
requirements:
|
85
|
+
- - ! '>='
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: '0'
|
89
88
|
type: :development
|
90
89
|
prerelease: false
|
91
|
-
version_requirements: *
|
92
|
-
- !ruby/object:Gem::Dependency
|
90
|
+
version_requirements: *70169712575240
|
91
|
+
- !ruby/object:Gem::Dependency
|
93
92
|
name: nokogiri
|
94
|
-
requirement: &
|
93
|
+
requirement: &70169712589760 !ruby/object:Gem::Requirement
|
95
94
|
none: false
|
96
|
-
requirements:
|
97
|
-
- -
|
98
|
-
- !ruby/object:Gem::Version
|
99
|
-
version:
|
95
|
+
requirements:
|
96
|
+
- - ! '>='
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: '0'
|
100
99
|
type: :runtime
|
101
100
|
prerelease: false
|
102
|
-
version_requirements: *
|
103
|
-
- !ruby/object:Gem::Dependency
|
101
|
+
version_requirements: *70169712589760
|
102
|
+
- !ruby/object:Gem::Dependency
|
104
103
|
name: rest-client
|
105
|
-
requirement: &
|
104
|
+
requirement: &70169712588300 !ruby/object:Gem::Requirement
|
106
105
|
none: false
|
107
|
-
requirements:
|
108
|
-
- -
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version:
|
106
|
+
requirements:
|
107
|
+
- - ! '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
111
110
|
type: :runtime
|
112
111
|
prerelease: false
|
113
|
-
version_requirements: *
|
114
|
-
- !ruby/object:Gem::Dependency
|
112
|
+
version_requirements: *70169712588300
|
113
|
+
- !ruby/object:Gem::Dependency
|
115
114
|
name: builder
|
116
|
-
requirement: &
|
115
|
+
requirement: &70169712587200 !ruby/object:Gem::Requirement
|
117
116
|
none: false
|
118
|
-
requirements:
|
119
|
-
- -
|
120
|
-
- !ruby/object:Gem::Version
|
121
|
-
version:
|
117
|
+
requirements:
|
118
|
+
- - ! '>='
|
119
|
+
- !ruby/object:Gem::Version
|
120
|
+
version: '0'
|
122
121
|
type: :runtime
|
123
122
|
prerelease: false
|
124
|
-
version_requirements: *
|
123
|
+
version_requirements: *70169712587200
|
125
124
|
description: A Ruby wrapper around the DPS-hosted PxPay service
|
126
125
|
email: bradleypriest@gmail.com
|
127
126
|
executables: []
|
128
|
-
|
129
127
|
extensions: []
|
130
|
-
|
131
|
-
extra_rdoc_files:
|
128
|
+
extra_rdoc_files:
|
132
129
|
- LICENSE.txt
|
133
130
|
- README.md
|
134
|
-
files:
|
131
|
+
files:
|
135
132
|
- .document
|
136
133
|
- Gemfile
|
137
134
|
- Gemfile.lock
|
@@ -150,37 +147,34 @@ files:
|
|
150
147
|
- lib/pxpay/templates/pxpay.rb
|
151
148
|
- pxpay.gemspec
|
152
149
|
- test/helper.rb
|
150
|
+
- test/pxpay_test.rb
|
153
151
|
- test/response.xml
|
154
|
-
- test/test_pxpay.rb
|
155
152
|
homepage: http://github.com/bradleypriest/pxpay
|
156
|
-
licenses:
|
153
|
+
licenses:
|
157
154
|
- MIT
|
158
155
|
post_install_message:
|
159
156
|
rdoc_options: []
|
160
|
-
|
161
|
-
require_paths:
|
157
|
+
require_paths:
|
162
158
|
- lib
|
163
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
159
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
164
160
|
none: false
|
165
|
-
requirements:
|
166
|
-
- -
|
167
|
-
- !ruby/object:Gem::Version
|
168
|
-
|
169
|
-
segments:
|
161
|
+
requirements:
|
162
|
+
- - ! '>='
|
163
|
+
- !ruby/object:Gem::Version
|
164
|
+
version: '0'
|
165
|
+
segments:
|
170
166
|
- 0
|
171
|
-
|
172
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
167
|
+
hash: -3129400018934760420
|
168
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
173
169
|
none: false
|
174
|
-
requirements:
|
175
|
-
- -
|
176
|
-
- !ruby/object:Gem::Version
|
177
|
-
version:
|
170
|
+
requirements:
|
171
|
+
- - ! '>='
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
178
174
|
requirements: []
|
179
|
-
|
180
175
|
rubyforge_project:
|
181
|
-
rubygems_version: 1.8.
|
176
|
+
rubygems_version: 1.8.10
|
182
177
|
signing_key:
|
183
178
|
specification_version: 3
|
184
179
|
summary: Ruby wrapper for the Payment Express' PxPay API
|
185
180
|
test_files: []
|
186
|
-
|