mundipagg 1.2.6 → 1.2.7

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: e6dbd7cbad0fdb6a07f7172a85ff129ed90e1fa9
4
- data.tar.gz: 5899452b4b573fd14246a01c6f2f226cd4bf06c8
3
+ metadata.gz: 4fab418a639f550403738600b1c324386a3dac0b
4
+ data.tar.gz: 9707f232cf16a4bbf41087c32cea15e34480877e
5
5
  SHA512:
6
- metadata.gz: 98bb13f6e9162b1c0a3ba83c9784de79980448c403b7390ec313077b1d72903c2906057954bd7bc0827f7b2109ed18cb37652f18577e63f25226958c38bc680f
7
- data.tar.gz: fd0c9c4a9f2243c17744bfe356cbb5022d50ed3d2d585c668c41a470eaf8583c1f1544913ded20c0ec3ba2ce091fb931291b3d2ada64dc93e9e5712d49979838
6
+ metadata.gz: 97e07bb9ef9e37cc4314c21413d064a169598682e06883866411c83475bac6c312a66abb2355f17e140bc62ff0b0a01051dc4a9ccfbcf2b9315660b01d522933
7
+ data.tar.gz: 930a0b84b398b2415627291e923d2bb998278099e76606b842048d40903d74c82d061b2c4431db335c30d2b5936da2356efbda5997244eaeb3e971886032c5c7
@@ -316,12 +316,14 @@ module Mundipagg
316
316
  end
317
317
 
318
318
  level = :debug
319
- enable_log = true
320
-
319
+ enable_log = true
320
+ filters = [:CreditCardNumber,
321
+ :SecurityCode,
322
+ :MerchantKey]
321
323
 
322
324
  if @log_level == :none
323
- enable_log = false
324
325
  level = :error
326
+ enable_log = false
325
327
  end
326
328
 
327
329
 
@@ -329,6 +331,7 @@ module Mundipagg
329
331
  wsdl url
330
332
  log enable_log
331
333
  log_level level
334
+ filters filters
332
335
  namespaces 'xmlns:mun' => 'http://schemas.datacontract.org/2004/07/MundiPagg.One.Service.DataContracts'
333
336
  end
334
337
 
@@ -2,7 +2,7 @@ module Mundipagg
2
2
  module Version
3
3
  Major = 1
4
4
  Minor = 2
5
- Revision = 6
5
+ Revision = 7
6
6
 
7
7
  String = "#{Major}.#{Minor}.#{Revision}"
8
8
  end
@@ -14,3 +14,9 @@ Feature: Credit Card Transaction
14
14
  And I will send to Mundipagg
15
15
  Then the order amount in cents should be 10029
16
16
  And the transaction status should be Captured
17
+
18
+ Scenario: Keeping sensible information unlogged
19
+ Given I have purchase three products with a total cost of BRL 100,29
20
+ And I will pay using a Visa credit card without installment
21
+ And I will send to Mundipagg
22
+ Then the log file doesn't contain sensible information
@@ -2,7 +2,7 @@
2
2
 
3
3
  Before do
4
4
  @client = Mundipagg::Gateway.new :test
5
- @client.log_level = :none
5
+ @client.log_level = :debug
6
6
  @order = Mundipagg::CreateOrderRequest.new
7
7
  @boleto = Mundipagg::BoletoTransaction.new
8
8
  @response = Hash.new
@@ -39,7 +39,6 @@ Given(/^I send to Mundipagg$/) do
39
39
  @response = @client.CreateOrder(@order)
40
40
  end
41
41
 
42
-
43
42
  Then(/^The order amount in cents should be (\d+)$/) do |amountInCents|
44
43
  transaction = @response[:create_order_response][:create_order_result][:boleto_transaction_result_collection][:boleto_transaction_result]
45
44
  transaction[:amount_in_cents].to_s.should == amountInCents
@@ -34,7 +34,15 @@ Given(/^I will pay using a (\w+) credit card in (\d+) installments$/) do |brand,
34
34
  end
35
35
 
36
36
  Given(/^I will send to Mundipagg$/) do
37
- @response = @client.CreateOrder(@order)
37
+ old_stdout = $stdout
38
+ @stdout = StringIO.new
39
+ $stdout = @stdout
40
+ @client.log_level = :debug
41
+ begin
42
+ @response = @client.CreateOrder(@order)
43
+ ensure
44
+ $stdout = old_stdout
45
+ end
38
46
  end
39
47
 
40
48
  Then(/^the order amount in cents should be (\d+)$/) do |amountInCents|
@@ -72,3 +80,11 @@ Given(/^I will pay using a (\w+) credit card without installment$/) do |brand|
72
80
  @transaction.creditCardOperationEnum = Mundipagg::CreditCardTransaction.OperationEnum[:AuthAndCapture]
73
81
 
74
82
  end
83
+
84
+ #Scenario 3:
85
+
86
+ Then(/^the log file doesn't contain sensible information$/) do
87
+ @stdout.string.should_not include(@transaction.creditCardNumber)
88
+ @stdout.string.should_not include(@transaction.securityCode)
89
+ @stdout.string.should_not include(@order.merchantKey)
90
+ end
@@ -1,7 +1,7 @@
1
1
  # encoding: UTF-8
2
2
  Before do
3
3
 
4
- @client = Mundipagg::Gateway.new :test
4
+ @client = Mundipagg::Gateway.new :production
5
5
  @client.log_level = :none
6
6
 
7
7
  @order = Mundipagg::CreateOrderRequest.new
@@ -24,6 +24,7 @@ Given(/^I have pre authorized a credit card transaction of (\w+) (\d+)\.(\d+)$/)
24
24
  @order.amountInCents = (amount_decimal * 100).to_i
25
25
  @order.amountInCentsToConsiderPaid = (amount_decimal * 100).to_i
26
26
 
27
+
27
28
  @transaction.amountInCents = @order.amountInCents;
28
29
  @transaction.creditCardBrandEnum = Mundipagg::CreditCardTransaction.BrandEnum[:Visa]
29
30
  @transaction.creditCardOperationEnum = Mundipagg::CreditCardTransaction.OperationEnum[:AuthOnly] #Pre-authorization
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.6
4
+ version: 1.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - MundiPagg
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-21 00:00:00.000000000 Z
11
+ date: 2014-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: savon
@@ -79,4 +79,3 @@ signing_key:
79
79
  specification_version: 4
80
80
  summary: MundiPagg Ruby Client Library
81
81
  test_files: []
82
- has_rdoc: