proxypay 0.1.4 → 0.1.5
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 +4 -4
- data/README.md +7 -4
- data/lib/proxypay.rb +9 -3
- data/lib/proxypay/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b9cb5454771063aa62b52a61ee393c59600d0775
|
4
|
+
data.tar.gz: 29049d6e201e90fbd8202084f041c296be5a7f97
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 984589df1428d3804e9357f76e3684eab182b228b62e9ba338b9a7df69900cfa460ed2ffdb84f862c069bfe03779b3ad37fcf90fc535930630ad575d255999b5
|
7
|
+
data.tar.gz: 8592194c82b5f0edd0b83d6366c0421a840a9439b8312e4a80866895ceaef83fdb1ac61f63cdaf51ef26a17981b43483d4bac249a6a566326bfa73ce406170ff
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Proxypay
|
2
2
|
|
3
|
-
A ruby gem
|
3
|
+
A ruby gem created by [SmartTechys](http://www.smarttechys.co.ao) for the [ProxyPay](http://www.proxypay.co.ao) API by [TimeBoxed](http://www.timeboxed.co.ao) that allows online payments using Angolan ATM's reference (Multicaixa references).
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -51,12 +51,15 @@ Proxypay.get_payment("OcSLBANU4tjRi9gfW5VUcMqkvzL")
|
|
51
51
|
|
52
52
|
## Acknowledge a payment by passing his ID
|
53
53
|
Proxypay.new_payment("OcSLBANU4tjRi9gfW5VUcMqkvzL")
|
54
|
+
|
55
|
+
## Acknowledge a payment by passing and array of ID's
|
56
|
+
ids = ["OcSLBANU4tjRi9gfW5VUcMqkvzL", "EcJLBANU4trUi8gfM6MOcMqkvzH","VxELBANU4tjRi9gfW5VUcMqkvzZ"]
|
57
|
+
Proxypay.new_payments(ids)
|
54
58
|
```
|
55
|
-
work in progress...
|
56
59
|
|
57
|
-
## Help and Docs
|
60
|
+
## Help and Docs
|
58
61
|
- [ProxyPay API](https://developer.proxypay.co.ao)
|
59
|
-
- [RDOC](http://www.rubydoc.info/gems/proxypay/0.1.
|
62
|
+
- [RDOC](http://www.rubydoc.info/gems/proxypay/0.1.5)
|
60
63
|
|
61
64
|
## Development
|
62
65
|
- You can fork the project
|
data/lib/proxypay.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
require "proxypay/version"
|
1
|
+
require "./lib/proxypay/version.rb"
|
2
|
+
#require "proxypay/version"
|
3
3
|
require "httparty"
|
4
4
|
|
5
5
|
module Proxypay
|
@@ -33,16 +33,22 @@ module Proxypay
|
|
33
33
|
end
|
34
34
|
|
35
35
|
# Acknowledge a payment by submitting his ID
|
36
|
-
def self.new_payment(id)
|
36
|
+
def self.new_payment(id, options={})
|
37
37
|
options = {:basic_auth => authenticate}
|
38
38
|
delete("/events/payments/#{id}", options).parsed_response
|
39
39
|
end
|
40
40
|
|
41
|
+
# Acknowledge multiple payments by submitting an array of ids
|
42
|
+
def self.new_payments(ids)
|
43
|
+
delete("/events/payments", :body => { :ids => ids }.to_json, :basic_auth => authenticate, :headers => { 'Content-Type' => 'application/json'} ).parsed_response
|
44
|
+
end
|
45
|
+
|
41
46
|
private
|
42
47
|
def self.authenticate
|
43
48
|
auth = {
|
44
49
|
username:ENV["PROXYPAY_USER"],
|
45
50
|
password:ENV["PROXYPAY_API_KEY"]
|
46
51
|
}
|
52
|
+
return auth
|
47
53
|
end
|
48
54
|
end
|
data/lib/proxypay/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: proxypay
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sergio Maziano
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|