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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b527cfd2c4c0fe821dbfcab6e86aa2f8d8afdfa3
4
- data.tar.gz: 72d43532712fa8abd86b65470e8dbfc2e203c675
3
+ metadata.gz: b9cb5454771063aa62b52a61ee393c59600d0775
4
+ data.tar.gz: 29049d6e201e90fbd8202084f041c296be5a7f97
5
5
  SHA512:
6
- metadata.gz: e05523ec56a2d3e2a3edbb75fb480244087a206826bbc12483661fc282a03982018e601f4af9058d8f763f782e2cde6506db8c4a2ec477401197f8e8367d3c1f
7
- data.tar.gz: 900d7700fa819cde165774594a0e91f223d4452b553c6d001e2a7e2e30e9e0dfa4e73711f4c8da4012c19dc1574fc3af2fdb88528e802089a1000dc63e0aa902
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 to connect your application with [ProxyPay](http://www.proxypay.co.ao) API that allows your application to interact with the Angolan ATM system knows as Multicaixa for online payments by reference.
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 for Proxypay API and proxypay gem
60
+ ## Help and Docs
58
61
  - [ProxyPay API](https://developer.proxypay.co.ao)
59
- - [RDOC](http://www.rubydoc.info/gems/proxypay/0.1.1)
62
+ - [RDOC](http://www.rubydoc.info/gems/proxypay/0.1.5)
60
63
 
61
64
  ## Development
62
65
  - You can fork the project
@@ -1,5 +1,5 @@
1
- #require "./lib/proxypay/version.rb"
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
@@ -1,3 +1,3 @@
1
1
  module Proxypay
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
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
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-10-30 00:00:00.000000000 Z
11
+ date: 2015-11-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler