pxpay 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.2
1
+ 0.2.3
@@ -1,19 +1,18 @@
1
1
  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
+ @@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
+
4
7
  # A list of the acceptable payment currencies
5
8
  # See http://www.paymentexpress.com/technical_resources/ecommerce_hosted/pxpay.html#Properties
6
9
  def self.currency_types
7
10
  %w( CAD CHF EUR FRF GBP HKD JPY NZD SGD USD ZAR AUD WST VUV TOP SBD PNG MYR KWD FJD )
8
11
  end
9
-
12
+
10
13
  # The currently returned details from Payment Express. Access with Pxpay::Base.return_details
11
14
  def self.return_details
12
15
  [ :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 ]
13
16
  end
14
-
15
- class << self
16
- attr_accessor :pxpay_user_id, :pxpay_key, :url_success, :url_failure
17
- end
18
17
  end
19
18
  end
@@ -32,7 +32,7 @@ module Pxpay
32
32
 
33
33
  # Get the redirect URL from Payment Express
34
34
  def url
35
- response = ::RestClient.post("https://sec2.paymentexpress.com/pxpay/pxaccess.aspx", post )
35
+ response = ::RestClient.post(Pxpay::Base.pxpay_request_url, post )
36
36
  response_text = ::Nokogiri::XML(response)
37
37
  if response_text.at_css("Request").attributes["valid"].value == "1"
38
38
  url = response_text.at_css("URI").inner_html
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{pxpay}
8
- s.version = "0.2.2"
8
+ s.version = "0.2.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Bradley Priest"]
12
- s.date = %q{2011-05-15}
11
+ s.authors = [%q{Bradley Priest}]
12
+ s.date = %q{2011-06-15}
13
13
  s.description = %q{A Ruby wrapper around the DPS-hosted PxPay service}
14
14
  s.email = %q{bradleypriest@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -39,13 +39,12 @@ Gem::Specification.new do |s|
39
39
  "test/test_pxpay.rb"
40
40
  ]
41
41
  s.homepage = %q{http://github.com/bradleypriest/pxpay}
42
- s.licenses = ["MIT"]
43
- s.require_paths = ["lib"]
44
- s.rubygems_version = %q{1.3.7}
42
+ s.licenses = [%q{MIT}]
43
+ s.require_paths = [%q{lib}]
44
+ s.rubygems_version = %q{1.8.5}
45
45
  s.summary = %q{Ruby wrapper for the Payment Express' PxPay API}
46
46
 
47
47
  if s.respond_to? :specification_version then
48
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
49
48
  s.specification_version = 3
50
49
 
51
50
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
metadata CHANGED
@@ -1,12 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pxpay
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 2
8
- - 2
9
- version: 0.2.2
4
+ prerelease:
5
+ version: 0.2.3
10
6
  platform: ruby
11
7
  authors:
12
8
  - Bradley Priest
@@ -14,8 +10,7 @@ autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
12
 
17
- date: 2011-05-15 00:00:00 +12:00
18
- default_executable:
13
+ date: 2011-06-15 00:00:00 Z
19
14
  dependencies:
20
15
  - !ruby/object:Gem::Dependency
21
16
  name: shoulda
@@ -24,8 +19,6 @@ dependencies:
24
19
  requirements:
25
20
  - - ">="
26
21
  - !ruby/object:Gem::Version
27
- segments:
28
- - 0
29
22
  version: "0"
30
23
  type: :development
31
24
  prerelease: false
@@ -37,10 +30,6 @@ dependencies:
37
30
  requirements:
38
31
  - - ~>
39
32
  - !ruby/object:Gem::Version
40
- segments:
41
- - 1
42
- - 0
43
- - 0
44
33
  version: 1.0.0
45
34
  type: :development
46
35
  prerelease: false
@@ -52,9 +41,6 @@ dependencies:
52
41
  requirements:
53
42
  - - ~>
54
43
  - !ruby/object:Gem::Version
55
- segments:
56
- - 1
57
- - 6
58
44
  version: "1.6"
59
45
  type: :development
60
46
  prerelease: false
@@ -66,8 +52,6 @@ dependencies:
66
52
  requirements:
67
53
  - - ">="
68
54
  - !ruby/object:Gem::Version
69
- segments:
70
- - 0
71
55
  version: "0"
72
56
  type: :development
73
57
  prerelease: false
@@ -79,8 +63,6 @@ dependencies:
79
63
  requirements:
80
64
  - - ">="
81
65
  - !ruby/object:Gem::Version
82
- segments:
83
- - 0
84
66
  version: "0"
85
67
  type: :development
86
68
  prerelease: false
@@ -92,8 +74,6 @@ dependencies:
92
74
  requirements:
93
75
  - - ">="
94
76
  - !ruby/object:Gem::Version
95
- segments:
96
- - 0
97
77
  version: "0"
98
78
  type: :development
99
79
  prerelease: false
@@ -105,8 +85,6 @@ dependencies:
105
85
  requirements:
106
86
  - - ">="
107
87
  - !ruby/object:Gem::Version
108
- segments:
109
- - 0
110
88
  version: "0"
111
89
  type: :development
112
90
  prerelease: false
@@ -118,8 +96,6 @@ dependencies:
118
96
  requirements:
119
97
  - - ">="
120
98
  - !ruby/object:Gem::Version
121
- segments:
122
- - 0
123
99
  version: "0"
124
100
  type: :runtime
125
101
  prerelease: false
@@ -131,8 +107,6 @@ dependencies:
131
107
  requirements:
132
108
  - - ">="
133
109
  - !ruby/object:Gem::Version
134
- segments:
135
- - 0
136
110
  version: "0"
137
111
  type: :runtime
138
112
  prerelease: false
@@ -144,8 +118,6 @@ dependencies:
144
118
  requirements:
145
119
  - - ">="
146
120
  - !ruby/object:Gem::Version
147
- segments:
148
- - 0
149
121
  version: "0"
150
122
  type: :runtime
151
123
  prerelease: false
@@ -180,7 +152,6 @@ files:
180
152
  - test/helper.rb
181
153
  - test/response.xml
182
154
  - test/test_pxpay.rb
183
- has_rdoc: true
184
155
  homepage: http://github.com/bradleypriest/pxpay
185
156
  licenses:
186
157
  - MIT
@@ -194,7 +165,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
194
165
  requirements:
195
166
  - - ">="
196
167
  - !ruby/object:Gem::Version
197
- hash: 3196313653595730493
168
+ hash: 2230866212600717593
198
169
  segments:
199
170
  - 0
200
171
  version: "0"
@@ -203,13 +174,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
203
174
  requirements:
204
175
  - - ">="
205
176
  - !ruby/object:Gem::Version
206
- segments:
207
- - 0
208
177
  version: "0"
209
178
  requirements: []
210
179
 
211
180
  rubyforge_project:
212
- rubygems_version: 1.3.7
181
+ rubygems_version: 1.8.5
213
182
  signing_key:
214
183
  specification_version: 3
215
184
  summary: Ruby wrapper for the Payment Express' PxPay API