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 +7 -0
- data/README.md +13 -13
- data/lib/mundipagg/QueryOrderRequest.rb +1 -1
- data/lib/mundipagg/gateway.rb +5 -2
- data/lib/mundipagg/version.rb +1 -1
- data/lib/mundipagg.rb +1 -0
- data/tests/features/step_definitions/boleto_steps.rb +1 -1
- data/tests/features/step_definitions/credit_card_steps.rb +1 -1
- data/tests/features/step_definitions/post_notification.rb +3 -3
- data/tests/features/support/env.rb +1 -0
- data/tests/test_configuration.rb +5 -0
- metadata +8 -11
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
|
-
[](https://travis-ci.org/mundipagg/ruby-integration-api)
|
|
5
|
-
|
|
6
|
-
[](http://badge.fury.io/rb/mundipagg)
|
|
4
|
+
[](https://travis-ci.org/mundipagg/ruby-integration-api)[](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
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
```sh
|
|
23
|
+
$ gem install mundipagg
|
|
24
|
+
```
|
|
22
25
|
|
|
23
|
-
|
|
26
|
+
```ruby
|
|
24
27
|
require 'mundipagg'
|
|
25
28
|
|
|
26
29
|
#Create the client instance
|
|
27
|
-
client = Mundipagg::Gateway.new :
|
|
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
|
-
```
|
|
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 [
|
|
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.
|
data/lib/mundipagg/gateway.rb
CHANGED
|
@@ -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 = '
|
|
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
|
data/lib/mundipagg/version.rb
CHANGED
data/lib/mundipagg.rb
CHANGED
|
@@ -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 =
|
|
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 =
|
|
11
|
-
@order.merchantKey =
|
|
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
|
|
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.
|
|
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-
|
|
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:
|
|
77
|
+
rubygems_version: 2.0.6
|
|
81
78
|
signing_key:
|
|
82
|
-
specification_version:
|
|
79
|
+
specification_version: 4
|
|
83
80
|
summary: MundiPagg Ruby Client Library
|
|
84
81
|
test_files: []
|