worldpay 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2103380ff2f35d6519861daa343ab94750ad04ad
4
- data.tar.gz: 5fa7b7ba4187008e2a61970ae3b6193448e29657
3
+ metadata.gz: d135e92dfe07cf88bb3f578431886412da6b35bf
4
+ data.tar.gz: 20ad998eddf5f716ae33d8a2278fe8b6f2b414be
5
5
  SHA512:
6
- metadata.gz: ecc068153f96b633213398174bc59e685f1df86bb3813d97dd373520f5777da5e16245b770c507baf403bb47778a8805422ee95508e8eef29486958ff36b0209
7
- data.tar.gz: 58565305c8ab9cd8b7790672f015b13c9a66f9b02195f44a0e04085ad60b7eca8480c76d5331ac34a5692043fe626685b1bb156cb7cdd94beb4888234bc00bee
6
+ metadata.gz: 8791ddf137a5d46452c1862037237d697e506970b782de80d47d014b27880ce22c238867715fc95b3a844aedcaf53f524b5200751c5ca43b68703a7dfc44cb79
7
+ data.tar.gz: c49685ab0870ac6b2e968835fbe56517972a0f1b4daa9d154263b12c587aeb076d62994c24f8a0fc75b34474b602c43499b1d8e980c6bc4c108159aa55e724e2
data/lib/worldpay.rb CHANGED
@@ -14,6 +14,8 @@ class Worldpay
14
14
  @errors = {}
15
15
  @raise_errors = true
16
16
 
17
+ @version = '1.0.2'
18
+
17
19
 
18
20
  def initialize(service_key='', timeout=3, raise_errors=true)
19
21
  if service_key.empty?
@@ -194,6 +196,7 @@ class Worldpay
194
196
  end
195
197
  request.add_field("Authorization", @service_key)
196
198
  request.add_field("Content-Type", "application/json")
199
+ request.add_field("X-wp-client-user-agent", "os.name="+RUBY_PLATFORM+";os.version="+RUBY_PLATFORM+";os.arch="+RUBY_PLATFORM+";lang.version="+RUBY_VERSION+";lib.version="+@version+";api.version=v1;lang=am;owner=worldpay")
197
200
  if (json != false)
198
201
  request.add_field("Content-Length", json.length)
199
202
  end
@@ -250,33 +253,4 @@ class Worldpay
250
253
 
251
254
 
252
255
 
253
- #WEBHOOKS
254
- #Process Worldpay webhooks
255
- def processWebhook()
256
-
257
- =begin
258
- while line = $stdin.gets
259
- puts line
260
- end
261
- =end
262
-
263
-
264
- if (request.POST['orderCode'] && request.POST['paymentStatus'])
265
- json = handleResponse(res)
266
-
267
- if (json == nil || json == false)
268
- onError('notificationUnknown')
269
- end
270
-
271
- return json
272
- else
273
- onError('notificationUnknown')
274
- end
275
-
276
- end
277
-
278
-
279
-
280
-
281
-
282
256
  end
@@ -4,7 +4,7 @@ class WorldpayTest < MiniTest::Unit::TestCase
4
4
 
5
5
  # Version
6
6
  def test_version
7
- assert_equal "0.0.1", Worldpay::VERSION
7
+ assert_equal "1.0.2", Worldpay::VERSION
8
8
  end
9
9
 
10
10
  # Service Key
data/worldpay.gemspec CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "worldpay"
7
- spec.version = "1.0.1"
7
+ spec.version = "1.0.2"
8
8
  spec.authors = ["Andrew Odendaal"]
9
9
  spec.email = ["andrew.odendaal@worldpay.com"]
10
10
  spec.summary = %q{online.worldpay.com ruby lib.}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: worldpay
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Odendaal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-13 00:00:00.000000000 Z
11
+ date: 2014-12-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler