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 +4 -4
- data/lib/mundipagg/CreditCardTransaction/credit_card.rb +1 -1
- data/mundipagg-api.gemspec +1 -1
- data/spec/integration/gateway_spec.rb +19 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e32af1ee4d31b551605303c418ae31b0b4e1e982
|
4
|
+
data.tar.gz: 146ec794891328fc98b5fe83c649eab26cc9ceb5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f03a9117c3a2baf57315eb5598473250ea31d0c2524f4c8327b11b9f16ba72283953fe67a333191bdf390e8ea337b9d402f2a9088f399148f64ea0e7d9a1c5f
|
7
|
+
data.tar.gz: e4b23313b6108b3564d39b2f3a85c6e939302ba5001c193f70c2b4e59897e28995c080e7376ecb7f4aba01d3c74c6444ead1ded530e419af25a07653efe33b64
|
data/mundipagg-api.gemspec
CHANGED
@@ -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.
|
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 = '
|
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.
|
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
|