mundipagg 1.2.2 → 1.2.3

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 9d7595fd1d1f234fd4bac79b76a26f3fba765453
4
+ data.tar.gz: 4cbcf41812d7c1c68fd1a066b9b73809ed842674
5
+ SHA512:
6
+ metadata.gz: 29a2cca86acc7b5e1ded9a53a6e606cb5d2244aceda394b38be4ae89afc75c3d5eb73ec21ca1f0bb2d2a8e46318b0924da29a04754b7982ac2ef8d1919d7a800
7
+ data.tar.gz: 4c0c8e72bdc15f72015c784e0990a2c15378afadb6f21a97a7cf9657425f310eb097c5bb999dd647022b2edfa6a6485b3b65b3beac0b74c2a8165d10209cfdd8
data/README.md CHANGED
@@ -1,9 +1,7 @@
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)
5
-
6
- [![Gem Version](https://badge.fury.io/rb/mundipagg.png)](http://badge.fury.io/rb/mundipagg)
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)
7
5
 
8
6
  Ruby API for integration with MundiPagg payment web services.
9
7
 
@@ -13,18 +11,23 @@ Ruby API for integration with MundiPagg payment web services.
13
11
 
14
12
  Unit tests made with [Cucumber](https://github.com/cucumber/cucumber) and [RSpec](https://github.com/rspec/rspec)
15
13
 
14
+ ## Documentation
15
+ * [Wiki](https://github.com/mundipagg/mundipagg-ruby-api/wiki)
16
+ * [RubyDoc](http://rubydoc.info/github/mundipagg/mundipagg-ruby-api/)
17
+
18
+
16
19
  ## Usage
17
20
  Below a simple exemple of an order with one credit card transaction.
18
21
 
19
- ````Ruby
20
- > gem install mundipagg
21
- ````
22
+ ```sh
23
+ $ gem install mundipagg
24
+ ```
22
25
 
23
- ````Ruby
26
+ ```ruby
24
27
  require 'mundipagg'
25
28
 
26
29
  #Create the client instance
27
- client = Mundipagg::Gateway.new :test #API test environment
30
+ client = Mundipagg::Gateway.new :production
28
31
 
29
32
  #Create the order
30
33
  order = Mundipagg::CreateOrderRequest.new
@@ -55,11 +58,11 @@ credit.expirationYear = 2020
55
58
  order.creditCardTransactionCollection << credit
56
59
 
57
60
  response = client.CreateOrder(order)
58
- ````
61
+ ```
59
62
 
60
63
  The response variable will contain a Hash like the one below.
61
64
 
62
- ```Ruby
65
+ ```ruby
63
66
  {:create_order_response=>
64
67
  {:create_order_result=>
65
68
  {:buyer_key=>"00000000-0000-0000-0000-000000000000",
@@ -102,9 +105,6 @@ The response variable will contain a Hash like the one below.
102
105
  :@xmlns=>"http://tempuri.org/"}}
103
106
  ```
104
107
 
105
- ## More information
106
-
107
- [RubyDoc](http://rubydoc.info/github/mundipagg/mundipagg-ruby-api/)
108
108
 
109
109
  ## LICENSE
110
110
  See the LICENSE file.
@@ -7,7 +7,7 @@ module Mundipagg
7
7
  # @return [Guid] Unique order identification. Generated by MundiPagg.
8
8
  attr_accessor :orderKey
9
9
 
10
- # @return [Guid] Custom order identification.
10
+ # @return [String] Custom order identification.
11
11
  attr_accessor :orderReference
12
12
 
13
13
  # If not send, it will be generate automatically in the webservice and returned in response.
@@ -19,7 +19,7 @@ module Mundipagg
19
19
  attr_accessor :environment
20
20
 
21
21
  # @return [String] URL that points to the simulator WSDL
22
- @@WEBSERVICE_TEST_URL = 'http://simulator.mundipaggone.com/One/MundiPaggService.svc?wsdl'
22
+ @@WEBSERVICE_TEST_URL = 'https://transaction.mundipaggone.com/MundiPaggService.svc?wsdl'
23
23
 
24
24
  # @return [String] URL that points to the production WSDL
25
25
  @@WEBSERVICE_PRODUCTION_URL = 'https://transaction.mundipaggone.com/MundiPaggService.svc?wsdl'
@@ -257,6 +257,10 @@ module Mundipagg
257
257
 
258
258
  creditCardRequest.creditCardTransactionCollection.each do |transaction|
259
259
 
260
+ if environment == :test
261
+ transaction.paymentMethodCode = 1 # Simulator payment code
262
+ end
263
+
260
264
  transaction_hash = {
261
265
  'mun:AmountInCents' => transaction.amountInCents,
262
266
  'mun:CreditCardBrandEnum' => transaction.creditCardBrandEnum.to_s,
@@ -305,7 +309,6 @@ module Mundipagg
305
309
  else
306
310
  url = @@WEBSERVICE_TEST_URL
307
311
  end
308
-
309
312
  savon_levels = { :debug => 0, :info => 1, :warn => 2, :error => 3 }
310
313
 
311
314
  if not savon_levels.include? @log_level
@@ -2,7 +2,7 @@ module Mundipagg
2
2
  module Version
3
3
  Major = 1
4
4
  Minor = 2
5
- Revision = 2
5
+ Revision = 3
6
6
 
7
7
  String = "#{Major}.#{Minor}.#{Revision}"
8
8
  end
data/lib/mundipagg.rb CHANGED
@@ -6,3 +6,4 @@ require 'mundipagg/CreditCardTransaction'
6
6
  require 'mundipagg/Buyer'
7
7
  require 'mundipagg/QueryOrderRequest'
8
8
  require 'mundipagg/ManageOrderRequest'
9
+ require 'mundipagg/Recurrency'
@@ -5,7 +5,7 @@ Before do
5
5
  @order = Mundipagg::CreateOrderRequest.new
6
6
  @boleto = Mundipagg::BoletoTransaction.new
7
7
  @response = Hash.new
8
- @order.merchantKey = '73611285-C8F7-45A4-8F50-579182627242'
8
+ @order.merchantKey = TestConfiguration::Merchant::MerchantKey
9
9
  end
10
10
 
11
11
 
@@ -7,7 +7,7 @@ require 'mundipagg'
7
7
  Before do
8
8
  @client = Mundipagg::Gateway.new :test
9
9
  @order = Mundipagg::CreateOrderRequest.new
10
- @order.merchantKey = '73611285-C8F7-45A4-8F50-579182627242'
10
+ @order.merchantKey = TestConfiguration::Merchant::MerchantKey
11
11
  @transaction = Mundipagg::CreditCardTransaction.new
12
12
  @order.creditCardTransactionCollection << @transaction
13
13
  @response = Hash.new
@@ -7,9 +7,9 @@ Before do
7
7
  @order = Mundipagg::CreateOrderRequest.new
8
8
  @manage_order = Mundipagg::ManageOrderRequest.new
9
9
 
10
- @manage_order.merchantKey = '73611285-C8F7-45A4-8F50-579182627242'
11
- @order.merchantKey = '73611285-C8F7-45A4-8F50-579182627242'
12
-
10
+ @manage_order.merchantKey = TestConfiguration::Merchant::MerchantKey
11
+ @order.merchantKey = TestConfiguration::Merchant::MerchantKey
12
+
13
13
  @transaction = Mundipagg::CreditCardTransaction.new
14
14
  @order.creditCardTransactionCollection << @transaction
15
15
 
@@ -3,3 +3,4 @@ $:.unshift(File.dirname(__FILE__) + '/../../../lib')
3
3
  require 'mundipagg'
4
4
  require 'mundipagg/post_notification'
5
5
  require_relative '../../test_helper.rb'
6
+ require_relative '../../test_config.rb'
@@ -0,0 +1,5 @@
1
+ module TestConfiguration
2
+ module Merchant
3
+ MerchantKey = '00000000-0000-0000-0000-000000000000'
4
+ end
5
+ end
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mundipagg
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
5
- prerelease:
4
+ version: 1.2.3
6
5
  platform: ruby
7
6
  authors:
8
7
  - MundiPagg
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-08-04 00:00:00.000000000 Z
11
+ date: 2013-09-29 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: savon
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - '='
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - '='
28
25
  - !ruby/object:Gem::Version
@@ -54,31 +51,31 @@ files:
54
51
  - tests/features/step_definitions/credit_card_steps.rb
55
52
  - tests/features/step_definitions/post_notification.rb
56
53
  - tests/features/support/env.rb
54
+ - tests/test_configuration.rb
57
55
  - tests/test_helper.rb
58
56
  - mundipagg.gemspec
59
57
  homepage: http://www.mundipagg.com/
60
58
  licenses:
61
59
  - Apache 2.0
60
+ metadata: {}
62
61
  post_install_message:
63
62
  rdoc_options: []
64
63
  require_paths:
65
64
  - lib
66
65
  required_ruby_version: !ruby/object:Gem::Requirement
67
- none: false
68
66
  requirements:
69
- - - ! '>='
67
+ - - '>='
70
68
  - !ruby/object:Gem::Version
71
69
  version: 1.9.2
72
70
  required_rubygems_version: !ruby/object:Gem::Requirement
73
- none: false
74
71
  requirements:
75
- - - ! '>='
72
+ - - '>='
76
73
  - !ruby/object:Gem::Version
77
74
  version: '0'
78
75
  requirements: []
79
76
  rubyforge_project:
80
- rubygems_version: 1.8.25
77
+ rubygems_version: 2.0.6
81
78
  signing_key:
82
- specification_version: 3
79
+ specification_version: 4
83
80
  summary: MundiPagg Ruby Client Library
84
81
  test_files: []