paynow_sdk 1.0.5 → 1.0.6

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
  SHA256:
3
- metadata.gz: 0104724aaaecb8e6380d705ff81295d8894364bd7d533adde9c8c5f8782c77c6
4
- data.tar.gz: c0cf9d5ecbc2d5349cfdfe06d66fb324cf4e1a2fab899fb7ab7e0c976fa8ff9d
3
+ metadata.gz: 317658ccf2e92534213a24bdf0e8145e6c8ebba77d07ccc10450764b8372e8d7
4
+ data.tar.gz: 3dc3534d7ad8cdf633c6dbe637946b1d7ef1b6572f473810af34a02b7b8111b0
5
5
  SHA512:
6
- metadata.gz: d09e1af6e1985e626728ee1f96f2fa1dabd6a515411a4962cff8d05966f974e78ef01333d31839e24b0779fbed48e3117a9bb375e1d5d1f4f5bec227bd2bcf0a
7
- data.tar.gz: 367d910e05e10f76fd8c6c20f7eee9c7ec75b7e660ebb7d62887b0e5bd597ba05f209cacb1079f65c3491bd88142b423498eac8e124d6ed802459d14ea255b7f
6
+ metadata.gz: b0ea4ac59b8bf16044ba21a5526818805b878a2dc0d42a9c67c66e0f9345be26891a2f95764721de5ed5c30d657bf8aa62e46b4d94c5f863ddc0c39055b51dfa
7
+ data.tar.gz: 91869a6709a561402d5e2facad8ae8ea7c273b490db5c3a946a53b5edad7fb4d2a9e1db5c4665e7662319e760f57f06cc8cd65e99477562930a8b7dd0bc9a8f2
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- paynow_sdk (1.0.5)
4
+ paynow_sdk (1.0.6)
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,8 +30,8 @@ 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"]
34
+ @paid = @status = "Paid"
35
35
  if data.include?("amount")
36
36
  @amount = data["amount"]
37
37
  end
@@ -1,3 +1,3 @@
1
1
  module PaynowSdk
2
- VERSION = "1.0.5"
2
+ VERSION = "1.0.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paynow_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - marshall nyasha chikari