paynow_sdk 1.0.2 → 1.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 10c20a3ef61786a5c7be8ae9df0f066b990e707eecb9f2fb353f7f2b53f85732
4
- data.tar.gz: d97738672c1d5689b766e5a4d2e47a160a48146c38861e5bfb74e0b4e75df6ff
3
+ metadata.gz: 0febf8d3514812c9f0392a6417ed17c1d4f519f07251ce6a9659a78f375ec6c3
4
+ data.tar.gz: 5f034666444d3ddacebdd377314d7c94f64b81aa84da51e0a078ed7adb41b5d9
5
5
  SHA512:
6
- metadata.gz: d02300e6ce43602719e110d52e05d42a7615307dcea347ea43e20bc6941b55c4df4cb7801f6a3dee3e991a87388d8f12b80fd9f7b0d138301b30cf326e62657e
7
- data.tar.gz: d1457dff979df53376550979a6d5da6f41eafaf1989e97293a8e25564b682003f191eedf78e9f6cb307fe5464e4780c67223ccfff69c1a9a5a258dc2f23470b6
6
+ metadata.gz: 33f098361c36515417986d6fb747a1d173b2979d8f4e055e1e7748cf5e89818ce36a596974626b16e2f0ba6df2f74118576472fdc7054ca241e165d7888c32c4
7
+ data.tar.gz: 1109e5cd490c1ffc2f3589120e3ed31ae96873dd7cdf536dc6155c072e4c3f6fdb5cbf43367d0f59d84d9358054560e2c8155d9a7c45e4810c2882a6a35e15a1
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- paynow_sdk (1.0.2)
4
+ paynow_sdk (1.0.7)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -130,9 +130,9 @@ paynow = Paynow.new(
130
130
  'http://resulturl.com'
131
131
  )
132
132
 
133
- payment = paynow.create_payment('Order', 'test@example.com')
133
+ payment = paynow.create_payment('Order Number', 'test@example.com')
134
134
 
135
- payment.add('Payment for stuff', 1)
135
+ payment.add('Payment for stuff', 99.99)
136
136
 
137
137
  response = paynow.send(payment)
138
138
 
@@ -143,11 +143,11 @@ if response.success
143
143
 
144
144
  poll_url = response.poll_url
145
145
 
146
- print "Poll Url: " + poll_url
147
-
148
146
  status = paynow.check_transaction_status(poll_url)
149
-
150
- print "Payment Status: " + status.status
147
+ if status.paid
148
+ #create a record in the database e.g orders table
149
+ print "Payment Status: " + status.status
150
+ end
151
151
  end
152
152
  ```
153
153
 
@@ -30,10 +30,9 @@ class StatusResponse
30
30
  if update
31
31
  status_update(data)
32
32
  else
33
- @status = data["status"].downcase
34
- @paid = @status == "paid"
33
+ @status = data["status"]
35
34
  if data.include?("amount")
36
- @amount = data["amount"].round(2)
35
+ @amount = data["amount"]
37
36
  end
38
37
  if data.include?("reference")
39
38
  @reference = data["reference"]
@@ -1,3 +1,3 @@
1
1
  module PaynowSdk
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paynow_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - marshall nyasha chikari
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-08-30 00:00:00.000000000 Z
11
+ date: 2020-08-31 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: The gem includes modules and methods to make it easy for integrating
14
14
  paynow api to ruby apps.