mundipagg_api 1.1.0 → 1.1.1

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: 678000dc7ab4537980bc2741f8d5eb59bd8119d2
4
- data.tar.gz: 97af4cfc5964d9d9afdd873a9533a5bbb7255746
3
+ metadata.gz: e32af1ee4d31b551605303c418ae31b0b4e1e982
4
+ data.tar.gz: 146ec794891328fc98b5fe83c649eab26cc9ceb5
5
5
  SHA512:
6
- metadata.gz: c76569c9778c2088d42fdbd187ae3548eb325a80a6da0362c6adf9cb19542d4d159cbe1d9793171aa1853d8d74a682cf50846fe46674d1530831654e4398a322
7
- data.tar.gz: 87e7676fcbe54a9550ecd6b4733c93e3624231fdd6ff7578d4ec23970ed000f227d5f7a78440d26ad92fed62ae3e242b0640cdc3005af345fd7594b311283a4b
6
+ metadata.gz: 0f03a9117c3a2baf57315eb5598473250ea31d0c2524f4c8327b11b9f16ba72283953fe67a333191bdf390e8ea337b9d402f2a9088f399148f64ea0e7d9a1c5f
7
+ data.tar.gz: e4b23313b6108b3564d39b2f3a85c6e939302ba5001c193f70c2b4e59897e28995c080e7376ecb7f4aba01d3c74c6444ead1ded530e419af25a07653efe33b64
@@ -1,6 +1,6 @@
1
1
  class CreditCard
2
2
 
3
- attr_accessor :InstantBuyerKey
3
+ attr_accessor :InstantBuyKey
4
4
 
5
5
  attr_accessor :CreditCardNumber
6
6
 
@@ -2,7 +2,7 @@ Gem::Specification.new do |s|
2
2
  s.name = 'mundipagg_api'
3
3
  s.summary = 'MundiPagg Ruby Client Library'
4
4
  s.description = 'Ruby library for integrating with the MundiPagg payment web services'
5
- s.version = '1.1.0' # Major.Minor.Revision
5
+ s.version = '1.1.1' # Major.Minor.Revision
6
6
  s.author = 'MundiPagg'
7
7
  s.email = 'github@mundipagg.com'
8
8
  s.homepage = 'http://www.mundipagg.com/'
@@ -1,7 +1,7 @@
1
1
  require_relative '../../lib/mundipagg_api'
2
2
  require_relative 'test_helper'
3
3
 
4
- merchant_key = '8A2DD57F-1ED9-4153-B4CE-69683EFADAD5'
4
+ merchant_key = 'merchantKey'
5
5
  gateway = MundipaggApi.new(:production, merchant_key)
6
6
 
7
7
  RSpec.describe MundipaggApi do
@@ -145,7 +145,7 @@ RSpec.describe MundipaggApi do
145
145
  creditCardTransactionItem.CreditCard.ExpMonth = 10
146
146
  creditCardTransactionItem.CreditCard.ExpYear = 19
147
147
  creditCardTransactionItem.CreditCard.HolderName = 'Maria do Carmo'
148
- creditCardTransactionItem.CreditCard.InstantBuyerKey = '00000000-0000-0000-0000-000000000000'
148
+ creditCardTransactionItem.CreditCard.InstantBuyKey = '00000000-0000-0000-0000-000000000000'
149
149
  creditCardTransactionItem.CreditCard.SecurityCode = '123'
150
150
 
151
151
  shoppingCartItem = ShoppingCartItemCollection.new
@@ -530,4 +530,21 @@ RSpec.describe MundipaggApi do
530
530
 
531
531
  expect(response['ErrorReport']).to eq nil
532
532
  end
533
+
534
+ it 'should do a credit card transaction with instant buy key' do
535
+ # coleta dados do cartao
536
+ creditCardTransaction = CreditCardTransaction.new
537
+ creditCardTransaction.AmountInCents = 100
538
+ creditCardTransaction.CreditCard.InstantBuyKey = '1A045F96-B640-44E6-95F3-FFFC5A2F7D18'
539
+
540
+ # cria a transacao
541
+ createSaleRequest = CreateSaleRequest.new
542
+ createSaleRequest.CreditCardTransactionCollection << creditCardTransaction
543
+
544
+ # faz a requisicao de criação de transacao, retorna um hash com a resposta
545
+ response = gateway.CreateSale(createSaleRequest)
546
+
547
+ expect(response['ErrorReport']).to eq nil
548
+ end
549
+
533
550
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mundipagg_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - MundiPagg