worldpay 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/worldpay.rb +7 -4
- data/worldpay-0.0.1.gem +0 -0
- data/worldpay-0.0.2.gem +0 -0
- data/worldpay.gemspec +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c7c1d7c3dc5b2c9701fe8eeeb7e6b9da4faeed17
|
4
|
+
data.tar.gz: 97299cb5255f058eeefe7f8fd41c4892fae967cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 247f2b6be3a7a424ca2e1af8d0cb8a51637f5ddbbf6c93c27ea3bd01f19edb78eef13cb6cb58a1997f369a041f4063d2636ebe0017829bff1d83ef1abfcac385
|
7
|
+
data.tar.gz: aa0b6ccecb773f0afd2236a9ab46466a66cc9d86508ab0bb2358a60dae410db7d4d72c7dfa3076c2c6d9db3d8bc955c31398406326413ce38eb2c581909fd146
|
data/lib/worldpay.rb
CHANGED
@@ -134,10 +134,13 @@ class Worldpay
|
|
134
134
|
|
135
135
|
order = defaults.merge(order)
|
136
136
|
|
137
|
+
fmt = "%05.2f" % order['amount']
|
138
|
+
cost_cents = fmt.split('.').join('')
|
139
|
+
|
137
140
|
json = {
|
138
141
|
'token' => order['token'],
|
139
142
|
'orderDescription' => order['orderDescription'],
|
140
|
-
'amount' =>
|
143
|
+
'amount' => cost_cents,
|
141
144
|
'currencyCode' => order['currencyCode'],
|
142
145
|
'name' => order['name'],
|
143
146
|
'orderType' => order['orderType'],
|
@@ -230,8 +233,7 @@ class Worldpay
|
|
230
233
|
#Get card details from Worldpay token
|
231
234
|
def getStoredCardDetails(token=false)
|
232
235
|
if (token==false || token!=token.to_s)
|
233
|
-
onError('ip', @
|
234
|
-
rs['orderInput']['token'])
|
236
|
+
onError('ip', @errors['orderInput']['token'])
|
235
237
|
end
|
236
238
|
|
237
239
|
response = sendRequest('tokens/'+token, false, true, 'GET')
|
@@ -252,11 +254,12 @@ class Worldpay
|
|
252
254
|
#Process Worldpay webhooks
|
253
255
|
def processWebhook()
|
254
256
|
|
257
|
+
=begin
|
255
258
|
while line = $stdin.gets
|
256
259
|
puts line
|
257
260
|
end
|
261
|
+
=end
|
258
262
|
|
259
|
-
exit
|
260
263
|
|
261
264
|
if (request.POST['orderCode'] && request.POST['paymentStatus'])
|
262
265
|
json = handleResponse(res)
|
data/worldpay-0.0.1.gem
ADDED
Binary file
|
data/worldpay-0.0.2.gem
ADDED
Binary file
|
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 = "0.0.
|
7
|
+
spec.version = "0.0.3"
|
8
8
|
spec.authors = ["Andrew Odendaal"]
|
9
9
|
spec.email = ["andrew.odendaal@worldpay.com"]
|
10
10
|
spec.summary = %q{developer.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: 0.0.
|
4
|
+
version: 0.0.3
|
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-08-
|
11
|
+
date: 2014-08-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -55,6 +55,8 @@ files:
|
|
55
55
|
- lib/worldpay.rb
|
56
56
|
- test/test_helper.rb
|
57
57
|
- test/worldpay_test.rb
|
58
|
+
- worldpay-0.0.1.gem
|
59
|
+
- worldpay-0.0.2.gem
|
58
60
|
- worldpay.gemspec
|
59
61
|
homepage: https://developer.worldpay.com
|
60
62
|
licenses:
|