paynow_sdk 1.0.8 → 1.0.9

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: f1be5484904e0a877deed189e8dbe9a8906886edcded0c04aac46ce1e1b8cf3e
4
- data.tar.gz: a88347664070162bb65c04a1b8b21c52866815b68b6e75a3357383e7504c7474
3
+ metadata.gz: c11a04492e6602903f3cad2293b665015e7eb82e9d4bea7624f0207ee40d46b6
4
+ data.tar.gz: 11a44f1ebe69d2d0bba1885aee5fea4a67f2d1474521487bbdf539dbe9a69723
5
5
  SHA512:
6
- metadata.gz: 607f3b4284d6a50834487b820cca17fcfbcd641c5f56d520ddfb3de35690f078851dab90551a9b3a55a11c70d59f18cb23e2d422b4c975fc9b3ee5eaaa43a711
7
- data.tar.gz: e358f5d8945163b703c8b0811c44c1ca78676b897f21e9ca70793327927277def9c58ac12a388de03f231c17bb091aed49d15b56a984c09dea0960601d70faf4
6
+ metadata.gz: aeb75814e52a89e4bb3c8ce15e19412858d57eaba1dfb128b812e395452f1aafc15e5ea1741528b3df36c040c4b9dea5dd49437ce320cf5a25815d73469cd5e2
7
+ data.tar.gz: b53de4887d9a737d8a5e7996dc53ba7b252f0f34db7fcf9a7960f4a8c1b10b5f4c859c0c57ac357e1f539cca2ff6aa98c2321475a6d276fa0b066f123aea56b2
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- paynow_sdk (1.0.8)
4
+ paynow_sdk (1.0.9)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -90,7 +90,7 @@ end
90
90
 
91
91
  # Checking transaction status
92
92
 
93
- The SDK exposes a handy method that you can use to check the status of a transaction. Once you have instantiated the Paynow class.
93
+ The SDK exposes a handy method that you can use to check the status of a transaction.
94
94
 
95
95
  ```ruby
96
96
  # Check the status of the transaction with the specified poll url
@@ -6,12 +6,12 @@ require "net/http"
6
6
 
7
7
  #throws error when hash from Paynow does not match locally generated hash
8
8
  module PaynowStatus
9
- def paid
9
+ def self.paid
10
10
  status_paid = check_transaction_status(poll_url)
11
11
  status_paid["status"] == "Paid"
12
12
  end
13
13
 
14
- def check_transaction_status(poll_url)
14
+ def self.check_transaction_status(poll_url)
15
15
  url = URI(poll_url)
16
16
 
17
17
  http = Net::HTTP.new(url.host, url.port)
@@ -24,12 +24,8 @@ module PaynowStatus
24
24
  response = http.request(request)
25
25
  response.read_body
26
26
 
27
- response_object = rebuild_response(response.read_body)
28
- response_object
29
- end
30
-
31
- def rebuild_response(response)
32
- URI.decode_www_form(response).to_h
27
+ response_object = rebuild(response.read_body)
28
+ URI.decode_www_form(response_object).to_h
33
29
  end
34
30
  end
35
31
 
@@ -1,3 +1,3 @@
1
1
  module PaynowSdk
2
- VERSION = "1.0.8"
2
+ VERSION = "1.0.9"
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.8
4
+ version: 1.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - marshall nyasha chikari