dinero_mail_ipn 2.0.2 → 2.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +4 -1
- data/.travis.yml +3 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +8 -8
- data/README.markdown +13 -7
- data/lib/dinero_mail_ipn.rb +8 -0
- data/lib/dinero_mail_ipn/consulta_pago_response.rb +9 -7
- data/lib/dinero_mail_ipn/notification_parser.rb +76 -0
- data/lib/dinero_mail_ipn/report.rb +1 -1
- data/lib/dinero_mail_ipn/version.rb +1 -1
- data/resources/validation/xsd/notifications.xsd +23 -0
- data/test/fixtures/ConsultaPagoErrorBadCredentials.xml +0 -0
- data/test/fixtures/ConsultaPagoOKWith2Pays.xml +0 -0
- data/test/fixtures/ConsultaPagoOkWith1Pay.xml +0 -0
- data/test/fixtures/ConsultaPagoOkWithoutCollections.xml +0 -0
- data/test/fixtures/ConsultaTransacciones1-2Success.xml +0 -0
- data/test/fixtures/ConsultaTransacciones1Success.xml +0 -0
- data/test/fixtures/ipn-v2-notification.xml +13 -0
- data/test/fixtures/malformed-ipn-v2-notification.xml +13 -0
- data/test/helper.rb +22 -0
- data/test/test_dinero_mail_ipn.rb +1 -1
- data/test/test_notification_parser.rb +64 -0
- data/test/test_report.rb +6 -0
- metadata +34 -54
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 86a5daf19ae3051243508551acaaa0df154eff0b
|
4
|
+
data.tar.gz: 316610cca775592917f263de02e8d6478f9ce601
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: f0756f106663c222b22af7408dfda1709f121808c105c56d38554cfe02c3687c82822b3ec053c30fcade005251d4c86fa98da96d0a8b1d57bf5f6fac89115fc6
|
7
|
+
data.tar.gz: b5704a6e945df2151ccb6351cf41c15dec9bf910538aa4055e9f9b2b8d3353fe0a44917e40ed23dc53d580ab81d74adb7ac19681f226c7958a629a5f6836c229
|
data/.gitignore
CHANGED
data/.travis.yml
ADDED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,24 +1,24 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
dinero_mail_ipn (2.0.
|
4
|
+
dinero_mail_ipn (2.0.3)
|
5
5
|
chronic
|
6
6
|
httparty (~> 0.8.1)
|
7
7
|
nokogiri (~> 1.5.0)
|
8
8
|
|
9
9
|
GEM
|
10
|
-
remote:
|
10
|
+
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
-
chronic (0.
|
12
|
+
chronic (0.10.2)
|
13
13
|
coderay (1.0.8)
|
14
14
|
fakeweb (1.3.0)
|
15
|
-
httparty (0.8.
|
16
|
-
multi_json
|
15
|
+
httparty (0.8.3)
|
16
|
+
multi_json (~> 1.0)
|
17
17
|
multi_xml
|
18
18
|
method_source (0.8.1)
|
19
|
-
multi_json (1.
|
20
|
-
multi_xml (0.
|
21
|
-
nokogiri (1.5.
|
19
|
+
multi_json (1.10.1)
|
20
|
+
multi_xml (0.5.5)
|
21
|
+
nokogiri (1.5.11)
|
22
22
|
pry (0.9.10)
|
23
23
|
coderay (~> 1.0.5)
|
24
24
|
method_source (~> 0.8)
|
data/README.markdown
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
-
# Dinero Mail IPN
|
1
|
+
# Dinero Mail IPN
|
2
|
+
|
3
|
+
[![Build Status](https://travis-ci.org/etagwerker/dinero_mail_ipn.png?branch=master)](https://travis-ci.org/etagwerker/dinero_mail_ipn) [![Code Climate](https://codeclimate.com/github/etagwerker/dinero_mail_ipn.png)](https://codeclimate.com/github/etagwerker/dinero_mail_ipn)
|
2
4
|
|
3
5
|
Ruby gem para consumir los métodos de IPN 1 y IPN 2 de [Dinero
|
4
6
|
Mail](http://dineromail.com)
|
@@ -17,15 +19,15 @@ Mail](http://dineromail.com)
|
|
17
19
|
|
18
20
|
### IPN v1
|
19
21
|
|
20
|
-
Consulta de pagos en períodos de una semana.
|
22
|
+
Consulta de pagos en períodos de una semana.
|
21
23
|
|
22
24
|
client = DineroMailIpn::Client.new(:email => 'EMAILPRUEBA@gmail.com', :account => '17128254', :pin => 'AYCN7IXDTM')
|
23
25
|
response = client.consulta_pago(Date.today - 7, Date.today)
|
24
26
|
# #<DineroMailIpn::ConsultaPagoResponse:0x5f9600 @hash={"Report"=>{"Email"=>"EMAILPRUEBA@gmail.com",
|
25
|
-
# "Acount"=>"17128254", "Pin"=>nil, "StartDate"=>"20110603", "EndDate"=>"20110703", "XML"=>"1",
|
27
|
+
# "Acount"=>"17128254", "Pin"=>nil, "StartDate"=>"20110603", "EndDate"=>"20110703", "XML"=>"1",
|
26
28
|
# "State"=>"1", "Pays"=>nil, "Collections"=>nil, "Tickets"=>nil, "Receptions"=>nil, "Retreats"=>nil,
|
27
29
|
# "Credits"=>nil, "Debits"=>nil}}>
|
28
|
-
response.ok?
|
30
|
+
response.ok?
|
29
31
|
# true
|
30
32
|
response.state_description
|
31
33
|
# "La consulta se realizó correctamente"
|
@@ -60,8 +62,6 @@ Si falta algo, por favor reportarlo como issue.
|
|
60
62
|
|
61
63
|
## Patches/Pull Requests
|
62
64
|
|
63
|
-
Lo de siempre.
|
64
|
-
|
65
65
|
Fork the project.
|
66
66
|
|
67
67
|
Make your feature addition or bug fix.
|
@@ -74,4 +74,10 @@ Send me a pull request. Bonus points for topic branches.
|
|
74
74
|
|
75
75
|
## Licencia
|
76
76
|
|
77
|
-
|
77
|
+
Copyright (c) 2014 Ernesto Tagwerker
|
78
|
+
|
79
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
80
|
+
|
81
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
82
|
+
|
83
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/lib/dinero_mail_ipn.rb
CHANGED
@@ -8,6 +8,14 @@ Dir[File.join(File.dirname(__FILE__),'dinero_mail_ipn', '*')].each {|file| requi
|
|
8
8
|
|
9
9
|
module DineroMailIpn
|
10
10
|
|
11
|
+
def self.root_path
|
12
|
+
File.expand_path("../..", __FILE__)
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.resources_path
|
16
|
+
File.expand_path(File.join(self.root_path, "resources"))
|
17
|
+
end
|
18
|
+
|
11
19
|
# # Cliente para Dinero Mail API (v1 y v2)
|
12
20
|
#
|
13
21
|
# Cliente para consumir los métodos de la API IPN v1 y v2.
|
@@ -68,14 +68,16 @@ module DineroMailIpn
|
|
68
68
|
|
69
69
|
@payments = []
|
70
70
|
begin
|
71
|
-
|
71
|
+
if dm_hash["Report"]["Pays"]
|
72
|
+
pays = dm_hash["Report"]["Pays"]["Pay"]
|
72
73
|
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
74
|
+
if pays
|
75
|
+
case pays.class.name
|
76
|
+
when "Hash"
|
77
|
+
@payments << Payment.new(pays)
|
78
|
+
when "Array"
|
79
|
+
pays.each { |pay| @payments << Payment.new(pay) }
|
80
|
+
end
|
79
81
|
end
|
80
82
|
end
|
81
83
|
rescue Exception => e
|
@@ -0,0 +1,76 @@
|
|
1
|
+
module DineroMailIpn
|
2
|
+
class NotificationParser
|
3
|
+
attr_reader :doc
|
4
|
+
|
5
|
+
# @param [String] XML file containing DM IPNv2 operations.
|
6
|
+
# @param [Hash] a Hash of optional parameters.
|
7
|
+
def initialize(xml_file, options = {})
|
8
|
+
raise ArgumentError, "No XML provided" if xml_file.nil?
|
9
|
+
|
10
|
+
@xsd = Nokogiri::XML::Schema(xsd_file('notifications.xsd'))
|
11
|
+
@doc = Nokogiri::XML(xml_file.downcase)
|
12
|
+
end
|
13
|
+
|
14
|
+
# Parses the XML notification POSTed by DineroMail IPNv2
|
15
|
+
# notification system.
|
16
|
+
#
|
17
|
+
# @return [DineroMailIpn::Notification] a parsed Notification
|
18
|
+
def parse
|
19
|
+
return unless valid?
|
20
|
+
|
21
|
+
type = @doc.xpath("//tiponotificacion").text
|
22
|
+
|
23
|
+
operations = @doc.xpath("//operacion").inject([]) do |result, operation|
|
24
|
+
result << [operation.xpath('tipo').text, operation.xpath('id').text]
|
25
|
+
result
|
26
|
+
end
|
27
|
+
|
28
|
+
notification = Notification.new(type, operations)
|
29
|
+
|
30
|
+
notification
|
31
|
+
end
|
32
|
+
|
33
|
+
# Checks that the XML document is valid.
|
34
|
+
#
|
35
|
+
# @return [Boolean]
|
36
|
+
def valid?
|
37
|
+
@xsd.valid?(@doc)
|
38
|
+
end
|
39
|
+
|
40
|
+
# Retrieves an [Array] of [Nokogiri::XML::Schema::SyntaxError]
|
41
|
+
# with the XML document errors.
|
42
|
+
#
|
43
|
+
# @return [Array] list of errors found on the XML document
|
44
|
+
def validate
|
45
|
+
@xsd.validate(@doc)
|
46
|
+
end
|
47
|
+
|
48
|
+
private
|
49
|
+
|
50
|
+
# Locates an XSD file.
|
51
|
+
#
|
52
|
+
# @param filename [String] the XSD filename
|
53
|
+
def xsd_file(filename)
|
54
|
+
xsd_file_location = File.join(DineroMailIpn.resources_path, "/validation/xsd/#{filename}")
|
55
|
+
xsd_file = File.read(xsd_file_location)
|
56
|
+
xsd_file
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
class Notification
|
61
|
+
attr_accessor :type, :operations
|
62
|
+
|
63
|
+
def initialize(type, raw_operations, options = {})
|
64
|
+
raise ArgumentError, "No operations received" if (raw_operations.empty? || raw_operations.nil?)
|
65
|
+
|
66
|
+
@operations = raw_operations.inject([]) do |result, (type, id)|
|
67
|
+
result << Operation.new(type, id)
|
68
|
+
result
|
69
|
+
end
|
70
|
+
|
71
|
+
@type = type
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
class Operation < Struct.new(:type, :id); end
|
76
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
2
|
+
<xs:element name="notificacion">
|
3
|
+
<xs:complexType>
|
4
|
+
<xs:sequence>
|
5
|
+
<xs:element name="tiponotificacion"/>
|
6
|
+
<xs:element name="operaciones">
|
7
|
+
<xs:complexType>
|
8
|
+
<xs:sequence>
|
9
|
+
<xs:element name="operacion" maxOccurs="unbounded" minOccurs="0">
|
10
|
+
<xs:complexType>
|
11
|
+
<xs:sequence>
|
12
|
+
<xs:element type="xs:string" name="tipo"/>
|
13
|
+
<xs:element type="xs:string" name="id"/>
|
14
|
+
</xs:sequence>
|
15
|
+
</xs:complexType>
|
16
|
+
</xs:element>
|
17
|
+
</xs:sequence>
|
18
|
+
</xs:complexType>
|
19
|
+
</xs:element>
|
20
|
+
</xs:sequence>
|
21
|
+
</xs:complexType>
|
22
|
+
</xs:element>
|
23
|
+
</xs:schema>
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/test/helper.rb
CHANGED
@@ -5,12 +5,22 @@ require File.expand_path('../../lib/dinero_mail_ipn', __FILE__)
|
|
5
5
|
|
6
6
|
FakeWeb.allow_net_connect = false
|
7
7
|
|
8
|
+
# Reads a fixture file from /test/fixtures/
|
9
|
+
#
|
10
|
+
# @param [String] File name with extension
|
11
|
+
# @return [File]
|
8
12
|
def fixture_file(filename)
|
9
13
|
return '' if filename == ''
|
10
14
|
file_path = File.expand_path(File.dirname(__FILE__) + '/fixtures/' + filename)
|
11
15
|
File.read(file_path)
|
12
16
|
end
|
13
17
|
|
18
|
+
# Translates a relative path into a
|
19
|
+
# absolute URL.
|
20
|
+
#
|
21
|
+
# @param [String] Relative path
|
22
|
+
# @param [Hash] Options: :https => true, :country => 'chile'
|
23
|
+
# @return [String] Absolute URL
|
14
24
|
def dinero_mail_url(path, options = {})
|
15
25
|
options[:https] = true if options[:https].nil?
|
16
26
|
options[:country] ||= 'argentina'
|
@@ -18,12 +28,24 @@ def dinero_mail_url(path, options = {})
|
|
18
28
|
"#{protocol}://#{options[:country]}.dineromail.com#{path}"
|
19
29
|
end
|
20
30
|
|
31
|
+
# Stubs a GET request for the relative path,
|
32
|
+
# using the fixture file.
|
33
|
+
#
|
34
|
+
# @param [String] Relative path
|
35
|
+
# @param [String] Fixture file name
|
36
|
+
# @param [Hash] Options for FakeWeb.register_uri
|
21
37
|
def stub_get(path, filename, options={})
|
22
38
|
opts = {:body => fixture_file(filename)}.merge(options)
|
23
39
|
|
24
40
|
FakeWeb.register_uri(:get, dinero_mail_url(path), opts)
|
25
41
|
end
|
26
42
|
|
43
|
+
# Stubs a POST request for the relative path,
|
44
|
+
# using the fixture file.
|
45
|
+
#
|
46
|
+
# @param [String] Relative path
|
47
|
+
# @param [String] Fixture file name
|
48
|
+
# @param [Hash] Options for FakeWeb.register_uri
|
27
49
|
def stub_post(path, filename, options={})
|
28
50
|
opts = {:body => fixture_file(filename)}.merge(options)
|
29
51
|
|
@@ -19,7 +19,7 @@ class TestDineroMailIpn < Test::Unit::TestCase
|
|
19
19
|
|
20
20
|
should "return OK with 1 payment" do
|
21
21
|
stub_get("/vender/ConsultaPago.asp?XML=1&Acount=17128254&Pin=AYCN7IXDTM&Email=ernesto%40ombushop.com&StartDate=20110702&EndDate=20110703",
|
22
|
-
"
|
22
|
+
"ConsultaPagoOkWith1Pay.xml")
|
23
23
|
client = DineroMailIpn::Client.new(:email => 'ernesto@ombushop.com',
|
24
24
|
:account => '17128254',
|
25
25
|
:pin => 'AYCN7IXDTM')
|
@@ -0,0 +1,64 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require File.expand_path("../helper", __FILE__)
|
4
|
+
|
5
|
+
class TestDineroMailIpnNotificationParser < Test::Unit::TestCase
|
6
|
+
def setup
|
7
|
+
@xml_file = fixture_file("ipn-v2-notification.xml")
|
8
|
+
@bad_xml_file = fixture_file("malformed-ipn-v2-notification.xml")
|
9
|
+
end
|
10
|
+
|
11
|
+
context "initialization" do
|
12
|
+
should "fail when no XML is provided" do
|
13
|
+
assert_raise ArgumentError do
|
14
|
+
DineroMailIpn::NotificationParser.new
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
should "fail when an invalid XML is provided" do
|
19
|
+
notification_parser = DineroMailIpn::NotificationParser.new(@bad_xml_file)
|
20
|
+
|
21
|
+
assert !notification_parser.valid?
|
22
|
+
end
|
23
|
+
|
24
|
+
should "pass when a valid XML is provided" do
|
25
|
+
notification_parser = DineroMailIpn::NotificationParser.new(@xml_file)
|
26
|
+
|
27
|
+
assert notification_parser.doc.kind_of? Nokogiri::XML::Document
|
28
|
+
assert notification_parser.valid?
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
context "retrieving notified operations" do
|
33
|
+
context "from a valid XML notification" do
|
34
|
+
should "retrieve all valid notified operations" do
|
35
|
+
notification_parser = DineroMailIpn::NotificationParser.new(@xml_file)
|
36
|
+
|
37
|
+
notification = notification_parser.parse
|
38
|
+
|
39
|
+
operations = notification.operations
|
40
|
+
|
41
|
+
assert operations.is_a? Array
|
42
|
+
assert_equal operations.size, 2
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
context "from an invalid XML notification" do
|
47
|
+
should "return nothing if XML is invalid" do
|
48
|
+
notification_parser = DineroMailIpn::NotificationParser.new(@bad_xml_file)
|
49
|
+
notification = notification_parser.parse
|
50
|
+
|
51
|
+
assert_nil notification
|
52
|
+
end
|
53
|
+
|
54
|
+
should "return a list of errors for that invalid XML" do
|
55
|
+
notification_parser = DineroMailIpn::NotificationParser.new(@bad_xml_file)
|
56
|
+
|
57
|
+
errors = notification_parser.validate
|
58
|
+
error_message = errors.map(&:message).first
|
59
|
+
|
60
|
+
assert error_message =~ /No matching global declaration available for the validation root/
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
data/test/test_report.rb
CHANGED
@@ -17,16 +17,22 @@ class TestDineromailIpnReport < Test::Unit::TestCase
|
|
17
17
|
def test_transaction_completed?
|
18
18
|
report = DineroMailIpn::Report.new(:state => 2)
|
19
19
|
assert report.transaction_completed?
|
20
|
+
report = DineroMailIpn::Report.new(:state => "2")
|
21
|
+
assert report.transaction_completed?
|
20
22
|
end
|
21
23
|
|
22
24
|
def test_transaction_pending?
|
23
25
|
report = DineroMailIpn::Report.new(:state => 1)
|
24
26
|
assert report.transaction_pending?
|
27
|
+
report = DineroMailIpn::Report.new(:state => "1")
|
28
|
+
assert report.transaction_pending?
|
25
29
|
end
|
26
30
|
|
27
31
|
def test_transaction_cancelled?
|
28
32
|
report = DineroMailIpn::Report.new(:state => 3)
|
29
33
|
assert report.transaction_cancelled?
|
34
|
+
report = DineroMailIpn::Report.new(:state => "3")
|
35
|
+
assert report.transaction_cancelled?
|
30
36
|
end
|
31
37
|
|
32
38
|
end
|
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dinero_mail_ipn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
5
|
-
prerelease:
|
4
|
+
version: 2.0.3
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Ernesto Tagwerker
|
@@ -10,150 +9,132 @@ authors:
|
|
10
9
|
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
|
-
date:
|
12
|
+
date: 2014-06-10 00:00:00.000000000 Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
15
|
name: httparty
|
17
16
|
requirement: !ruby/object:Gem::Requirement
|
18
|
-
none: false
|
19
17
|
requirements:
|
20
|
-
- - ~>
|
18
|
+
- - "~>"
|
21
19
|
- !ruby/object:Gem::Version
|
22
20
|
version: 0.8.1
|
23
21
|
type: :runtime
|
24
22
|
prerelease: false
|
25
23
|
version_requirements: !ruby/object:Gem::Requirement
|
26
|
-
none: false
|
27
24
|
requirements:
|
28
|
-
- - ~>
|
25
|
+
- - "~>"
|
29
26
|
- !ruby/object:Gem::Version
|
30
27
|
version: 0.8.1
|
31
28
|
- !ruby/object:Gem::Dependency
|
32
29
|
name: nokogiri
|
33
30
|
requirement: !ruby/object:Gem::Requirement
|
34
|
-
none: false
|
35
31
|
requirements:
|
36
|
-
- - ~>
|
32
|
+
- - "~>"
|
37
33
|
- !ruby/object:Gem::Version
|
38
34
|
version: 1.5.0
|
39
35
|
type: :runtime
|
40
36
|
prerelease: false
|
41
37
|
version_requirements: !ruby/object:Gem::Requirement
|
42
|
-
none: false
|
43
38
|
requirements:
|
44
|
-
- - ~>
|
39
|
+
- - "~>"
|
45
40
|
- !ruby/object:Gem::Version
|
46
41
|
version: 1.5.0
|
47
42
|
- !ruby/object:Gem::Dependency
|
48
43
|
name: chronic
|
49
44
|
requirement: !ruby/object:Gem::Requirement
|
50
|
-
none: false
|
51
45
|
requirements:
|
52
|
-
- -
|
46
|
+
- - ">="
|
53
47
|
- !ruby/object:Gem::Version
|
54
48
|
version: '0'
|
55
49
|
type: :runtime
|
56
50
|
prerelease: false
|
57
51
|
version_requirements: !ruby/object:Gem::Requirement
|
58
|
-
none: false
|
59
52
|
requirements:
|
60
|
-
- -
|
53
|
+
- - ">="
|
61
54
|
- !ruby/object:Gem::Version
|
62
55
|
version: '0'
|
63
56
|
- !ruby/object:Gem::Dependency
|
64
57
|
name: shoulda
|
65
58
|
requirement: !ruby/object:Gem::Requirement
|
66
|
-
none: false
|
67
59
|
requirements:
|
68
|
-
- - ~>
|
60
|
+
- - "~>"
|
69
61
|
- !ruby/object:Gem::Version
|
70
62
|
version: 2.11.3
|
71
63
|
type: :development
|
72
64
|
prerelease: false
|
73
65
|
version_requirements: !ruby/object:Gem::Requirement
|
74
|
-
none: false
|
75
66
|
requirements:
|
76
|
-
- - ~>
|
67
|
+
- - "~>"
|
77
68
|
- !ruby/object:Gem::Version
|
78
69
|
version: 2.11.3
|
79
70
|
- !ruby/object:Gem::Dependency
|
80
71
|
name: fakeweb
|
81
72
|
requirement: !ruby/object:Gem::Requirement
|
82
|
-
none: false
|
83
73
|
requirements:
|
84
|
-
- - ~>
|
74
|
+
- - "~>"
|
85
75
|
- !ruby/object:Gem::Version
|
86
76
|
version: 1.3.0
|
87
77
|
type: :development
|
88
78
|
prerelease: false
|
89
79
|
version_requirements: !ruby/object:Gem::Requirement
|
90
|
-
none: false
|
91
80
|
requirements:
|
92
|
-
- - ~>
|
81
|
+
- - "~>"
|
93
82
|
- !ruby/object:Gem::Version
|
94
83
|
version: 1.3.0
|
95
84
|
- !ruby/object:Gem::Dependency
|
96
85
|
name: yard
|
97
86
|
requirement: !ruby/object:Gem::Requirement
|
98
|
-
none: false
|
99
87
|
requirements:
|
100
|
-
- - ~>
|
88
|
+
- - "~>"
|
101
89
|
- !ruby/object:Gem::Version
|
102
90
|
version: 0.7.4
|
103
91
|
type: :development
|
104
92
|
prerelease: false
|
105
93
|
version_requirements: !ruby/object:Gem::Requirement
|
106
|
-
none: false
|
107
94
|
requirements:
|
108
|
-
- - ~>
|
95
|
+
- - "~>"
|
109
96
|
- !ruby/object:Gem::Version
|
110
97
|
version: 0.7.4
|
111
98
|
- !ruby/object:Gem::Dependency
|
112
99
|
name: redcarpet
|
113
100
|
requirement: !ruby/object:Gem::Requirement
|
114
|
-
none: false
|
115
101
|
requirements:
|
116
|
-
- - ~>
|
102
|
+
- - "~>"
|
117
103
|
- !ruby/object:Gem::Version
|
118
104
|
version: 2.0.1
|
119
105
|
type: :development
|
120
106
|
prerelease: false
|
121
107
|
version_requirements: !ruby/object:Gem::Requirement
|
122
|
-
none: false
|
123
108
|
requirements:
|
124
|
-
- - ~>
|
109
|
+
- - "~>"
|
125
110
|
- !ruby/object:Gem::Version
|
126
111
|
version: 2.0.1
|
127
112
|
- !ruby/object:Gem::Dependency
|
128
113
|
name: rake
|
129
114
|
requirement: !ruby/object:Gem::Requirement
|
130
|
-
none: false
|
131
115
|
requirements:
|
132
|
-
- -
|
116
|
+
- - ">="
|
133
117
|
- !ruby/object:Gem::Version
|
134
118
|
version: '0'
|
135
119
|
type: :development
|
136
120
|
prerelease: false
|
137
121
|
version_requirements: !ruby/object:Gem::Requirement
|
138
|
-
none: false
|
139
122
|
requirements:
|
140
|
-
- -
|
123
|
+
- - ">="
|
141
124
|
- !ruby/object:Gem::Version
|
142
125
|
version: '0'
|
143
126
|
- !ruby/object:Gem::Dependency
|
144
127
|
name: pry
|
145
128
|
requirement: !ruby/object:Gem::Requirement
|
146
|
-
none: false
|
147
129
|
requirements:
|
148
|
-
- -
|
130
|
+
- - ">="
|
149
131
|
- !ruby/object:Gem::Version
|
150
132
|
version: '0'
|
151
133
|
type: :development
|
152
134
|
prerelease: false
|
153
135
|
version_requirements: !ruby/object:Gem::Requirement
|
154
|
-
none: false
|
155
136
|
requirements:
|
156
|
-
- -
|
137
|
+
- - ">="
|
157
138
|
- !ruby/object:Gem::Version
|
158
139
|
version: '0'
|
159
140
|
description: Dinero Mail IPN stub
|
@@ -164,9 +145,10 @@ executables: []
|
|
164
145
|
extensions: []
|
165
146
|
extra_rdoc_files: []
|
166
147
|
files:
|
167
|
-
- .gitignore
|
168
|
-
- .rvmrc.sample
|
169
|
-
- .
|
148
|
+
- ".gitignore"
|
149
|
+
- ".rvmrc.sample"
|
150
|
+
- ".travis.yml"
|
151
|
+
- ".yardopts"
|
170
152
|
- Gemfile
|
171
153
|
- Gemfile.lock
|
172
154
|
- MIT-LICENSE
|
@@ -177,11 +159,13 @@ files:
|
|
177
159
|
- lib/dinero_mail_ipn/consulta_pago_response.rb
|
178
160
|
- lib/dinero_mail_ipn/item.rb
|
179
161
|
- lib/dinero_mail_ipn/malformed_response_error.rb
|
162
|
+
- lib/dinero_mail_ipn/notification_parser.rb
|
180
163
|
- lib/dinero_mail_ipn/payment.rb
|
181
164
|
- lib/dinero_mail_ipn/report.rb
|
182
165
|
- lib/dinero_mail_ipn/reporter.rb
|
183
166
|
- lib/dinero_mail_ipn/version.rb
|
184
167
|
- resources/IPN_es.pdf
|
168
|
+
- resources/validation/xsd/notifications.xsd
|
185
169
|
- script/console
|
186
170
|
- test/fixtures/ConsultaPagoErrorBadCredentials.xml
|
187
171
|
- test/fixtures/ConsultaPagoOKWith2Pays.xml
|
@@ -189,39 +173,35 @@ files:
|
|
189
173
|
- test/fixtures/ConsultaPagoOkWithoutCollections.xml
|
190
174
|
- test/fixtures/ConsultaTransacciones1-2Success.xml
|
191
175
|
- test/fixtures/ConsultaTransacciones1Success.xml
|
176
|
+
- test/fixtures/ipn-v2-notification.xml
|
177
|
+
- test/fixtures/malformed-ipn-v2-notification.xml
|
192
178
|
- test/helper.rb
|
193
179
|
- test/test_dinero_mail_ipn.rb
|
180
|
+
- test/test_notification_parser.rb
|
194
181
|
- test/test_report.rb
|
195
182
|
- test/test_reporter.rb
|
196
183
|
homepage: ''
|
197
184
|
licenses: []
|
185
|
+
metadata: {}
|
198
186
|
post_install_message:
|
199
187
|
rdoc_options: []
|
200
188
|
require_paths:
|
201
189
|
- lib
|
202
190
|
required_ruby_version: !ruby/object:Gem::Requirement
|
203
|
-
none: false
|
204
191
|
requirements:
|
205
|
-
- -
|
192
|
+
- - ">="
|
206
193
|
- !ruby/object:Gem::Version
|
207
194
|
version: '0'
|
208
|
-
segments:
|
209
|
-
- 0
|
210
|
-
hash: -2281383812012634155
|
211
195
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
212
|
-
none: false
|
213
196
|
requirements:
|
214
|
-
- -
|
197
|
+
- - ">="
|
215
198
|
- !ruby/object:Gem::Version
|
216
199
|
version: '0'
|
217
|
-
segments:
|
218
|
-
- 0
|
219
|
-
hash: -2281383812012634155
|
220
200
|
requirements: []
|
221
201
|
rubyforge_project: dinero_mail_ipn
|
222
|
-
rubygems_version:
|
202
|
+
rubygems_version: 2.2.2
|
223
203
|
signing_key:
|
224
|
-
specification_version:
|
204
|
+
specification_version: 4
|
225
205
|
summary: Dinero Mail IPN gem
|
226
206
|
test_files:
|
227
207
|
- test/helper.rb
|