mundipagg 1.2.3 → 1.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/lib/mundipagg.rb +1 -0
- data/lib/mundipagg/gateway.rb +1 -1
- data/lib/mundipagg/post_notification.rb +1 -1
- data/lib/mundipagg/version.rb +1 -1
- data/tests/features/step_definitions/boleto_steps.rb +1 -1
- data/tests/features/step_definitions/credit_card_steps.rb +2 -5
- data/tests/features/step_definitions/post_notification.rb +2 -0
- data/tests/features/support/env.rb +2 -2
- data/tests/test_helper.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: 55265216c6c744da6ed594d1b649938b6b62f43f
|
4
|
+
data.tar.gz: 91758a2acfaf782b2c760a9c0e7a8ac80b2caae8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 051607d759ba7e223df939295f2868431f72d97fda1834c877bea3634a039ec56a1b416a77badc5176012bc3474f2ac86cada8125e1cffc0e74d595b62ac64aa
|
7
|
+
data.tar.gz: 9d29a62772cb890bee12bcb5a88c237764d3e437b50e24ffc5f96e49b60837a3069ffb3067b5362156f07fb99ebcb13018d80fe7620782ab5f609e4026cb2995
|
data/README.md
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
MundiPagg Ruby Client Library
|
2
2
|
====================
|
3
3
|
|
4
|
-
[![Build Status](https://travis-ci.org/mundipagg/ruby-
|
4
|
+
[![Build Status](https://travis-ci.org/mundipagg/mundipagg-ruby-api.png?branch=master)](https://travis-ci.org/mundipagg/mundipagg-ruby-api)[![Gem Version](https://badge.fury.io/rb/mundipagg.png)](http://badge.fury.io/rb/mundipagg)
|
5
5
|
|
6
6
|
Ruby API for integration with MundiPagg payment web services.
|
7
7
|
|
8
|
-
## Dependencies
|
8
|
+
## Dependencies
|
9
9
|
* [Savon 2.3.0](http://savonrb.com/version2/)
|
10
10
|
* [Nori 2.3.0](https://github.com/savonrb/nori)
|
11
11
|
|
12
12
|
Unit tests made with [Cucumber](https://github.com/cucumber/cucumber) and [RSpec](https://github.com/rspec/rspec)
|
13
13
|
|
14
|
-
## Documentation
|
14
|
+
## Documentation
|
15
15
|
* [Wiki](https://github.com/mundipagg/mundipagg-ruby-api/wiki)
|
16
16
|
* [RubyDoc](http://rubydoc.info/github/mundipagg/mundipagg-ruby-api/)
|
17
17
|
|
data/lib/mundipagg.rb
CHANGED
data/lib/mundipagg/gateway.rb
CHANGED
@@ -11,7 +11,7 @@ module Mundipagg
|
|
11
11
|
def self.ParseNotification(xml)
|
12
12
|
|
13
13
|
nori = Nori.new(:convert_tags_to => lambda { |tag| PostNotification.to_underscore(tag).to_sym })
|
14
|
-
xml_hash = nori.parse(xml)
|
14
|
+
xml_hash = nori.parse(CGI::unescapeHTML(xml))
|
15
15
|
|
16
16
|
return xml_hash
|
17
17
|
end
|
data/lib/mundipagg/version.rb
CHANGED
@@ -6,6 +6,7 @@ Before do
|
|
6
6
|
@boleto = Mundipagg::BoletoTransaction.new
|
7
7
|
@response = Hash.new
|
8
8
|
@order.merchantKey = TestConfiguration::Merchant::MerchantKey
|
9
|
+
|
9
10
|
end
|
10
11
|
|
11
12
|
|
@@ -47,4 +48,3 @@ Then(/^The boleto status should be (\w+)$/) do |status|
|
|
47
48
|
transaction = @response[:create_order_response][:create_order_result][:boleto_transaction_result_collection][:boleto_transaction_result]
|
48
49
|
transaction[:boleto_transaction_status_enum].to_s == status
|
49
50
|
end
|
50
|
-
|
@@ -1,16 +1,14 @@
|
|
1
|
-
begin require 'rspec/expectations'; rescue LoadError; require 'spec/expectations'; end
|
2
|
-
$:.unshift(File.dirname(__FILE__) + '/../../../lib')
|
3
|
-
require 'bigdecimal'
|
4
|
-
require 'mundipagg'
|
5
1
|
|
6
2
|
#Scenario 1:
|
7
3
|
Before do
|
4
|
+
|
8
5
|
@client = Mundipagg::Gateway.new :test
|
9
6
|
@order = Mundipagg::CreateOrderRequest.new
|
10
7
|
@order.merchantKey = TestConfiguration::Merchant::MerchantKey
|
11
8
|
@transaction = Mundipagg::CreditCardTransaction.new
|
12
9
|
@order.creditCardTransactionCollection << @transaction
|
13
10
|
@response = Hash.new
|
11
|
+
|
14
12
|
end
|
15
13
|
|
16
14
|
|
@@ -73,4 +71,3 @@ Given(/^I will pay using a (\w+) credit card without installment$/) do |brand|
|
|
73
71
|
@transaction.creditCardOperationEnum = Mundipagg::CreditCardTransaction.OperationEnum[:AuthAndCapture]
|
74
72
|
|
75
73
|
end
|
76
|
-
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# encoding: UTF-8
|
2
2
|
|
3
3
|
Before do
|
4
|
+
|
4
5
|
@client = Mundipagg::Gateway.new :test
|
5
6
|
@client.log_level = :error
|
6
7
|
|
@@ -48,6 +49,7 @@ Given(/^I have pre authorized a credit card transaction of (\w+) (\d+)\.(\d+)$/)
|
|
48
49
|
end
|
49
50
|
|
50
51
|
Given(/^I captured the transaction$/) do
|
52
|
+
|
51
53
|
@manage_order.orderKey = @response[:order_key]
|
52
54
|
|
53
55
|
@manage_order.manageOrderOperationEnum = Mundipagg::ManageOrderRequest.OperationEnum[:Capture]
|
@@ -1,6 +1,6 @@
|
|
1
1
|
begin require 'rspec/expectations'; rescue LoadError; require 'spec/expectations'; end
|
2
2
|
$:.unshift(File.dirname(__FILE__) + '/../../../lib')
|
3
3
|
require 'mundipagg'
|
4
|
-
require '
|
4
|
+
require 'bigdecimal'
|
5
5
|
require_relative '../../test_helper.rb'
|
6
|
-
require_relative '../../
|
6
|
+
require_relative '../../test_configuration.rb'
|
data/tests/test_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mundipagg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- MundiPagg
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-10-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: savon
|