mundipagg 1.4.0 → 1.4.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -198,7 +198,7 @@ module Mundipagg
198
198
  'mun:Name' => request.buyer.name,
199
199
  'mun:PersonTypeEnum' => request.buyer.personTypeEnum,
200
200
  'mun:TaxDocumentNumber' => request.buyer.taxDocumentNumber,
201
- 'mun:TaxDocumentNumberTypeEnum' => request.buyer.taxDocumentTypeEnum,
201
+ 'mun:TaxDocumentTypeEnum' => request.buyer.taxDocumentTypeEnum,
202
202
  'mun:TwitterId' => request.buyer.twitterId,
203
203
  'mun:WorkPhone' => request.buyer.workPhone,
204
204
  'mun:BuyerAddressCollection' => nil
@@ -385,6 +385,7 @@ module Mundipagg
385
385
  log enable_log
386
386
  log_level level
387
387
  filters filters
388
+ ssl_verify_mode :none
388
389
  namespaces 'xmlns:mun' => 'http://schemas.datacontract.org/2004/07/MundiPagg.One.Service.DataContracts'
389
390
  end
390
391
 
@@ -2,8 +2,8 @@ module Mundipagg
2
2
  module Version
3
3
  Major = 1
4
4
  Minor = 4
5
- Revision = 0
5
+ Revision = 1
6
6
 
7
7
  String = "#{Major}.#{Minor}.#{Revision}"
8
8
  end
9
- end
9
+ end
@@ -1,5 +1,5 @@
1
1
  Feature: Credit Card Transaction
2
- I want to create a order with one credit card transaction.
2
+ I want to create a order with one credit card transaction.
3
3
 
4
4
  Scenario: Pay a order using credit card and installment
5
5
  Given I have purchase three products with a total cost of BRL 250
@@ -28,10 +28,16 @@ Feature: Credit Card Transaction
28
28
  When I pay another order with the instant buy key
29
29
  Then the transaction status should be Captured
30
30
 
31
+ Scenario: Pay a order using credit card and installment
32
+ Given I have purchase three products with Shopping Cart a total cost of BRL 300
33
+ And I will pay using a Visa credit card in 3 installments
34
+ And I will send to Mundipagg
35
+ Then the order amount in cents should be 30000
36
+ And the transaction status should be Captured
31
37
 
32
- Scenario: Pay a order using credit card and installment
33
- Given I have purchase three products with Shopping Cart a total cost of BRL 300
34
- And I will pay using a Visa credit card in 3 installments
35
- And I will send to Mundipagg
36
- Then the order amount in cents should be 30000
37
- And the transaction status should be Captured
38
+ Scenario: Pay a order using credit card and installment
39
+ Given I have purchase three products with Buyer data and a total cost of BRL 300
40
+ And I will pay using a Visa credit card in 3 installments
41
+ And I will send to Mundipagg
42
+ Then the order amount in cents should be 30000
43
+ And the transaction status should be Captured
@@ -8,6 +8,7 @@ Before do
8
8
  @order.merchantKey = TestConfiguration::Merchant::MerchantKey
9
9
  @transaction = Mundipagg::CreditCardTransaction.new
10
10
  @order.creditCardTransactionCollection << @transaction
11
+ @buyer = Mundipagg::Buyer.new
11
12
  @response = Hash.new
12
13
  @shoppingCart = Mundipagg::ShoppingCart.new
13
14
  @shoppingCartItem = Mundipagg::ShoppingCartItem.new
@@ -41,8 +42,29 @@ Given(/^I have purchase three products with Shopping Cart a total cost of (\w+)
41
42
  @shoppingCart.shoppingCartItemCollection << @shoppingCartItem
42
43
 
43
44
  @order.shoppingCartCollection << @shoppingCart
45
+
46
+ end
47
+
48
+
49
+ Given(/^I have purchase three products with Buyer data and a total cost of (\w+) (\d+)$/) do |currency,amount|
50
+ amount = BigDecimal.new(amount.gsub(',', '.'))
51
+ @order.amountInCents = (amount * 100).to_i
52
+ @order.amountInCentsToConsiderPaid = (amount * 100).to_i
53
+ @order.currencyIsoEnum = 'BRL'
54
+
55
+ @buyer.buyerReference = 'Test'
56
+ @buyer.email = 'a@a.com'
57
+ @buyer.homePhone = '999999999'
58
+ @buyer.mobilePhone = '999999999'
59
+ @buyer.workPhone = '999999999'
60
+ @buyer.name = 'Test'
61
+ @buyer.taxDocumentNumber = '02156968975'
62
+
63
+
64
+ @order.buyer = @buyer
44
65
  end
45
66
 
67
+
46
68
  Given(/^I will pay using a (\w+) credit card in (\d+) installments$/) do |brand,installments|
47
69
  @transaction.creditCardBrandEnum = brand
48
70
  @transaction.installmentCount = installments
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mundipagg
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.4.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-06-29 00:00:00.000000000 Z
12
+ date: 2015-07-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: savon