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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9d7595fd1d1f234fd4bac79b76a26f3fba765453
4
- data.tar.gz: 4cbcf41812d7c1c68fd1a066b9b73809ed842674
3
+ metadata.gz: 55265216c6c744da6ed594d1b649938b6b62f43f
4
+ data.tar.gz: 91758a2acfaf782b2c760a9c0e7a8ac80b2caae8
5
5
  SHA512:
6
- metadata.gz: 29a2cca86acc7b5e1ded9a53a6e606cb5d2244aceda394b38be4ae89afc75c3d5eb73ec21ca1f0bb2d2a8e46318b0924da29a04754b7982ac2ef8d1919d7a800
7
- data.tar.gz: 4c0c8e72bdc15f72015c784e0990a2c15378afadb6f21a97a7cf9657425f310eb097c5bb999dd647022b2edfa6a6485b3b65b3beac0b74c2a8165d10209cfdd8
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-integration-api.png?branch=master)](https://travis-ci.org/mundipagg/ruby-integration-api)[![Gem Version](https://badge.fury.io/rb/mundipagg.png)](http://badge.fury.io/rb/mundipagg)
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
@@ -7,3 +7,4 @@ require 'mundipagg/Buyer'
7
7
  require 'mundipagg/QueryOrderRequest'
8
8
  require 'mundipagg/ManageOrderRequest'
9
9
  require 'mundipagg/Recurrency'
10
+ require 'mundipagg/post_notification'
@@ -315,7 +315,7 @@ module Mundipagg
315
315
  @log_level = :error
316
316
  end
317
317
 
318
- level = @log_level
318
+ level = :debug
319
319
 
320
320
  client = Savon.client do
321
321
  wsdl url
@@ -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
@@ -2,7 +2,7 @@ module Mundipagg
2
2
  module Version
3
3
  Major = 1
4
4
  Minor = 2
5
- Revision = 3
5
+ Revision = 4
6
6
 
7
7
  String = "#{Major}.#{Minor}.#{Revision}"
8
8
  end
@@ -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 'mundipagg/post_notification'
4
+ require 'bigdecimal'
5
5
  require_relative '../../test_helper.rb'
6
- require_relative '../../test_config.rb'
6
+ require_relative '../../test_configuration.rb'
data/tests/test_helper.rb CHANGED
@@ -64,6 +64,6 @@ class TestHelper
64
64
  root['OrderReference'] = create_order_result[:order_reference]
65
65
  root['OrderStatus'] = manage_transaction_reuslt[:order_status_enum]
66
66
 
67
- return Gyoku.xml(hash)
67
+ return CGI::escapeHTML(Gyoku.xml(hash))
68
68
  end
69
69
  end
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.3
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-09-29 00:00:00.000000000 Z
11
+ date: 2013-10-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: savon