mundipagg_sdk 1.3.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +13 -5
- data/LICENSE +190 -190
- data/README.md +61 -61
- data/lib/gateway/Address/billing_address.rb +33 -33
- data/lib/gateway/Address/buyer_address.rb +38 -38
- data/lib/gateway/Address/delivery_address.rb +34 -34
- data/lib/gateway/BoletoTransaction/boleto_transaction.rb +40 -40
- data/lib/gateway/BoletoTransaction/boleto_transaction_options.rb +16 -16
- data/lib/gateway/BoletoTransaction/boleto_transaction_report_file.rb +22 -22
- data/lib/gateway/CreditCardTransaction/credit_card.rb +30 -30
- data/lib/gateway/CreditCardTransaction/credit_card_transaction.rb +33 -33
- data/lib/gateway/CreditCardTransaction/credit_card_transaction_options.rb +28 -28
- data/lib/gateway/CreditCardTransaction/credit_card_transaction_report_file.rb +31 -31
- data/lib/gateway/CreditCardTransaction/manage_credit_card_transaction.rb +14 -14
- data/lib/gateway/CreditCardTransaction/retry_sale_credit_card_transaction.rb +14 -14
- data/lib/gateway/Gateway.rb +525 -627
- data/lib/gateway/InstantBuyData/create_instant_buy_data_request.rb +30 -30
- data/lib/gateway/InstantBuyData/update_instant_buy_data_request.rb +10 -10
- data/lib/gateway/Merchant/merchant.rb +12 -12
- data/lib/gateway/OnlineDebit/online_debit_transaction_report_file.rb +21 -21
- data/lib/gateway/Order/order.rb +13 -13
- data/lib/gateway/Order/order_transaction_report_file.rb +8 -8
- data/lib/gateway/Parsers/boleto_transaction_parser.rb +33 -33
- data/lib/gateway/Parsers/credit_card_transaction_parser.rb +42 -42
- data/lib/gateway/Parsers/header_parser.rb +16 -16
- data/lib/gateway/Parsers/online_debit_transaction_parser.rb +32 -32
- data/lib/gateway/Parsers/trailer_parser.rb +16 -16
- data/lib/gateway/Person/buyer.rb +32 -32
- data/lib/gateway/Person/create_buyer_request.rb +22 -22
- data/lib/gateway/Person/person.rb +48 -48
- data/lib/gateway/Recurrency/recurrency.rb +24 -24
- data/lib/gateway/Sale/create_sale_request.rb +37 -37
- data/lib/gateway/Sale/manage_sale_request.rb +18 -18
- data/lib/gateway/Sale/query_sale_request.rb +37 -37
- data/lib/gateway/Sale/request_data.rb +21 -21
- data/lib/gateway/Sale/retry_sale_options.rb +15 -15
- data/lib/gateway/Sale/retry_sale_request.rb +23 -23
- data/lib/gateway/Sale/sale_data.rb +30 -30
- data/lib/gateway/Sale/sale_order_data.rb +18 -18
- data/lib/gateway/SalesOption.rb +18 -18
- data/lib/gateway/ShoppingCart/shopping_cart.rb +27 -27
- data/lib/gateway/ShoppingCart/shopping_cart_item.rb +24 -24
- data/lib/gateway/Trailer.rb +8 -8
- data/lib/gateway/header.rb +7 -7
- data/lib/gateway/post_notification.rb +31 -31
- data/lib/gateway/transaction_report_file.rb +47 -47
- data/lib/mundipagg_sdk.rb +61 -61
- data/mundipagg_sdk.gemspec +20 -20
- data/spec/integration/gateway_spec.rb +1023 -1022
- data/spec/integration/test_helper.rb +68 -68
- data/spec/spec_helper.rb +96 -96
- metadata +33 -33
@@ -1,48 +1,48 @@
|
|
1
|
-
module Gateway
|
2
|
-
|
3
|
-
class TransactionReportFile
|
4
|
-
def TransactionReportFileParser(file_to_parse)
|
5
|
-
response = {}
|
6
|
-
response['CreditCardTransaction'] = []
|
7
|
-
response['OnlineDebitTransaction'] = []
|
8
|
-
response['BoletoTransaction'] = []
|
9
|
-
|
10
|
-
header_parser = HeaderParser.new
|
11
|
-
credit_card_parser = CreditCardTransactionParser.new
|
12
|
-
boleto_parser = BoletoTransactionParser.new
|
13
|
-
online_debit_parser = OnlineDebitTransactionParser.new
|
14
|
-
trailer_parser = TrailerParser.new
|
15
|
-
|
16
|
-
begin
|
17
|
-
response_splited = file_to_parse.split("\n")
|
18
|
-
|
19
|
-
response_splited.each do |item|
|
20
|
-
|
21
|
-
to_parse_item = item.split(',')
|
22
|
-
if to_parse_item[0] == '01'
|
23
|
-
response['Header'] = header_parser.Parse(to_parse_item)
|
24
|
-
end
|
25
|
-
|
26
|
-
if to_parse_item[0] == '20'
|
27
|
-
response['CreditCardTransaction'] << credit_card_parser.Parse(to_parse_item)
|
28
|
-
end
|
29
|
-
|
30
|
-
if to_parse_item[0] == '40'
|
31
|
-
response['OnlineDebitTransaction'] << online_debit_parser.Parse(to_parse_item)
|
32
|
-
end
|
33
|
-
|
34
|
-
if to_parse_item[0] == '30'
|
35
|
-
response['BoletoTransaction'] << boleto_parser.Parse(to_parse_item)
|
36
|
-
end
|
37
|
-
|
38
|
-
if to_parse_item[0] == '99'
|
39
|
-
response['Trailer'] = trailer_parser.Parse(to_parse_item)
|
40
|
-
end
|
41
|
-
end
|
42
|
-
rescue Exception => err
|
43
|
-
return err
|
44
|
-
end
|
45
|
-
return response
|
46
|
-
end
|
47
|
-
end
|
1
|
+
module Gateway
|
2
|
+
|
3
|
+
class TransactionReportFile
|
4
|
+
def TransactionReportFileParser(file_to_parse)
|
5
|
+
response = {}
|
6
|
+
response['CreditCardTransaction'] = []
|
7
|
+
response['OnlineDebitTransaction'] = []
|
8
|
+
response['BoletoTransaction'] = []
|
9
|
+
|
10
|
+
header_parser = HeaderParser.new
|
11
|
+
credit_card_parser = CreditCardTransactionParser.new
|
12
|
+
boleto_parser = BoletoTransactionParser.new
|
13
|
+
online_debit_parser = OnlineDebitTransactionParser.new
|
14
|
+
trailer_parser = TrailerParser.new
|
15
|
+
|
16
|
+
begin
|
17
|
+
response_splited = file_to_parse.split("\n")
|
18
|
+
|
19
|
+
response_splited.each do |item|
|
20
|
+
|
21
|
+
to_parse_item = item.split(',')
|
22
|
+
if to_parse_item[0] == '01'
|
23
|
+
response['Header'] = header_parser.Parse(to_parse_item)
|
24
|
+
end
|
25
|
+
|
26
|
+
if to_parse_item[0] == '20'
|
27
|
+
response['CreditCardTransaction'] << credit_card_parser.Parse(to_parse_item)
|
28
|
+
end
|
29
|
+
|
30
|
+
if to_parse_item[0] == '40'
|
31
|
+
response['OnlineDebitTransaction'] << online_debit_parser.Parse(to_parse_item)
|
32
|
+
end
|
33
|
+
|
34
|
+
if to_parse_item[0] == '30'
|
35
|
+
response['BoletoTransaction'] << boleto_parser.Parse(to_parse_item)
|
36
|
+
end
|
37
|
+
|
38
|
+
if to_parse_item[0] == '99'
|
39
|
+
response['Trailer'] = trailer_parser.Parse(to_parse_item)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
rescue Exception => err
|
43
|
+
return err
|
44
|
+
end
|
45
|
+
return response
|
46
|
+
end
|
47
|
+
end
|
48
48
|
end
|
data/lib/mundipagg_sdk.rb
CHANGED
@@ -1,61 +1,61 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
require 'bundler/setup'
|
3
|
-
|
4
|
-
require 'json'
|
5
|
-
require 'rest-client'
|
6
|
-
require 'nori'
|
7
|
-
require 'rexml/document'
|
8
|
-
|
9
|
-
require_relative 'gateway/BoletoTransaction/boleto_transaction'
|
10
|
-
require_relative 'gateway/BoletoTransaction/boleto_transaction_options'
|
11
|
-
require_relative 'gateway/BoletoTransaction/boleto_transaction_report_file'
|
12
|
-
|
13
|
-
require_relative 'gateway/CreditCardTransaction/credit_card'
|
14
|
-
require_relative 'gateway/CreditCardTransaction/credit_card_transaction'
|
15
|
-
require_relative 'gateway/CreditCardTransaction/credit_card_transaction_options'
|
16
|
-
require_relative 'gateway/CreditCardTransaction/manage_credit_card_transaction'
|
17
|
-
require_relative 'gateway/CreditCardTransaction/retry_sale_credit_card_transaction'
|
18
|
-
require_relative 'gateway/CreditCardTransaction/credit_card_transaction_report_file'
|
19
|
-
|
20
|
-
require_relative 'gateway/Address/billing_address'
|
21
|
-
require_relative 'gateway/Address/buyer_address'
|
22
|
-
require_relative 'gateway/Address/delivery_address'
|
23
|
-
|
24
|
-
require_relative 'gateway/Merchant/merchant'
|
25
|
-
|
26
|
-
require_relative 'gateway/Order/order'
|
27
|
-
require_relative 'gateway/Order/order_transaction_report_file'
|
28
|
-
|
29
|
-
require_relative 'gateway/OnlineDebit/online_debit_transaction_report_file'
|
30
|
-
|
31
|
-
require_relative 'gateway/Parsers/boleto_transaction_parser'
|
32
|
-
require_relative 'gateway/Parsers/credit_card_transaction_parser'
|
33
|
-
require_relative 'gateway/Parsers/online_debit_transaction_parser'
|
34
|
-
require_relative 'gateway/Parsers/header_parser'
|
35
|
-
require_relative 'gateway/Parsers/trailer_parser'
|
36
|
-
|
37
|
-
require_relative 'gateway/Person/buyer'
|
38
|
-
require_relative 'gateway/Person/person'
|
39
|
-
|
40
|
-
require_relative 'gateway/Recurrency/recurrency'
|
41
|
-
|
42
|
-
require_relative 'gateway/Sale/create_sale_request'
|
43
|
-
require_relative 'gateway/Sale/manage_sale_request'
|
44
|
-
require_relative 'gateway/Sale/query_sale_request'
|
45
|
-
require_relative 'gateway/Sale/request_data'
|
46
|
-
require_relative 'gateway/Sale/retry_sale_options'
|
47
|
-
require_relative 'gateway/Sale/retry_sale_request'
|
48
|
-
require_relative 'gateway/Sale/sale_data'
|
49
|
-
|
50
|
-
require_relative 'gateway/ShoppingCart/shopping_cart'
|
51
|
-
require_relative 'gateway/ShoppingCart/shopping_cart_item'
|
52
|
-
|
53
|
-
require_relative 'gateway/SalesOption'
|
54
|
-
require_relative 'gateway/post_notification'
|
55
|
-
require_relative 'gateway/Gateway'
|
56
|
-
require_relative 'gateway/header'
|
57
|
-
require_relative 'gateway/Trailer'
|
58
|
-
require_relative 'gateway/transaction_report_file'
|
59
|
-
require_relative 'gateway/InstantBuyData/create_instant_buy_data_request'
|
60
|
-
require_relative 'gateway/InstantBuyData/update_instant_buy_data_request'
|
61
|
-
require_relative 'gateway/Person/create_buyer_request'
|
1
|
+
require 'rubygems'
|
2
|
+
require 'bundler/setup'
|
3
|
+
|
4
|
+
require 'json'
|
5
|
+
require 'rest-client'
|
6
|
+
require 'nori'
|
7
|
+
require 'rexml/document'
|
8
|
+
|
9
|
+
require_relative 'gateway/BoletoTransaction/boleto_transaction'
|
10
|
+
require_relative 'gateway/BoletoTransaction/boleto_transaction_options'
|
11
|
+
require_relative 'gateway/BoletoTransaction/boleto_transaction_report_file'
|
12
|
+
|
13
|
+
require_relative 'gateway/CreditCardTransaction/credit_card'
|
14
|
+
require_relative 'gateway/CreditCardTransaction/credit_card_transaction'
|
15
|
+
require_relative 'gateway/CreditCardTransaction/credit_card_transaction_options'
|
16
|
+
require_relative 'gateway/CreditCardTransaction/manage_credit_card_transaction'
|
17
|
+
require_relative 'gateway/CreditCardTransaction/retry_sale_credit_card_transaction'
|
18
|
+
require_relative 'gateway/CreditCardTransaction/credit_card_transaction_report_file'
|
19
|
+
|
20
|
+
require_relative 'gateway/Address/billing_address'
|
21
|
+
require_relative 'gateway/Address/buyer_address'
|
22
|
+
require_relative 'gateway/Address/delivery_address'
|
23
|
+
|
24
|
+
require_relative 'gateway/Merchant/merchant'
|
25
|
+
|
26
|
+
require_relative 'gateway/Order/order'
|
27
|
+
require_relative 'gateway/Order/order_transaction_report_file'
|
28
|
+
|
29
|
+
require_relative 'gateway/OnlineDebit/online_debit_transaction_report_file'
|
30
|
+
|
31
|
+
require_relative 'gateway/Parsers/boleto_transaction_parser'
|
32
|
+
require_relative 'gateway/Parsers/credit_card_transaction_parser'
|
33
|
+
require_relative 'gateway/Parsers/online_debit_transaction_parser'
|
34
|
+
require_relative 'gateway/Parsers/header_parser'
|
35
|
+
require_relative 'gateway/Parsers/trailer_parser'
|
36
|
+
|
37
|
+
require_relative 'gateway/Person/buyer'
|
38
|
+
require_relative 'gateway/Person/person'
|
39
|
+
|
40
|
+
require_relative 'gateway/Recurrency/recurrency'
|
41
|
+
|
42
|
+
require_relative 'gateway/Sale/create_sale_request'
|
43
|
+
require_relative 'gateway/Sale/manage_sale_request'
|
44
|
+
require_relative 'gateway/Sale/query_sale_request'
|
45
|
+
require_relative 'gateway/Sale/request_data'
|
46
|
+
require_relative 'gateway/Sale/retry_sale_options'
|
47
|
+
require_relative 'gateway/Sale/retry_sale_request'
|
48
|
+
require_relative 'gateway/Sale/sale_data'
|
49
|
+
|
50
|
+
require_relative 'gateway/ShoppingCart/shopping_cart'
|
51
|
+
require_relative 'gateway/ShoppingCart/shopping_cart_item'
|
52
|
+
|
53
|
+
require_relative 'gateway/SalesOption'
|
54
|
+
require_relative 'gateway/post_notification'
|
55
|
+
require_relative 'gateway/Gateway'
|
56
|
+
require_relative 'gateway/header'
|
57
|
+
require_relative 'gateway/Trailer'
|
58
|
+
require_relative 'gateway/transaction_report_file'
|
59
|
+
require_relative 'gateway/InstantBuyData/create_instant_buy_data_request'
|
60
|
+
require_relative 'gateway/InstantBuyData/update_instant_buy_data_request'
|
61
|
+
require_relative 'gateway/Person/create_buyer_request'
|
data/mundipagg_sdk.gemspec
CHANGED
@@ -1,20 +1,20 @@
|
|
1
|
-
Gem::Specification.new do |s|
|
2
|
-
s.name = 'mundipagg_sdk'
|
3
|
-
s.summary = 'MundiPagg Ruby Client Library'
|
4
|
-
s.description = 'Ruby library for integrating with the MundiPagg payment web services'
|
5
|
-
s.version = '1.
|
6
|
-
s.author = 'MundiPagg'
|
7
|
-
s.email = 'github@mundipagg.com'
|
8
|
-
s.homepage = 'http://www.mundipagg.com/'
|
9
|
-
s.files = Dir.glob ["README.md", "LICENSE", "lib/**/*.{rb}", "*.gemspec"]
|
10
|
-
s.test_files = Dir.glob ["spec/**/*"]
|
11
|
-
s.add_dependency 'rest-client', '~> 1.8', '>= 1.8.0'
|
12
|
-
s.add_dependency 'nori', '~> 2.6', '>= 2.6.0'
|
13
|
-
s.add_dependency 'gyoku', '~> 1.3', '>= 1.3.1'
|
14
|
-
s.add_dependency 'nokogiri', '~> 1.6', '>= 1.6.6.2'
|
15
|
-
s.add_dependency 'ffi', '~> 1.9', '>= 1.9.10'
|
16
|
-
s.add_dependency 'bundler', '~> 1.10', '>= 1.10.6'
|
17
|
-
s.add_development_dependency 'rspec', '~> 3.3', '>= 3.3.0'
|
18
|
-
s.required_ruby_version = '>= 2.1.7'
|
19
|
-
s.license = 'Apache 2.0'
|
20
|
-
end
|
1
|
+
Gem::Specification.new do |s|
|
2
|
+
s.name = 'mundipagg_sdk'
|
3
|
+
s.summary = 'MundiPagg Ruby Client Library'
|
4
|
+
s.description = 'Ruby library for integrating with the MundiPagg payment web services'
|
5
|
+
s.version = '1.4.0' # Major.Minor.Revision
|
6
|
+
s.author = 'MundiPagg'
|
7
|
+
s.email = 'github@mundipagg.com'
|
8
|
+
s.homepage = 'http://www.mundipagg.com/'
|
9
|
+
s.files = Dir.glob ["README.md", "LICENSE", "lib/**/*.{rb}", "*.gemspec"]
|
10
|
+
s.test_files = Dir.glob ["spec/**/*"]
|
11
|
+
s.add_dependency 'rest-client', '~> 1.8', '>= 1.8.0'
|
12
|
+
s.add_dependency 'nori', '~> 2.6', '>= 2.6.0'
|
13
|
+
s.add_dependency 'gyoku', '~> 1.3', '>= 1.3.1'
|
14
|
+
s.add_dependency 'nokogiri', '~> 1.6', '>= 1.6.6.2'
|
15
|
+
s.add_dependency 'ffi', '~> 1.9', '>= 1.9.10'
|
16
|
+
s.add_dependency 'bundler', '~> 1.10', '>= 1.10.6'
|
17
|
+
s.add_development_dependency 'rspec', '~> 3.3', '>= 3.3.0'
|
18
|
+
s.required_ruby_version = '>= 2.1.7'
|
19
|
+
s.license = 'Apache 2.0'
|
20
|
+
end
|
@@ -1,1022 +1,1023 @@
|
|
1
|
-
require_relative '../../lib/mundipagg_sdk'
|
2
|
-
require_relative 'test_helper'
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
boletoTransaction
|
14
|
-
boletoTransaction.
|
15
|
-
boletoTransaction.
|
16
|
-
boletoTransaction.
|
17
|
-
boletoTransaction.
|
18
|
-
boletoTransaction.
|
19
|
-
boletoTransaction.Options.
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
buyerAddress
|
33
|
-
buyerAddress.
|
34
|
-
buyerAddress.
|
35
|
-
buyerAddress.
|
36
|
-
buyerAddress.
|
37
|
-
buyerAddress.
|
38
|
-
buyerAddress.
|
39
|
-
buyerAddress.
|
40
|
-
buyerAddress.
|
41
|
-
|
42
|
-
|
43
|
-
creditCardTransaction
|
44
|
-
creditCardTransaction.
|
45
|
-
creditCardTransaction.
|
46
|
-
creditCardTransaction.
|
47
|
-
creditCardTransaction.Options.
|
48
|
-
creditCardTransaction.
|
49
|
-
creditCardTransaction.CreditCard.
|
50
|
-
creditCardTransaction.CreditCard.
|
51
|
-
creditCardTransaction.CreditCard.
|
52
|
-
creditCardTransaction.CreditCard.
|
53
|
-
creditCardTransaction.CreditCard.
|
54
|
-
creditCardTransaction.CreditCard.
|
55
|
-
creditCardTransaction.CreditCard.BillingAddress.
|
56
|
-
creditCardTransaction.CreditCard.BillingAddress.
|
57
|
-
creditCardTransaction.CreditCard.BillingAddress.
|
58
|
-
creditCardTransaction.CreditCard.BillingAddress.
|
59
|
-
creditCardTransaction.CreditCard.BillingAddress.
|
60
|
-
creditCardTransaction.CreditCard.BillingAddress.
|
61
|
-
creditCardTransaction.CreditCard.BillingAddress.
|
62
|
-
|
63
|
-
|
64
|
-
createSaleRequest.
|
65
|
-
createSaleRequest.Buyer.
|
66
|
-
createSaleRequest.Buyer.
|
67
|
-
createSaleRequest.Buyer.
|
68
|
-
createSaleRequest.Buyer.
|
69
|
-
createSaleRequest.Buyer.
|
70
|
-
createSaleRequest.Buyer.
|
71
|
-
createSaleRequest.Buyer.
|
72
|
-
createSaleRequest.Buyer.
|
73
|
-
createSaleRequest.Buyer.
|
74
|
-
createSaleRequest.Buyer.
|
75
|
-
createSaleRequest.Buyer.
|
76
|
-
createSaleRequest.Buyer.
|
77
|
-
createSaleRequest.Buyer.
|
78
|
-
createSaleRequest.Buyer.
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
boletoTransaction.
|
93
|
-
boletoTransaction.
|
94
|
-
boletoTransaction.BillingAddress.
|
95
|
-
boletoTransaction.BillingAddress.
|
96
|
-
boletoTransaction.BillingAddress.
|
97
|
-
boletoTransaction.BillingAddress.
|
98
|
-
boletoTransaction.BillingAddress.
|
99
|
-
boletoTransaction.BillingAddress.
|
100
|
-
boletoTransaction.BillingAddress.
|
101
|
-
boletoTransaction.
|
102
|
-
boletoTransaction.
|
103
|
-
boletoTransaction.
|
104
|
-
boletoTransaction.Options.
|
105
|
-
boletoTransaction.
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
creditCardTransaction.
|
114
|
-
creditCardTransaction.CreditCard.BillingAddress.
|
115
|
-
creditCardTransaction.CreditCard.BillingAddress.
|
116
|
-
creditCardTransaction.CreditCard.BillingAddress.
|
117
|
-
creditCardTransaction.CreditCard.BillingAddress.
|
118
|
-
creditCardTransaction.CreditCard.BillingAddress.
|
119
|
-
creditCardTransaction.CreditCard.BillingAddress.
|
120
|
-
creditCardTransaction.CreditCard.BillingAddress.
|
121
|
-
creditCardTransaction.CreditCard.
|
122
|
-
creditCardTransaction.CreditCard.
|
123
|
-
creditCardTransaction.CreditCard.
|
124
|
-
creditCardTransaction.CreditCard.
|
125
|
-
creditCardTransaction.CreditCard.
|
126
|
-
creditCardTransaction.CreditCard.
|
127
|
-
creditCardTransaction.
|
128
|
-
creditCardTransaction.
|
129
|
-
creditCardTransaction.
|
130
|
-
creditCardTransaction.Options.
|
131
|
-
creditCardTransaction.Options.
|
132
|
-
|
133
|
-
|
134
|
-
shoppingCartItem
|
135
|
-
shoppingCartItem.
|
136
|
-
shoppingCartItem.
|
137
|
-
shoppingCartItem.
|
138
|
-
shoppingCartItem.
|
139
|
-
shoppingCartItem.
|
140
|
-
shoppingCartItem.
|
141
|
-
|
142
|
-
|
143
|
-
shoppingCartCollection
|
144
|
-
shoppingCartCollection.DeliveryAddress.
|
145
|
-
shoppingCartCollection.DeliveryAddress.
|
146
|
-
shoppingCartCollection.DeliveryAddress.
|
147
|
-
shoppingCartCollection.DeliveryAddress.
|
148
|
-
shoppingCartCollection.DeliveryAddress.
|
149
|
-
shoppingCartCollection.DeliveryAddress.
|
150
|
-
shoppingCartCollection.DeliveryAddress.
|
151
|
-
shoppingCartCollection.
|
152
|
-
shoppingCartCollection.
|
153
|
-
shoppingCartCollection.
|
154
|
-
shoppingCartCollection.
|
155
|
-
shoppingCartCollection.
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
buyerAddress
|
165
|
-
buyerAddress.
|
166
|
-
buyerAddress.
|
167
|
-
buyerAddress.
|
168
|
-
buyerAddress.
|
169
|
-
buyerAddress.
|
170
|
-
buyerAddress.
|
171
|
-
buyerAddress.
|
172
|
-
buyerAddress.
|
173
|
-
|
174
|
-
|
175
|
-
createSaleRequest.Buyer.
|
176
|
-
createSaleRequest.Buyer.
|
177
|
-
createSaleRequest.Buyer.
|
178
|
-
createSaleRequest.Buyer.
|
179
|
-
createSaleRequest.Buyer.
|
180
|
-
createSaleRequest.Buyer.
|
181
|
-
createSaleRequest.Buyer.
|
182
|
-
createSaleRequest.Buyer.
|
183
|
-
createSaleRequest.Buyer.
|
184
|
-
createSaleRequest.Buyer.
|
185
|
-
createSaleRequest.Buyer.
|
186
|
-
createSaleRequest.Buyer.
|
187
|
-
createSaleRequest.Buyer.
|
188
|
-
createSaleRequest.Buyer.
|
189
|
-
createSaleRequest.Buyer.
|
190
|
-
createSaleRequest.Buyer.
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
createSaleRequest.
|
195
|
-
createSaleRequest.
|
196
|
-
createSaleRequest.Options.
|
197
|
-
createSaleRequest.Options.
|
198
|
-
createSaleRequest.Options.
|
199
|
-
createSaleRequest.
|
200
|
-
createSaleRequest.
|
201
|
-
createSaleRequest.RequestData.
|
202
|
-
createSaleRequest.RequestData.
|
203
|
-
createSaleRequest.RequestData.
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
response
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
creditCardTransaction.
|
221
|
-
creditCardTransaction.CreditCard.BillingAddress.
|
222
|
-
creditCardTransaction.CreditCard.BillingAddress.
|
223
|
-
creditCardTransaction.CreditCard.BillingAddress.
|
224
|
-
creditCardTransaction.CreditCard.BillingAddress.
|
225
|
-
creditCardTransaction.CreditCard.BillingAddress.
|
226
|
-
creditCardTransaction.CreditCard.BillingAddress.
|
227
|
-
creditCardTransaction.CreditCard.BillingAddress.
|
228
|
-
creditCardTransaction.CreditCard.
|
229
|
-
creditCardTransaction.CreditCard.
|
230
|
-
creditCardTransaction.CreditCard.
|
231
|
-
creditCardTransaction.CreditCard.
|
232
|
-
creditCardTransaction.CreditCard.
|
233
|
-
creditCardTransaction.CreditCard.
|
234
|
-
creditCardTransaction.
|
235
|
-
|
236
|
-
|
237
|
-
shoppingCartItem
|
238
|
-
shoppingCartItem.
|
239
|
-
shoppingCartItem.
|
240
|
-
shoppingCartItem.
|
241
|
-
shoppingCartItem.
|
242
|
-
shoppingCartItem.
|
243
|
-
shoppingCartItem.
|
244
|
-
|
245
|
-
|
246
|
-
shoppingCartCollection
|
247
|
-
shoppingCartCollection.DeliveryAddress.
|
248
|
-
shoppingCartCollection.DeliveryAddress.
|
249
|
-
shoppingCartCollection.DeliveryAddress.
|
250
|
-
shoppingCartCollection.DeliveryAddress.
|
251
|
-
shoppingCartCollection.DeliveryAddress.
|
252
|
-
shoppingCartCollection.DeliveryAddress.
|
253
|
-
shoppingCartCollection.DeliveryAddress.
|
254
|
-
shoppingCartCollection.
|
255
|
-
shoppingCartCollection.
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
buyerAddress
|
262
|
-
buyerAddress.
|
263
|
-
buyerAddress.
|
264
|
-
buyerAddress.
|
265
|
-
buyerAddress.
|
266
|
-
buyerAddress.
|
267
|
-
buyerAddress.
|
268
|
-
buyerAddress.
|
269
|
-
buyerAddress.
|
270
|
-
|
271
|
-
|
272
|
-
createSaleRequest.Buyer.
|
273
|
-
createSaleRequest.Buyer.
|
274
|
-
createSaleRequest.Buyer.
|
275
|
-
createSaleRequest.Buyer.
|
276
|
-
createSaleRequest.Buyer.
|
277
|
-
createSaleRequest.Buyer.
|
278
|
-
createSaleRequest.Buyer.
|
279
|
-
createSaleRequest.Buyer.
|
280
|
-
createSaleRequest.Buyer.
|
281
|
-
createSaleRequest.Buyer.
|
282
|
-
createSaleRequest.Buyer.
|
283
|
-
createSaleRequest.Buyer.
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
createSaleRequest.
|
288
|
-
createSaleRequest.
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
response
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
boletoTransaction
|
305
|
-
boletoTransaction.
|
306
|
-
boletoTransaction.
|
307
|
-
boletoTransaction.
|
308
|
-
boletoTransaction.
|
309
|
-
boletoTransaction.
|
310
|
-
boletoTransaction.Options.
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
boletoTransaction
|
330
|
-
boletoTransaction.
|
331
|
-
boletoTransaction.
|
332
|
-
boletoTransaction.
|
333
|
-
boletoTransaction.
|
334
|
-
boletoTransaction.
|
335
|
-
boletoTransaction.Options.
|
336
|
-
|
337
|
-
|
338
|
-
createSaleRequest.
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
creditCardTransactionItem
|
357
|
-
creditCardTransactionItem.
|
358
|
-
creditCardTransactionItem.CreditCard.
|
359
|
-
creditCardTransactionItem.CreditCard.
|
360
|
-
creditCardTransactionItem.CreditCard.
|
361
|
-
creditCardTransactionItem.CreditCard.
|
362
|
-
creditCardTransactionItem.CreditCard.
|
363
|
-
creditCardTransactionItem.
|
364
|
-
creditCardTransactionItem.
|
365
|
-
creditCardTransactionItem.
|
366
|
-
creditCardTransactionItem.Options.
|
367
|
-
creditCardTransactionItem.
|
368
|
-
|
369
|
-
|
370
|
-
createSaleRequest.
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
retrySaleCreditCardTransactionItem.
|
382
|
-
|
383
|
-
retrySaleRequest.
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
creditCardTransactionItem
|
399
|
-
creditCardTransactionItem.
|
400
|
-
creditCardTransactionItem.CreditCard.
|
401
|
-
creditCardTransactionItem.CreditCard.
|
402
|
-
creditCardTransactionItem.CreditCard.
|
403
|
-
creditCardTransactionItem.CreditCard.
|
404
|
-
creditCardTransactionItem.CreditCard.
|
405
|
-
creditCardTransactionItem.
|
406
|
-
creditCardTransactionItem.
|
407
|
-
|
408
|
-
|
409
|
-
createSaleRequest.
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
creditCardTransactionItem
|
434
|
-
creditCardTransactionItem.
|
435
|
-
creditCardTransactionItem.CreditCard.
|
436
|
-
creditCardTransactionItem.CreditCard.
|
437
|
-
creditCardTransactionItem.CreditCard.
|
438
|
-
creditCardTransactionItem.CreditCard.
|
439
|
-
creditCardTransactionItem.CreditCard.
|
440
|
-
creditCardTransactionItem.
|
441
|
-
creditCardTransactionItem.
|
442
|
-
creditCardTransactionItem.
|
443
|
-
creditCardTransactionItem.Options.
|
444
|
-
creditCardTransactionItem.
|
445
|
-
|
446
|
-
|
447
|
-
createSaleRequest.
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
cancelCreditCardTransactionItem
|
459
|
-
cancelCreditCardTransactionItem.
|
460
|
-
cancelCreditCardTransactionItem.
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
cancelSaleRequest
|
465
|
-
cancelSaleRequest.
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
creditCardTransactionItem
|
476
|
-
creditCardTransactionItem.
|
477
|
-
creditCardTransactionItem.CreditCard.
|
478
|
-
creditCardTransactionItem.CreditCard.
|
479
|
-
creditCardTransactionItem.CreditCard.
|
480
|
-
creditCardTransactionItem.CreditCard.
|
481
|
-
creditCardTransactionItem.CreditCard.
|
482
|
-
creditCardTransactionItem.
|
483
|
-
creditCardTransactionItem.
|
484
|
-
creditCardTransactionItem.
|
485
|
-
creditCardTransactionItem.Options.
|
486
|
-
creditCardTransactionItem.
|
487
|
-
|
488
|
-
|
489
|
-
createSaleRequest.
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
captureCreditCardTransactionItem
|
501
|
-
captureCreditCardTransactionItem.
|
502
|
-
captureCreditCardTransactionItem.
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
captureSaleRequest
|
507
|
-
captureSaleRequest.
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
creditCardTransactionItem
|
518
|
-
creditCardTransactionItem.
|
519
|
-
creditCardTransactionItem.
|
520
|
-
creditCardTransactionItem.
|
521
|
-
creditCardTransactionItem.
|
522
|
-
creditCardTransactionItem.CreditCard.
|
523
|
-
creditCardTransactionItem.CreditCard.
|
524
|
-
creditCardTransactionItem.CreditCard.
|
525
|
-
creditCardTransactionItem.CreditCard.
|
526
|
-
creditCardTransactionItem.CreditCard.
|
527
|
-
creditCardTransactionItem.
|
528
|
-
|
529
|
-
|
530
|
-
createSaleRequest
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
# expect(credit_card_result['
|
539
|
-
|
540
|
-
|
541
|
-
captureCreditCardTransactionItem
|
542
|
-
captureCreditCardTransactionItem.
|
543
|
-
captureCreditCardTransactionItem.
|
544
|
-
|
545
|
-
|
546
|
-
captureSale
|
547
|
-
captureSale.
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
i
|
565
|
-
|
566
|
-
<
|
567
|
-
<
|
568
|
-
|
569
|
-
<
|
570
|
-
<
|
571
|
-
<
|
572
|
-
<
|
573
|
-
<
|
574
|
-
<
|
575
|
-
<
|
576
|
-
<
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
<
|
581
|
-
<
|
582
|
-
<
|
583
|
-
<
|
584
|
-
<
|
585
|
-
<
|
586
|
-
<
|
587
|
-
<
|
588
|
-
<
|
589
|
-
<
|
590
|
-
<
|
591
|
-
<
|
592
|
-
<
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
<
|
598
|
-
<
|
599
|
-
<
|
600
|
-
<
|
601
|
-
<
|
602
|
-
<
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
<
|
607
|
-
<
|
608
|
-
<
|
609
|
-
</
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
file.
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
credit_card_transaction
|
650
|
-
credit_card_transaction.CreditCard.
|
651
|
-
credit_card_transaction.CreditCard.
|
652
|
-
credit_card_transaction.CreditCard.
|
653
|
-
credit_card_transaction.CreditCard.
|
654
|
-
credit_card_transaction.CreditCard.
|
655
|
-
credit_card_transaction.
|
656
|
-
|
657
|
-
|
658
|
-
sale_request
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
credit_card_transaction
|
674
|
-
credit_card_transaction.CreditCard.
|
675
|
-
credit_card_transaction.CreditCard.
|
676
|
-
credit_card_transaction.CreditCard.
|
677
|
-
credit_card_transaction.CreditCard.
|
678
|
-
credit_card_transaction.CreditCard.
|
679
|
-
credit_card_transaction.
|
680
|
-
|
681
|
-
|
682
|
-
sale_request
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
credit_card_transaction
|
698
|
-
credit_card_transaction.CreditCard.
|
699
|
-
credit_card_transaction.CreditCard.
|
700
|
-
credit_card_transaction.CreditCard.
|
701
|
-
credit_card_transaction.CreditCard.
|
702
|
-
credit_card_transaction.CreditCard.
|
703
|
-
credit_card_transaction.
|
704
|
-
|
705
|
-
|
706
|
-
sale_request
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
credit_card_transaction
|
723
|
-
credit_card_transaction.CreditCard.
|
724
|
-
credit_card_transaction.CreditCard.
|
725
|
-
credit_card_transaction.CreditCard.
|
726
|
-
credit_card_transaction.CreditCard.
|
727
|
-
credit_card_transaction.CreditCard.
|
728
|
-
credit_card_transaction.
|
729
|
-
|
730
|
-
|
731
|
-
sale_request
|
732
|
-
sale_request.Buyer.
|
733
|
-
sale_request.Buyer.
|
734
|
-
sale_request.Buyer.
|
735
|
-
sale_request.Buyer.
|
736
|
-
sale_request.Buyer.
|
737
|
-
sale_request.
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
credit_card_transaction
|
752
|
-
credit_card_transaction.CreditCard.
|
753
|
-
credit_card_transaction.CreditCard.
|
754
|
-
credit_card_transaction.CreditCard.
|
755
|
-
credit_card_transaction.CreditCard.
|
756
|
-
credit_card_transaction.CreditCard.
|
757
|
-
credit_card_transaction.
|
758
|
-
|
759
|
-
|
760
|
-
sale_request
|
761
|
-
sale_request.Buyer.
|
762
|
-
sale_request.Buyer.
|
763
|
-
sale_request.Buyer.
|
764
|
-
sale_request.Buyer.
|
765
|
-
sale_request.Buyer.
|
766
|
-
sale_request.
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
|
774
|
-
|
775
|
-
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
create_instant_buy_data
|
780
|
-
create_instant_buy_data.
|
781
|
-
create_instant_buy_data.
|
782
|
-
create_instant_buy_data.
|
783
|
-
create_instant_buy_data.
|
784
|
-
create_instant_buy_data.
|
785
|
-
create_instant_buy_data.
|
786
|
-
create_instant_buy_data.
|
787
|
-
create_instant_buy_data.BillingAddress.
|
788
|
-
create_instant_buy_data.BillingAddress.
|
789
|
-
create_instant_buy_data.BillingAddress.
|
790
|
-
create_instant_buy_data.BillingAddress.
|
791
|
-
create_instant_buy_data.BillingAddress.
|
792
|
-
create_instant_buy_data.BillingAddress.
|
793
|
-
create_instant_buy_data.BillingAddress.
|
794
|
-
|
795
|
-
|
796
|
-
|
797
|
-
|
798
|
-
|
799
|
-
|
800
|
-
|
801
|
-
|
802
|
-
address
|
803
|
-
address.
|
804
|
-
address.
|
805
|
-
address.
|
806
|
-
address.
|
807
|
-
address.
|
808
|
-
address.
|
809
|
-
address.
|
810
|
-
address.
|
811
|
-
|
812
|
-
|
813
|
-
buyer_request
|
814
|
-
buyer_request.
|
815
|
-
buyer_request.
|
816
|
-
buyer_request.
|
817
|
-
buyer_request.
|
818
|
-
buyer_request.
|
819
|
-
buyer_request.
|
820
|
-
buyer_request.
|
821
|
-
buyer_request.
|
822
|
-
buyer_request.
|
823
|
-
buyer_request.
|
824
|
-
buyer_request.
|
825
|
-
buyer_request.
|
826
|
-
buyer_request.
|
827
|
-
buyer_request.
|
828
|
-
buyer_request.
|
829
|
-
buyer_request.
|
830
|
-
buyer_request.
|
831
|
-
|
832
|
-
|
833
|
-
|
834
|
-
|
835
|
-
|
836
|
-
create_instant_buy_data
|
837
|
-
create_instant_buy_data.
|
838
|
-
create_instant_buy_data.
|
839
|
-
create_instant_buy_data.
|
840
|
-
create_instant_buy_data.
|
841
|
-
create_instant_buy_data.
|
842
|
-
create_instant_buy_data.
|
843
|
-
create_instant_buy_data.
|
844
|
-
create_instant_buy_data.
|
845
|
-
create_instant_buy_data.BillingAddress.
|
846
|
-
create_instant_buy_data.BillingAddress.
|
847
|
-
create_instant_buy_data.BillingAddress.
|
848
|
-
create_instant_buy_data.BillingAddress.
|
849
|
-
create_instant_buy_data.BillingAddress.
|
850
|
-
create_instant_buy_data.BillingAddress.
|
851
|
-
create_instant_buy_data.BillingAddress.
|
852
|
-
|
853
|
-
|
854
|
-
|
855
|
-
|
856
|
-
|
857
|
-
|
858
|
-
|
859
|
-
|
860
|
-
create_instant_buy_data
|
861
|
-
create_instant_buy_data.
|
862
|
-
create_instant_buy_data.
|
863
|
-
create_instant_buy_data.
|
864
|
-
create_instant_buy_data.
|
865
|
-
create_instant_buy_data.
|
866
|
-
|
867
|
-
|
868
|
-
|
869
|
-
|
870
|
-
|
871
|
-
|
872
|
-
|
873
|
-
|
874
|
-
create_instant_buy_data
|
875
|
-
create_instant_buy_data.
|
876
|
-
create_instant_buy_data.
|
877
|
-
create_instant_buy_data.
|
878
|
-
create_instant_buy_data.
|
879
|
-
create_instant_buy_data.
|
880
|
-
create_instant_buy_data.
|
881
|
-
create_instant_buy_data.
|
882
|
-
create_instant_buy_data.BillingAddress.
|
883
|
-
create_instant_buy_data.BillingAddress.
|
884
|
-
create_instant_buy_data.BillingAddress.
|
885
|
-
create_instant_buy_data.BillingAddress.
|
886
|
-
create_instant_buy_data.BillingAddress.
|
887
|
-
create_instant_buy_data.BillingAddress.
|
888
|
-
create_instant_buy_data.BillingAddress.
|
889
|
-
|
890
|
-
|
891
|
-
|
892
|
-
|
893
|
-
credit_card_transaction
|
894
|
-
credit_card_transaction.CreditCard.
|
895
|
-
credit_card_transaction.CreditCard.
|
896
|
-
credit_card_transaction.CreditCard.
|
897
|
-
credit_card_transaction.CreditCard.
|
898
|
-
credit_card_transaction.CreditCard.
|
899
|
-
credit_card_transaction.
|
900
|
-
|
901
|
-
|
902
|
-
sale_request
|
903
|
-
sale_request.Buyer.
|
904
|
-
sale_request.Buyer.
|
905
|
-
sale_request.Buyer.
|
906
|
-
sale_request.Buyer.
|
907
|
-
sale_request.Buyer.
|
908
|
-
sale_request.
|
909
|
-
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
|
916
|
-
|
917
|
-
update_instant_buy_data_request
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
|
924
|
-
|
925
|
-
|
926
|
-
credit_card_transaction
|
927
|
-
credit_card_transaction.CreditCard.
|
928
|
-
credit_card_transaction.CreditCard.
|
929
|
-
credit_card_transaction.CreditCard.
|
930
|
-
credit_card_transaction.CreditCard.
|
931
|
-
credit_card_transaction.CreditCard.
|
932
|
-
credit_card_transaction.
|
933
|
-
|
934
|
-
|
935
|
-
sale_request
|
936
|
-
|
937
|
-
|
938
|
-
|
939
|
-
|
940
|
-
|
941
|
-
|
942
|
-
|
943
|
-
|
944
|
-
|
945
|
-
creditCardTransaction
|
946
|
-
creditCardTransaction.
|
947
|
-
|
948
|
-
|
949
|
-
|
950
|
-
createSaleRequest
|
951
|
-
|
952
|
-
|
953
|
-
|
954
|
-
|
955
|
-
|
956
|
-
|
957
|
-
|
958
|
-
|
959
|
-
|
960
|
-
credit_card_transaction
|
961
|
-
credit_card_transaction.CreditCard.
|
962
|
-
credit_card_transaction.CreditCard.
|
963
|
-
credit_card_transaction.CreditCard.
|
964
|
-
credit_card_transaction.CreditCard.
|
965
|
-
credit_card_transaction.CreditCard.
|
966
|
-
credit_card_transaction.
|
967
|
-
|
968
|
-
|
969
|
-
sale_request
|
970
|
-
sale_request.Buyer.
|
971
|
-
sale_request.Buyer.
|
972
|
-
sale_request.Buyer.
|
973
|
-
sale_request.Buyer.
|
974
|
-
sale_request.Buyer.
|
975
|
-
sale_request.
|
976
|
-
|
977
|
-
|
978
|
-
|
979
|
-
|
980
|
-
|
981
|
-
|
982
|
-
|
983
|
-
|
984
|
-
|
985
|
-
|
986
|
-
|
987
|
-
|
988
|
-
address
|
989
|
-
address.
|
990
|
-
address.
|
991
|
-
address.
|
992
|
-
address.
|
993
|
-
address.
|
994
|
-
address.
|
995
|
-
address.
|
996
|
-
address.
|
997
|
-
|
998
|
-
|
999
|
-
buyer_request
|
1000
|
-
buyer_request.
|
1001
|
-
buyer_request.
|
1002
|
-
buyer_request.
|
1003
|
-
buyer_request.
|
1004
|
-
buyer_request.
|
1005
|
-
buyer_request.
|
1006
|
-
buyer_request.
|
1007
|
-
buyer_request.
|
1008
|
-
buyer_request.
|
1009
|
-
buyer_request.
|
1010
|
-
buyer_request.
|
1011
|
-
buyer_request.
|
1012
|
-
buyer_request.
|
1013
|
-
buyer_request.
|
1014
|
-
buyer_request.
|
1015
|
-
buyer_request.
|
1016
|
-
buyer_request.
|
1017
|
-
|
1018
|
-
|
1019
|
-
|
1020
|
-
|
1021
|
-
|
1022
|
-
end
|
1
|
+
require_relative '../../lib/mundipagg_sdk'
|
2
|
+
require_relative 'test_helper'
|
3
|
+
require 'date'
|
4
|
+
|
5
|
+
merchant_key = '85328786-8BA6-420F-9948-5352F5A183EB'
|
6
|
+
|
7
|
+
gateway = Gateway::Gateway.new(:sandbox, merchant_key)
|
8
|
+
|
9
|
+
RSpec.describe Gateway do
|
10
|
+
it 'should create a sale with boleto' do
|
11
|
+
createSaleRequest = Gateway::CreateSaleRequest.new
|
12
|
+
|
13
|
+
boletoTransaction = Gateway::BoletoTransaction.new
|
14
|
+
boletoTransaction.AmountInCents = 100
|
15
|
+
boletoTransaction.BankNumber = '237'
|
16
|
+
boletoTransaction.DocumentNumber = '12345678901'
|
17
|
+
boletoTransaction.Instructions = 'Pagar antes do vencimento'
|
18
|
+
boletoTransaction.TransactionReference = 'BoletoTest#Ruby01'
|
19
|
+
boletoTransaction.Options.CurrencyIso = 'BRL'
|
20
|
+
boletoTransaction.Options.DaysToAddInBoletoExpirationDate = 5
|
21
|
+
|
22
|
+
createSaleRequest.BoletoTransactionCollection << boletoTransaction
|
23
|
+
|
24
|
+
response = gateway.CreateSale(createSaleRequest)
|
25
|
+
|
26
|
+
expect(response[:ErrorReport]).to eq nil
|
27
|
+
end
|
28
|
+
|
29
|
+
it 'should create a sale with credit card' do
|
30
|
+
createSaleRequest = Gateway::CreateSaleRequest.new
|
31
|
+
|
32
|
+
buyerAddress = Gateway::BuyerAddress.new
|
33
|
+
buyerAddress.AddressType = 'Residential'
|
34
|
+
buyerAddress.City = 'Rio de Janeiro'
|
35
|
+
buyerAddress.Complement = '10 Andar'
|
36
|
+
buyerAddress.Country = 'Brazil'
|
37
|
+
buyerAddress.District = 'Centro'
|
38
|
+
buyerAddress.Number = '199'
|
39
|
+
buyerAddress.State = 'RJ'
|
40
|
+
buyerAddress.Street = 'Rua da Quitanda'
|
41
|
+
buyerAddress.ZipCode = '20091005'
|
42
|
+
|
43
|
+
creditCardTransaction = Gateway::CreditCardTransaction.new
|
44
|
+
creditCardTransaction.AmountInCents = 100
|
45
|
+
creditCardTransaction.InstallmentCount = 1
|
46
|
+
creditCardTransaction.TransactionReference = 'CreditCard One RubySDK Test'
|
47
|
+
creditCardTransaction.Options.PaymentMethodCode = 1
|
48
|
+
creditCardTransaction.Options.SoftDescriptorText = 'My Store Name'
|
49
|
+
creditCardTransaction.CreditCard.CreditCardNumber = '5453010000066167'
|
50
|
+
creditCardTransaction.CreditCard.ExpMonth = 5
|
51
|
+
creditCardTransaction.CreditCard.ExpYear = 18
|
52
|
+
creditCardTransaction.CreditCard.HolderName = 'Maria do Carmo'
|
53
|
+
creditCardTransaction.CreditCard.SecurityCode = '123'
|
54
|
+
creditCardTransaction.CreditCard.CreditCardBrand = 'Mastercard'
|
55
|
+
creditCardTransaction.CreditCard.BillingAddress.City = 'Rio de Janeiro'
|
56
|
+
creditCardTransaction.CreditCard.BillingAddress.Complement = '10 Andar'
|
57
|
+
creditCardTransaction.CreditCard.BillingAddress.Country = 'Brazil'
|
58
|
+
creditCardTransaction.CreditCard.BillingAddress.District = 'Centro'
|
59
|
+
creditCardTransaction.CreditCard.BillingAddress.Number = '199'
|
60
|
+
creditCardTransaction.CreditCard.BillingAddress.State = 'RJ'
|
61
|
+
creditCardTransaction.CreditCard.BillingAddress.Street = 'Rua da Quitanda'
|
62
|
+
creditCardTransaction.CreditCard.BillingAddress.ZipCode = '20091005'
|
63
|
+
|
64
|
+
createSaleRequest.CreditCardTransactionCollection << creditCardTransaction
|
65
|
+
createSaleRequest.Buyer.Birthdate = Date.new(2001, 9, 26).strftime("%Y-%m-%dT%H:%M:%S")
|
66
|
+
createSaleRequest.Buyer.BuyerCategory = 'Normal'
|
67
|
+
createSaleRequest.Buyer.Email = 'mundiBuyer@mundi.com.br'
|
68
|
+
createSaleRequest.Buyer.EmailType = 'Personal'
|
69
|
+
createSaleRequest.Buyer.Gender = 'M'
|
70
|
+
createSaleRequest.Buyer.HomePhone = '22222222'
|
71
|
+
createSaleRequest.Buyer.MobilePhone = '988888888'
|
72
|
+
createSaleRequest.Buyer.WorkPhone = '25555555'
|
73
|
+
createSaleRequest.Buyer.CreateDateInMerchant = (Date.parse(Time.now.to_s)).strftime("%Y-%m-%dT%H:%M:%S")
|
74
|
+
createSaleRequest.Buyer.LastBuyerUpdateInMerchant = (Date.parse(Time.now.to_s)).strftime("%Y-%m-%dT%H:%M:%S")
|
75
|
+
createSaleRequest.Buyer.DocumentNumber = '51212382749'
|
76
|
+
createSaleRequest.Buyer.DocumentType = 'CPF'
|
77
|
+
createSaleRequest.Buyer.Name = 'Jose da Silva Ramos'
|
78
|
+
createSaleRequest.Buyer.PersonType = 'Person'
|
79
|
+
createSaleRequest.Buyer.AddressCollection << buyerAddress
|
80
|
+
|
81
|
+
response = gateway.CreateSale(createSaleRequest)
|
82
|
+
|
83
|
+
expect(response[:ErrorReport]).to eq nil
|
84
|
+
|
85
|
+
end
|
86
|
+
|
87
|
+
it 'should create a sale with all types of transactions and all fields filled' do
|
88
|
+
# creates boleto transaction object
|
89
|
+
boletoTransaction = Gateway::BoletoTransaction.new
|
90
|
+
|
91
|
+
# 100 reais in cents
|
92
|
+
boletoTransaction.AmountInCents = 10000
|
93
|
+
boletoTransaction.BankNumber = '237'
|
94
|
+
boletoTransaction.BillingAddress.City = 'Tatooine'
|
95
|
+
boletoTransaction.BillingAddress.Complement = ''
|
96
|
+
boletoTransaction.BillingAddress.Country = 'Brazil'
|
97
|
+
boletoTransaction.BillingAddress.District = 'Mos Eisley'
|
98
|
+
boletoTransaction.BillingAddress.Number = '123'
|
99
|
+
boletoTransaction.BillingAddress.State = 'RJ'
|
100
|
+
boletoTransaction.BillingAddress.Street = 'Mos Eisley Cantina'
|
101
|
+
boletoTransaction.BillingAddress.ZipCode = '20001000'
|
102
|
+
boletoTransaction.DocumentNumber = '12345678901'
|
103
|
+
boletoTransaction.Instructions = 'Pagar antes do vencimento'
|
104
|
+
boletoTransaction.Options.CurrencyIso = 'BRL'
|
105
|
+
boletoTransaction.Options.DaysToAddInBoletoExpirationDate = 5
|
106
|
+
boletoTransaction.TransactionReference = 'NumeroDaTransacao'
|
107
|
+
|
108
|
+
|
109
|
+
# create credit card transaction object
|
110
|
+
creditCardTransaction = Gateway::CreditCardTransaction.new
|
111
|
+
|
112
|
+
# 100 reais in cents
|
113
|
+
creditCardTransaction.AmountInCents = 10000
|
114
|
+
creditCardTransaction.CreditCard.BillingAddress.City = 'Tatooine'
|
115
|
+
creditCardTransaction.CreditCard.BillingAddress.Complement = ''
|
116
|
+
creditCardTransaction.CreditCard.BillingAddress.Country = 'Brazil'
|
117
|
+
creditCardTransaction.CreditCard.BillingAddress.District = 'Mos Eisley'
|
118
|
+
creditCardTransaction.CreditCard.BillingAddress.Number = '123'
|
119
|
+
creditCardTransaction.CreditCard.BillingAddress.State = 'RJ'
|
120
|
+
creditCardTransaction.CreditCard.BillingAddress.Street = 'Mos Eisley Cantina'
|
121
|
+
creditCardTransaction.CreditCard.BillingAddress.ZipCode = '20001000'
|
122
|
+
creditCardTransaction.CreditCard.CreditCardBrand = 'Visa'
|
123
|
+
creditCardTransaction.CreditCard.CreditCardNumber = '4111111111111111'
|
124
|
+
creditCardTransaction.CreditCard.ExpMonth = 10
|
125
|
+
creditCardTransaction.CreditCard.ExpYear = 22
|
126
|
+
creditCardTransaction.CreditCard.HolderName = 'LUKE SKYWALKER'
|
127
|
+
creditCardTransaction.CreditCard.SecurityCode = '123'
|
128
|
+
creditCardTransaction.CreditCardOperation = 'AuthOnly'
|
129
|
+
creditCardTransaction.InstallmentCount = 1
|
130
|
+
creditCardTransaction.Options.CurrencyIso = 'BRL'
|
131
|
+
creditCardTransaction.Options.PaymentMethodCode = 1
|
132
|
+
creditCardTransaction.Options.SoftDescriptorText = 'Jedi Mega Store'
|
133
|
+
|
134
|
+
shoppingCartItem = Gateway::ShoppingCartItemCollection.new
|
135
|
+
shoppingCartItem.Description = 'Red Lightsaber'
|
136
|
+
shoppingCartItem.DiscountAmountInCents = 0
|
137
|
+
shoppingCartItem.ItemReference = 'NumeroDoProduto'
|
138
|
+
shoppingCartItem.Name = 'Lightsaber'
|
139
|
+
shoppingCartItem.Quantity = 1
|
140
|
+
shoppingCartItem.TotalCostInCents = 18000
|
141
|
+
shoppingCartItem.UnitCostInCents = 18000
|
142
|
+
|
143
|
+
shoppingCartCollection = Gateway::ShoppingCartCollection.new
|
144
|
+
shoppingCartCollection.DeliveryAddress.City = 'Galaxy far far away'
|
145
|
+
shoppingCartCollection.DeliveryAddress.Complement = 'Bridge'
|
146
|
+
shoppingCartCollection.DeliveryAddress.Country = 'Brazil'
|
147
|
+
shoppingCartCollection.DeliveryAddress.District = 'Command Room'
|
148
|
+
shoppingCartCollection.DeliveryAddress.Number = '321'
|
149
|
+
shoppingCartCollection.DeliveryAddress.State = 'RJ'
|
150
|
+
shoppingCartCollection.DeliveryAddress.Street = 'Death Star'
|
151
|
+
shoppingCartCollection.DeliveryAddress.ZipCode = '10002000'
|
152
|
+
shoppingCartCollection.DeliveryDeadline = DateTime.new(2015, 12, 14, 18, 36, 45).strftime("%Y-%m-%dT%H:%M:%S")
|
153
|
+
shoppingCartCollection.EstimatedDeliveryDate = DateTime.new(2015, 12, 14, 18, 36, 45).strftime("%Y-%m-%dT%H:%M:%S")
|
154
|
+
shoppingCartCollection.FreighCostInCents = 2000
|
155
|
+
shoppingCartCollection.ShippingCompany = 'Empire'
|
156
|
+
shoppingCartCollection.ShoppingCartItemCollection << shoppingCartItem
|
157
|
+
|
158
|
+
# creates request object for transaction creation
|
159
|
+
createSaleRequest = Gateway::CreateSaleRequest.new
|
160
|
+
|
161
|
+
# adds to the boleto transaction collection
|
162
|
+
createSaleRequest.BoletoTransactionCollection << boletoTransaction
|
163
|
+
|
164
|
+
buyerAddress = Gateway::BuyerAddress.new
|
165
|
+
buyerAddress.AddressType = 'Residential'
|
166
|
+
buyerAddress.City = 'Tatooine'
|
167
|
+
buyerAddress.Complement = ''
|
168
|
+
buyerAddress.Country = 'Brazil'
|
169
|
+
buyerAddress.District = 'Mos Eisley'
|
170
|
+
buyerAddress.Number = '123'
|
171
|
+
buyerAddress.State = 'RJ'
|
172
|
+
buyerAddress.Street = 'Mos Eisley Cantina'
|
173
|
+
buyerAddress.ZipCode = '20001000'
|
174
|
+
|
175
|
+
createSaleRequest.Buyer.AddressCollection << buyerAddress
|
176
|
+
createSaleRequest.Buyer.Birthdate = DateTime.new(1990,8,20,0,0,0).strftime("%Y-%m-%dT%H:%M:%S")
|
177
|
+
createSaleRequest.Buyer.BuyerCategory = 'Normal'
|
178
|
+
createSaleRequest.Buyer.BuyerReference = 'C3PO'
|
179
|
+
createSaleRequest.Buyer.CreateDateInMerchant = DateTime.new(2015,12,11,18,36,45).strftime("%Y-%m-%dT%H:%M:%S")
|
180
|
+
createSaleRequest.Buyer.DocumentNumber = '12345678901'
|
181
|
+
createSaleRequest.Buyer.DocumentType = 'CPF'
|
182
|
+
createSaleRequest.Buyer.Email = 'lskywalker@r2d2.com'
|
183
|
+
createSaleRequest.Buyer.EmailType = 'Personal'
|
184
|
+
createSaleRequest.Buyer.FacebookId = 'lukeskywalker8917'
|
185
|
+
createSaleRequest.Buyer.Gender = 'M'
|
186
|
+
createSaleRequest.Buyer.HomePhone = '(21)123456789'
|
187
|
+
createSaleRequest.Buyer.MobilePhone = '(21)987654321'
|
188
|
+
createSaleRequest.Buyer.Name = 'Luke Skywalker'
|
189
|
+
createSaleRequest.Buyer.PersonType = 'Person'
|
190
|
+
createSaleRequest.Buyer.TwitterId = '@lukeskywalker8917'
|
191
|
+
createSaleRequest.Buyer.WorkPhone = '(21)28467902'
|
192
|
+
|
193
|
+
# adds to the credit card transaction collection
|
194
|
+
createSaleRequest.CreditCardTransactionCollection << creditCardTransaction
|
195
|
+
createSaleRequest.Merchant.MerchantReference = 'IdDaLojaPlataforma'
|
196
|
+
createSaleRequest.Options.AntiFraudServiceCode = 0
|
197
|
+
createSaleRequest.Options.CurrencyIso = 'BRL'
|
198
|
+
createSaleRequest.Options.IsAntiFraudEnabled = true
|
199
|
+
createSaleRequest.Options.Retries = 1
|
200
|
+
createSaleRequest.Order.OrderReference = 'NumeroDoPedido'
|
201
|
+
createSaleRequest.RequestData.EcommerceCategory = 'B2C'
|
202
|
+
createSaleRequest.RequestData.IpAddress = '127.0.0.1'
|
203
|
+
createSaleRequest.RequestData.Origin = 'SiteDeCompra'
|
204
|
+
createSaleRequest.RequestData.SessionId = 'IdSesssaoNoSite'
|
205
|
+
|
206
|
+
# adds shopping cart collection in the request
|
207
|
+
createSaleRequest.ShoppingCartCollection << shoppingCartCollection
|
208
|
+
|
209
|
+
# make the request and returns a response hash
|
210
|
+
response = gateway.CreateSale(createSaleRequest)
|
211
|
+
|
212
|
+
expect(response[:ErrorReport]).to eq nil
|
213
|
+
end
|
214
|
+
|
215
|
+
it 'should create an anti fraud transaction' do
|
216
|
+
# create credit card transaction object
|
217
|
+
creditCardTransaction = Gateway::CreditCardTransaction.new
|
218
|
+
|
219
|
+
# 100 reais in cents
|
220
|
+
creditCardTransaction.AmountInCents = 10000
|
221
|
+
creditCardTransaction.CreditCard.BillingAddress.City = 'Tatooine'
|
222
|
+
creditCardTransaction.CreditCard.BillingAddress.Complement = ''
|
223
|
+
creditCardTransaction.CreditCard.BillingAddress.Country = 'Brazil'
|
224
|
+
creditCardTransaction.CreditCard.BillingAddress.District = 'Mos Eisley'
|
225
|
+
creditCardTransaction.CreditCard.BillingAddress.Number = '123'
|
226
|
+
creditCardTransaction.CreditCard.BillingAddress.State = 'RJ'
|
227
|
+
creditCardTransaction.CreditCard.BillingAddress.Street = 'Mos Eisley Cantina'
|
228
|
+
creditCardTransaction.CreditCard.BillingAddress.ZipCode = '20001000'
|
229
|
+
creditCardTransaction.CreditCard.CreditCardBrand = 'Visa'
|
230
|
+
creditCardTransaction.CreditCard.CreditCardNumber = '4111111111111111'
|
231
|
+
creditCardTransaction.CreditCard.ExpMonth = 10
|
232
|
+
creditCardTransaction.CreditCard.ExpYear = 22
|
233
|
+
creditCardTransaction.CreditCard.HolderName = 'LUKE SKYWALKER'
|
234
|
+
creditCardTransaction.CreditCard.SecurityCode = '123'
|
235
|
+
creditCardTransaction.InstallmentCount = 1
|
236
|
+
|
237
|
+
shoppingCartItem = Gateway::ShoppingCartItemCollection.new
|
238
|
+
shoppingCartItem.Description = 'Red Lightsaber'
|
239
|
+
shoppingCartItem.DiscountAmountInCents = 0
|
240
|
+
shoppingCartItem.ItemReference = 'NumeroDoProduto'
|
241
|
+
shoppingCartItem.Name = 'Lightsaber'
|
242
|
+
shoppingCartItem.Quantity = 1
|
243
|
+
shoppingCartItem.TotalCostInCents = 18000
|
244
|
+
shoppingCartItem.UnitCostInCents = 0
|
245
|
+
|
246
|
+
shoppingCartCollection = Gateway::ShoppingCartCollection.new
|
247
|
+
shoppingCartCollection.DeliveryAddress.City = 'Galaxy far far away'
|
248
|
+
shoppingCartCollection.DeliveryAddress.Complement = 'Bridge'
|
249
|
+
shoppingCartCollection.DeliveryAddress.Country = 'Brazil'
|
250
|
+
shoppingCartCollection.DeliveryAddress.District = 'Command Room'
|
251
|
+
shoppingCartCollection.DeliveryAddress.Number = '321'
|
252
|
+
shoppingCartCollection.DeliveryAddress.State = 'RJ'
|
253
|
+
shoppingCartCollection.DeliveryAddress.Street = 'Death Star'
|
254
|
+
shoppingCartCollection.DeliveryAddress.ZipCode = '10002000'
|
255
|
+
shoppingCartCollection.FreighCostInCents = 2000
|
256
|
+
shoppingCartCollection.ShoppingCartItemCollection << shoppingCartItem
|
257
|
+
|
258
|
+
# creates request object for transaction creation
|
259
|
+
createSaleRequest = Gateway::CreateSaleRequest.new
|
260
|
+
|
261
|
+
buyerAddress = Gateway::BuyerAddress.new
|
262
|
+
buyerAddress.AddressType = 'Residential'
|
263
|
+
buyerAddress.City = 'Tatooine'
|
264
|
+
buyerAddress.Complement = ''
|
265
|
+
buyerAddress.Country = 'Brazil'
|
266
|
+
buyerAddress.District = 'Mos Eisley'
|
267
|
+
buyerAddress.Number = '123'
|
268
|
+
buyerAddress.State = 'RJ'
|
269
|
+
buyerAddress.Street = 'Mos Eisley Cantina'
|
270
|
+
buyerAddress.ZipCode = '20001000'
|
271
|
+
|
272
|
+
createSaleRequest.Buyer.AddressCollection << buyerAddress
|
273
|
+
createSaleRequest.Buyer.Birthdate = DateTime.new(1990,8,20,0,0,0).strftime("%Y-%m-%dT%H:%M:%S")
|
274
|
+
createSaleRequest.Buyer.BuyerReference = 'C3PO'
|
275
|
+
createSaleRequest.Buyer.DocumentNumber = '12345678901'
|
276
|
+
createSaleRequest.Buyer.DocumentType = 'CPF'
|
277
|
+
createSaleRequest.Buyer.Email = 'lskywalker@r2d2.com'
|
278
|
+
createSaleRequest.Buyer.EmailType = 'Personal'
|
279
|
+
createSaleRequest.Buyer.Gender = 'M'
|
280
|
+
createSaleRequest.Buyer.HomePhone = '(21)123456789'
|
281
|
+
createSaleRequest.Buyer.MobilePhone = '(21)987654321'
|
282
|
+
createSaleRequest.Buyer.Name = 'Luke Skywalker'
|
283
|
+
createSaleRequest.Buyer.PersonType = 'Person'
|
284
|
+
createSaleRequest.Buyer.WorkPhone = '(21)28467902'
|
285
|
+
|
286
|
+
# adds to the credit card transaction collection
|
287
|
+
createSaleRequest.CreditCardTransactionCollection << creditCardTransaction
|
288
|
+
createSaleRequest.Options.IsAntiFraudEnabled = true
|
289
|
+
createSaleRequest.Order.OrderReference = 'NumeroDoPedido'
|
290
|
+
|
291
|
+
# adds shopping cart collection in the request
|
292
|
+
createSaleRequest.ShoppingCartCollection << shoppingCartCollection
|
293
|
+
|
294
|
+
# make the request and returns a response hash
|
295
|
+
response = gateway.CreateSale(createSaleRequest)
|
296
|
+
|
297
|
+
expect(response[:ErrorReport]).to eq nil
|
298
|
+
end
|
299
|
+
|
300
|
+
it 'should consult the order with order key' do
|
301
|
+
querySaleRequest = Gateway::QuerySaleRequest.new
|
302
|
+
createSaleRequest = Gateway::CreateSaleRequest.new
|
303
|
+
|
304
|
+
boletoTransaction = Gateway::BoletoTransaction.new
|
305
|
+
boletoTransaction.AmountInCents = 100
|
306
|
+
boletoTransaction.BankNumber = '237'
|
307
|
+
boletoTransaction.DocumentNumber = '12345678901'
|
308
|
+
boletoTransaction.Instructions = 'Pagar antes do vencimento'
|
309
|
+
boletoTransaction.TransactionReference = 'BoletoTest#Ruby01'
|
310
|
+
boletoTransaction.Options.CurrencyIso = 'BRL'
|
311
|
+
boletoTransaction.Options.DaysToAddInBoletoExpirationDate = 5
|
312
|
+
|
313
|
+
createSaleRequest.BoletoTransactionCollection << boletoTransaction
|
314
|
+
|
315
|
+
boleto_response = gateway.CreateSale(createSaleRequest)
|
316
|
+
|
317
|
+
querySaleRequest.OrderKey = boleto_response['OrderResult']['OrderKey']
|
318
|
+
responseQuery = gateway.Query(Gateway::QuerySaleRequest.QuerySaleRequestEnum[:OrderKey], querySaleRequest.OrderKey)
|
319
|
+
|
320
|
+
orderKey = responseQuery["SaleDataCollection"][0]["OrderData"]["OrderKey"]
|
321
|
+
|
322
|
+
expect(orderKey).to eq querySaleRequest.OrderKey
|
323
|
+
end
|
324
|
+
|
325
|
+
it 'should consult the order with order reference' do
|
326
|
+
querySaleRequest = Gateway::QuerySaleRequest.new
|
327
|
+
createSaleRequest = Gateway::CreateSaleRequest.new
|
328
|
+
|
329
|
+
boletoTransaction = Gateway::BoletoTransaction.new
|
330
|
+
boletoTransaction.AmountInCents = 100
|
331
|
+
boletoTransaction.BankNumber = '237'
|
332
|
+
boletoTransaction.DocumentNumber = '12345678901'
|
333
|
+
boletoTransaction.Instructions = 'Pagar antes do vencimento'
|
334
|
+
boletoTransaction.TransactionReference = 'BoletoTest#Ruby01'
|
335
|
+
boletoTransaction.Options.CurrencyIso = 'BRL'
|
336
|
+
boletoTransaction.Options.DaysToAddInBoletoExpirationDate = 5
|
337
|
+
|
338
|
+
createSaleRequest.Order.OrderReference = 'RubyOrderReferenceUnitTest'
|
339
|
+
createSaleRequest.BoletoTransactionCollection << boletoTransaction
|
340
|
+
|
341
|
+
boleto_response = gateway.CreateSale(createSaleRequest)
|
342
|
+
|
343
|
+
querySaleRequest.OrderReference = boleto_response['OrderResult']['OrderReference']
|
344
|
+
responseQuery = gateway.Query(Gateway::QuerySaleRequest.QuerySaleRequestEnum[:OrderReference], querySaleRequest.OrderReference)
|
345
|
+
|
346
|
+
orderReference = responseQuery["SaleDataCollection"][0]["OrderData"]["OrderReference"]
|
347
|
+
|
348
|
+
expect(orderReference).to eq querySaleRequest.OrderReference
|
349
|
+
end
|
350
|
+
|
351
|
+
it 'should do a retry method' do
|
352
|
+
retrySaleRequest = Gateway::RetrySaleRequest.new
|
353
|
+
retrySaleCreditCardTransactionItem = Gateway::RetrySaleCreditCardTransaction.new
|
354
|
+
|
355
|
+
createSaleRequest = Gateway::CreateSaleRequest.new
|
356
|
+
creditCardTransactionItem = Gateway::CreditCardTransaction.new
|
357
|
+
creditCardTransactionItem.AmountInCents = 100
|
358
|
+
creditCardTransactionItem.CreditCard.CreditCardBrand = 'Visa'
|
359
|
+
creditCardTransactionItem.CreditCard.CreditCardNumber = '41111111111111'
|
360
|
+
creditCardTransactionItem.CreditCard.ExpMonth = 10
|
361
|
+
creditCardTransactionItem.CreditCard.ExpYear = 19
|
362
|
+
creditCardTransactionItem.CreditCard.HolderName = 'Maria do Carmo'
|
363
|
+
creditCardTransactionItem.CreditCard.SecurityCode = '123'
|
364
|
+
creditCardTransactionItem.CreditCardOperation = 'AuthAndCapture'
|
365
|
+
creditCardTransactionItem.InstallmentCount = 1
|
366
|
+
creditCardTransactionItem.Options.CurrencyIso = 'BRL'
|
367
|
+
creditCardTransactionItem.Options.PaymentMethodCode = 1
|
368
|
+
creditCardTransactionItem.TransactionReference = 'RubySDK-RetryTest'
|
369
|
+
|
370
|
+
createSaleRequest.CreditCardTransactionCollection << creditCardTransactionItem
|
371
|
+
createSaleRequest.Order.OrderReference = 'RubySDK-RetryTest'
|
372
|
+
|
373
|
+
# cria o pedido que sera usado para retentativa
|
374
|
+
responseCreate = gateway.CreateSale(createSaleRequest)
|
375
|
+
|
376
|
+
# pega o orderkey e o transaction key da resposta que sao necessarios para fazer a retentativa
|
377
|
+
orderKey = responseCreate["OrderResult"]["OrderKey"]
|
378
|
+
transactionKey = responseCreate['CreditCardTransactionResultCollection'][0]['TransactionKey']
|
379
|
+
|
380
|
+
# monta o objeto de retentativa
|
381
|
+
retrySaleCreditCardTransactionItem.SecurityCode = '123'
|
382
|
+
retrySaleCreditCardTransactionItem.TransactionKey = transactionKey
|
383
|
+
retrySaleRequest.OrderKey = orderKey
|
384
|
+
retrySaleRequest.RetrySaleCreditCardTransactionCollection << retrySaleCreditCardTransactionItem
|
385
|
+
|
386
|
+
# faz a requisicao de retentativa
|
387
|
+
response = gateway.Retry(retrySaleRequest)
|
388
|
+
|
389
|
+
# espera que o transaction key seja igual, significa que foi tudo ok no teste
|
390
|
+
responseTransactionKey = response['CreditCardTransactionResultCollection'][0]['TransactionKey']
|
391
|
+
|
392
|
+
expect(responseTransactionKey).to eq transactionKey
|
393
|
+
|
394
|
+
end
|
395
|
+
|
396
|
+
it 'should do a retry method with only order key' do
|
397
|
+
createSaleRequest = Gateway::CreateSaleRequest.new
|
398
|
+
creditCardTransactionItem = Gateway::CreditCardTransaction.new
|
399
|
+
creditCardTransactionItem.AmountInCents = 100
|
400
|
+
creditCardTransactionItem.CreditCard.CreditCardBrand = 'Visa'
|
401
|
+
creditCardTransactionItem.CreditCard.CreditCardNumber = '41111111111111'
|
402
|
+
creditCardTransactionItem.CreditCard.ExpMonth = 10
|
403
|
+
creditCardTransactionItem.CreditCard.ExpYear = 22
|
404
|
+
creditCardTransactionItem.CreditCard.HolderName = 'Maria do Carmo'
|
405
|
+
creditCardTransactionItem.CreditCard.SecurityCode = '123'
|
406
|
+
creditCardTransactionItem.CreditCardOperation = 'AuthAndCapture'
|
407
|
+
creditCardTransactionItem.TransactionReference = 'RubySDK-RetryTest'
|
408
|
+
|
409
|
+
createSaleRequest.CreditCardTransactionCollection << creditCardTransactionItem
|
410
|
+
createSaleRequest.Order.OrderReference = 'RubySDK-RetryTest'
|
411
|
+
|
412
|
+
# cria o pedido que sera usado para retentativa
|
413
|
+
responseCreate = gateway.CreateSale(createSaleRequest)
|
414
|
+
|
415
|
+
# pega o orderkey e o transaction key da resposta que sao necessarios para fazer a retentativa
|
416
|
+
orderKey = responseCreate["OrderResult"]["OrderKey"]
|
417
|
+
transactionKey = responseCreate['CreditCardTransactionResultCollection'][0]['TransactionKey']
|
418
|
+
|
419
|
+
retrySaleRequest = Gateway::RetrySaleRequest.new
|
420
|
+
|
421
|
+
# monta o objeto de retentativa
|
422
|
+
retrySaleRequest.OrderKey = orderKey
|
423
|
+
|
424
|
+
# faz a requisicao de retentativa
|
425
|
+
response = gateway.Retry(retrySaleRequest)
|
426
|
+
|
427
|
+
expect(response['ErrorReport']).to eq nil
|
428
|
+
|
429
|
+
end
|
430
|
+
|
431
|
+
it 'should cancel a transaction' do
|
432
|
+
createSaleRequest = Gateway::CreateSaleRequest.new
|
433
|
+
creditCardTransactionItem = Gateway::CreditCardTransaction.new
|
434
|
+
creditCardTransactionItem.AmountInCents = 100
|
435
|
+
creditCardTransactionItem.CreditCard.CreditCardBrand = 'Visa'
|
436
|
+
creditCardTransactionItem.CreditCard.CreditCardNumber = '41111111111111'
|
437
|
+
creditCardTransactionItem.CreditCard.ExpMonth = 10
|
438
|
+
creditCardTransactionItem.CreditCard.ExpYear = 19
|
439
|
+
creditCardTransactionItem.CreditCard.HolderName = 'Maria do Carmo'
|
440
|
+
creditCardTransactionItem.CreditCard.SecurityCode = '123'
|
441
|
+
creditCardTransactionItem.CreditCardOperation = 'AuthAndCapture'
|
442
|
+
creditCardTransactionItem.InstallmentCount = 1
|
443
|
+
creditCardTransactionItem.Options.CurrencyIso = 'BRL'
|
444
|
+
creditCardTransactionItem.Options.PaymentMethodCode = 1
|
445
|
+
creditCardTransactionItem.TransactionReference = 'RubySDK-CancelTest'
|
446
|
+
|
447
|
+
createSaleRequest.CreditCardTransactionCollection << creditCardTransactionItem
|
448
|
+
createSaleRequest.Order.OrderReference = 'RubySDK-CancelTest'
|
449
|
+
|
450
|
+
# cria o pedido que sera usado para cancelamento
|
451
|
+
responseCreate = gateway.CreateSale(createSaleRequest)
|
452
|
+
|
453
|
+
# pega o orderkey e o transaction key da resposta que sao necessarios para fazer o cancelamento
|
454
|
+
orderKey = responseCreate["OrderResult"]["OrderKey"]
|
455
|
+
transactionKey = responseCreate['CreditCardTransactionResultCollection'][0]['TransactionKey']
|
456
|
+
|
457
|
+
# itens necessarios para cancelamento da transacao de cartao de credito
|
458
|
+
cancelCreditCardTransactionItem = Gateway::ManageCreditCardTransaction.new
|
459
|
+
cancelCreditCardTransactionItem.AmountInCents = 100
|
460
|
+
cancelCreditCardTransactionItem.TransactionKey = transactionKey
|
461
|
+
cancelCreditCardTransactionItem.TransactionReference = 'RubySDK-CancelTest'
|
462
|
+
|
463
|
+
# monta o objeto para cancelamento de transacao
|
464
|
+
cancelSaleRequest = Gateway::ManageSaleRequest.new
|
465
|
+
cancelSaleRequest.OrderKey = orderKey
|
466
|
+
cancelSaleRequest.CreditCardTransactionCollection << cancelCreditCardTransactionItem
|
467
|
+
|
468
|
+
response = gateway.Cancel(cancelSaleRequest)
|
469
|
+
|
470
|
+
expect(response[:ErrorReport]).to eq nil
|
471
|
+
end
|
472
|
+
|
473
|
+
it 'should capture a transaction' do
|
474
|
+
createSaleRequest = Gateway::CreateSaleRequest.new
|
475
|
+
creditCardTransactionItem = Gateway::CreditCardTransaction.new
|
476
|
+
creditCardTransactionItem.AmountInCents = 100
|
477
|
+
creditCardTransactionItem.CreditCard.CreditCardBrand = 'Visa'
|
478
|
+
creditCardTransactionItem.CreditCard.CreditCardNumber = '41111111111111'
|
479
|
+
creditCardTransactionItem.CreditCard.ExpMonth = 10
|
480
|
+
creditCardTransactionItem.CreditCard.ExpYear = 19
|
481
|
+
creditCardTransactionItem.CreditCard.HolderName = 'Maria do Carmo'
|
482
|
+
creditCardTransactionItem.CreditCard.SecurityCode = '123'
|
483
|
+
creditCardTransactionItem.CreditCardOperation = 'AuthAndCapture'
|
484
|
+
creditCardTransactionItem.InstallmentCount = 1
|
485
|
+
creditCardTransactionItem.Options.CurrencyIso = 'BRL'
|
486
|
+
creditCardTransactionItem.Options.PaymentMethodCode = 1
|
487
|
+
creditCardTransactionItem.TransactionReference = 'RubySDK-CaptureTest'
|
488
|
+
|
489
|
+
createSaleRequest.CreditCardTransactionCollection << creditCardTransactionItem
|
490
|
+
createSaleRequest.Order.OrderReference = 'RubySDK-CaptureTest'
|
491
|
+
|
492
|
+
# cria o pedido que sera usado para captura
|
493
|
+
responseCreate = gateway.CreateSale(createSaleRequest)
|
494
|
+
|
495
|
+
# pega o orderkey e o transaction key da resposta que sao necessarios para fazer a captura
|
496
|
+
orderKey = responseCreate["OrderResult"]["OrderKey"]
|
497
|
+
transactionKey = responseCreate['CreditCardTransactionResultCollection'][0]['TransactionKey']
|
498
|
+
|
499
|
+
# itens necessarios para captura da transacao de cartao de credito
|
500
|
+
captureCreditCardTransactionItem = Gateway::ManageCreditCardTransaction.new
|
501
|
+
captureCreditCardTransactionItem.AmountInCents = 100
|
502
|
+
captureCreditCardTransactionItem.TransactionKey = transactionKey
|
503
|
+
captureCreditCardTransactionItem.TransactionReference = 'RubySDK-CaptureTest'
|
504
|
+
|
505
|
+
# monta o objeto para cancelamento de transacao
|
506
|
+
captureSaleRequest = Gateway::ManageSaleRequest.new
|
507
|
+
captureSaleRequest.OrderKey = orderKey
|
508
|
+
captureSaleRequest.CreditCardTransactionCollection << captureCreditCardTransactionItem
|
509
|
+
|
510
|
+
response = gateway.Capture(captureSaleRequest)
|
511
|
+
|
512
|
+
# espera que o ErrorReport seja nulo, significa que foi tudo ok na transação
|
513
|
+
expect(response['ErrorReport']).to eq nil
|
514
|
+
end
|
515
|
+
|
516
|
+
it 'should do a parse xml to notification interpretation' do
|
517
|
+
creditCardTransactionItem = Gateway::CreditCardTransaction.new
|
518
|
+
creditCardTransactionItem.AmountInCents = 100
|
519
|
+
creditCardTransactionItem.TransactionReference = 'Ruby PostNotification Test'
|
520
|
+
creditCardTransactionItem.InstallmentCount = 1
|
521
|
+
creditCardTransactionItem.CreditCardOperation = 'AuthAndCapture'
|
522
|
+
creditCardTransactionItem.CreditCard.CreditCardBrand = 'Visa'
|
523
|
+
creditCardTransactionItem.CreditCard.CreditCardNumber = '4111111111111111'
|
524
|
+
creditCardTransactionItem.CreditCard.HolderName = 'Bruce Wayne'
|
525
|
+
creditCardTransactionItem.CreditCard.SecurityCode = '123'
|
526
|
+
creditCardTransactionItem.CreditCard.ExpMonth = 5
|
527
|
+
creditCardTransactionItem.CreditCard.ExpYear = 20
|
528
|
+
creditCardTransactionItem.Options.PaymentMethodCode = 1
|
529
|
+
|
530
|
+
createSaleRequest = Gateway::CreateSaleRequest.new
|
531
|
+
createSaleRequest.CreditCardTransactionCollection << creditCardTransactionItem
|
532
|
+
|
533
|
+
response_hash = gateway.CreateSale(createSaleRequest)
|
534
|
+
|
535
|
+
credit_card_result = response_hash['CreditCardTransactionResultCollection'][0]
|
536
|
+
|
537
|
+
expect(credit_card_result['Success']).to eq true
|
538
|
+
# expect(credit_card_result['CreditCardOperation']).to eq 'AuthOnly'
|
539
|
+
# expect(credit_card_result['CreditCardTransactionStatus']).to eq 'AuthorizedPendingCapture'
|
540
|
+
|
541
|
+
captureCreditCardTransactionItem = Gateway::ManageCreditCardTransaction.new
|
542
|
+
captureCreditCardTransactionItem.AmountInCents = creditCardTransactionItem.AmountInCents
|
543
|
+
captureCreditCardTransactionItem.TransactionKey = credit_card_result['TransactionKey']
|
544
|
+
captureCreditCardTransactionItem.TransactionReference = creditCardTransactionItem.TransactionReference
|
545
|
+
|
546
|
+
captureSale = Gateway::ManageSaleRequest.new
|
547
|
+
captureSale.OrderKey = response_hash['OrderResult']['OrderKey']
|
548
|
+
captureSale.CreditCardTransactionCollection << captureCreditCardTransactionItem
|
549
|
+
|
550
|
+
captureResponse = gateway.Capture(captureSale)
|
551
|
+
|
552
|
+
expect(captureResponse['ErrorReport']).to eq nil
|
553
|
+
|
554
|
+
|
555
|
+
xml = TestHelper.CreateFakePostNotification(response_hash, captureResponse)
|
556
|
+
|
557
|
+
response = gateway.ParseXmlToNotification(xml)
|
558
|
+
|
559
|
+
expect(response.nil?).to eq false
|
560
|
+
end
|
561
|
+
|
562
|
+
it 'should do a parse on online debit xml' do
|
563
|
+
xml = '<StatusNotification xmlns="http://schemas.datacontract.org/2004/07/Gateway.NotificationService.DataContract"
|
564
|
+
xmlns:i="http://www.w3.org/2001/XMLSchema-instance"
|
565
|
+
i:schemaLocation="http://schemas.datacontract.org/2004/07/Gateway.NotificationService.DataContract StatusNotificationXmlSchema.xsd">
|
566
|
+
<AmountInCents>500</AmountInCents>
|
567
|
+
<AmountPaidInCents>0</AmountPaidInCents>
|
568
|
+
<BoletoTransaction>
|
569
|
+
<AmountInCents>500</AmountInCents>
|
570
|
+
<AmountPaidInCents>0</AmountPaidInCents>
|
571
|
+
<BoletoExpirationDate>2013-02-08T00:00:00</BoletoExpirationDate>
|
572
|
+
<NossoNumero>0123456789</NossoNumero>
|
573
|
+
<StatusChangedDate>2012-11-06T08:55:49.753</StatusChangedDate>
|
574
|
+
<TransactionKey>4111D523-9A83-4BE3-94D2-160F1BC9C4BD</TransactionKey>
|
575
|
+
<TransactionReference>B2E32108</TransactionReference>
|
576
|
+
<PreviousBoletoTransactionStatus>Generated</PreviousBoletoTransactionStatus>
|
577
|
+
<BoletoTransactionStatus>Paid</BoletoTransactionStatus>
|
578
|
+
</BoletoTransaction>
|
579
|
+
<CreditCardTransaction>
|
580
|
+
<Acquirer>Simulator</Acquirer>
|
581
|
+
<AmountInCents>2000</AmountInCents>
|
582
|
+
<AuthorizedAmountInCents>2000</AuthorizedAmountInCents>
|
583
|
+
<CapturedAmountInCents>2000</CapturedAmountInCents>
|
584
|
+
<CreditCardBrand>Visa</CreditCardBrand>
|
585
|
+
<RefundedAmountInCents i:nil="true"/>
|
586
|
+
<StatusChangedDate>2012-11-06T10:52:55.93</StatusChangedDate>
|
587
|
+
<TransactionIdentifier>123456</TransactionIdentifier>
|
588
|
+
<TransactionKey>351FC96A-7F42-4269-AF3C-1E3C179C1CD0</TransactionKey>
|
589
|
+
<TransactionReference>24de0432</TransactionReference>
|
590
|
+
<UniqueSequentialNumber>123456</UniqueSequentialNumber>
|
591
|
+
<VoidedAmountInCents i:nil="true"/>
|
592
|
+
<PreviousCreditCardTransactionStatus>AuthorizedPendingCapture</PreviousCreditCardTransactionStatus>
|
593
|
+
<CreditCardTransactionStatus>Captured</CreditCardTransactionStatus>
|
594
|
+
</CreditCardTransaction>
|
595
|
+
|
596
|
+
<OnlineDebitTransaction>
|
597
|
+
<AmountInCents>100</AmountInCents>
|
598
|
+
<AmountPaidInCents>0</AmountPaidInCents>
|
599
|
+
<StatusChangedDate>2013-06-27T19:46:46.87</StatusChangedDate>
|
600
|
+
<TransactionKey>fb3f158a-0309-4ae3-b8ef-3c5ac2d603d2</TransactionKey>
|
601
|
+
<TransactionReference>30bfee13-c908-4e3b-9f70-1f84dbe79fbf</TransactionReference>
|
602
|
+
<PreviousOnlineDebitTransactionStatus>OpenedPendingPayment</PreviousOnlineDebitTransactionStatus>
|
603
|
+
<OnlineDebitTransactionStatus>NotPaid</OnlineDebitTransactionStatus>
|
604
|
+
</OnlineDebitTransaction>
|
605
|
+
|
606
|
+
<MerchantKey>B1B1092C-8681-40C2-A734-500F22683D9B</MerchantKey>
|
607
|
+
<OrderKey>18471F05-9F6D-4497-9C24-D60D5BBB6BBE</OrderKey>
|
608
|
+
<OrderReference>64a85875</OrderReference>
|
609
|
+
<OrderStatus>Paid</OrderStatus>
|
610
|
+
</StatusNotification>'
|
611
|
+
|
612
|
+
response = gateway.ParseXmlToNotification(xml)
|
613
|
+
|
614
|
+
expect(response.nil?).to eq false
|
615
|
+
end
|
616
|
+
|
617
|
+
it 'should bring the transaction report file' do
|
618
|
+
date = Date.new(2015, 9, 19)
|
619
|
+
result = gateway.TransactionReportFile(date)
|
620
|
+
split_commas = result.split(',')
|
621
|
+
|
622
|
+
expect(split_commas[1]).to eq '20150919'
|
623
|
+
end
|
624
|
+
|
625
|
+
it 'should parse the transaction report file received' do
|
626
|
+
date = Date.new(2015, 9, 19)
|
627
|
+
request_to_parse = gateway.TransactionReportFile(date)
|
628
|
+
result = gateway.TransactionReportFileParser(request_to_parse)
|
629
|
+
|
630
|
+
expect(result['Header'].TransactionProcessedDate).to eq '20150919'
|
631
|
+
end
|
632
|
+
|
633
|
+
it 'should save the transaction report file at selected path' do
|
634
|
+
date = Date.new(2015, 9, 19)
|
635
|
+
|
636
|
+
file = Tempfile.new('Test')
|
637
|
+
gateway.TransactionReportFileDownloader(date, 'Test', file.path)
|
638
|
+
|
639
|
+
file_path = file.path.to_s + 'Test.txt'
|
640
|
+
file_exist = File.exist?(file_path)
|
641
|
+
|
642
|
+
file.close
|
643
|
+
file.unlink
|
644
|
+
|
645
|
+
expect(file_exist).to eq true
|
646
|
+
end
|
647
|
+
|
648
|
+
it 'should get credit card instant buy key deprecated' do
|
649
|
+
credit_card_transaction = Gateway::CreditCardTransaction.new
|
650
|
+
credit_card_transaction.CreditCard.CreditCardNumber = '4111111111111111'
|
651
|
+
credit_card_transaction.CreditCard.CreditCardBrand = 'Visa'
|
652
|
+
credit_card_transaction.CreditCard.ExpMonth = 10
|
653
|
+
credit_card_transaction.CreditCard.ExpYear = 2018
|
654
|
+
credit_card_transaction.CreditCard.SecurityCode = '123'
|
655
|
+
credit_card_transaction.CreditCard.HolderName = 'Luke Skywalker'
|
656
|
+
credit_card_transaction.AmountInCents = 100
|
657
|
+
|
658
|
+
sale_request = Gateway::CreateSaleRequest.new
|
659
|
+
sale_request.CreditCardTransactionCollection << credit_card_transaction
|
660
|
+
|
661
|
+
sale_response = gateway.CreateSale(sale_request)
|
662
|
+
|
663
|
+
expect(sale_response['ErrorReport']).to eq nil
|
664
|
+
|
665
|
+
instant_buy_key = sale_response['CreditCardTransactionResultCollection'][0]['CreditCard']['InstantBuyKey']
|
666
|
+
|
667
|
+
response = gateway.InstantBuyKey(instant_buy_key)
|
668
|
+
|
669
|
+
expect(response['ErrorReport']).to eq nil
|
670
|
+
end
|
671
|
+
|
672
|
+
it 'should get credit card instant buy key' do
|
673
|
+
credit_card_transaction = Gateway::CreditCardTransaction.new
|
674
|
+
credit_card_transaction.CreditCard.CreditCardNumber = '4111111111111111'
|
675
|
+
credit_card_transaction.CreditCard.CreditCardBrand = 'Visa'
|
676
|
+
credit_card_transaction.CreditCard.ExpMonth = 10
|
677
|
+
credit_card_transaction.CreditCard.ExpYear = 2018
|
678
|
+
credit_card_transaction.CreditCard.SecurityCode = '123'
|
679
|
+
credit_card_transaction.CreditCard.HolderName = 'Luke Skywalker'
|
680
|
+
credit_card_transaction.AmountInCents = 100
|
681
|
+
|
682
|
+
sale_request = Gateway::CreateSaleRequest.new
|
683
|
+
sale_request.CreditCardTransactionCollection << credit_card_transaction
|
684
|
+
|
685
|
+
sale_response = gateway.CreateSale(sale_request)
|
686
|
+
|
687
|
+
expect(sale_response['ErrorReport']).to eq nil
|
688
|
+
|
689
|
+
instant_buy_key = sale_response['CreditCardTransactionResultCollection'][0]['CreditCard']['InstantBuyKey']
|
690
|
+
|
691
|
+
response = gateway.GetCreditCard(instant_buy_key)
|
692
|
+
|
693
|
+
expect(response['ErrorReport']).to eq nil
|
694
|
+
end
|
695
|
+
|
696
|
+
it 'should delete credit card instant buy key' do
|
697
|
+
credit_card_transaction = Gateway::CreditCardTransaction.new
|
698
|
+
credit_card_transaction.CreditCard.CreditCardNumber = '4111111111111111'
|
699
|
+
credit_card_transaction.CreditCard.CreditCardBrand = 'Visa'
|
700
|
+
credit_card_transaction.CreditCard.ExpMonth = 10
|
701
|
+
credit_card_transaction.CreditCard.ExpYear = 2018
|
702
|
+
credit_card_transaction.CreditCard.SecurityCode = '123'
|
703
|
+
credit_card_transaction.CreditCard.HolderName = 'Luke Skywalker' + DateTime.now().to_s
|
704
|
+
credit_card_transaction.AmountInCents = 100
|
705
|
+
|
706
|
+
sale_request = Gateway::CreateSaleRequest.new
|
707
|
+
sale_request.CreditCardTransactionCollection << credit_card_transaction
|
708
|
+
|
709
|
+
sale_response = gateway.CreateSale(sale_request)
|
710
|
+
|
711
|
+
expect(sale_response['ErrorReport']).to eq nil
|
712
|
+
|
713
|
+
instant_buy_key = sale_response['CreditCardTransactionResultCollection'][0]['CreditCard']['InstantBuyKey']
|
714
|
+
|
715
|
+
response = gateway.DeleteCreditCard(instant_buy_key)
|
716
|
+
|
717
|
+
expect(response['Success']).to eq true
|
718
|
+
end
|
719
|
+
|
720
|
+
it 'should consult get credit card with buyer key deprecated' do
|
721
|
+
|
722
|
+
credit_card_transaction = Gateway::CreditCardTransaction.new
|
723
|
+
credit_card_transaction.CreditCard.CreditCardNumber = '4111111111111111'
|
724
|
+
credit_card_transaction.CreditCard.CreditCardBrand = 'Visa'
|
725
|
+
credit_card_transaction.CreditCard.ExpMonth = 10
|
726
|
+
credit_card_transaction.CreditCard.ExpYear = 2018
|
727
|
+
credit_card_transaction.CreditCard.SecurityCode = '123'
|
728
|
+
credit_card_transaction.CreditCard.HolderName = 'Luke Skywalker'
|
729
|
+
credit_card_transaction.AmountInCents = 100
|
730
|
+
|
731
|
+
sale_request = Gateway::CreateSaleRequest.new
|
732
|
+
sale_request.Buyer.Name = 'Anakin Skywalker'
|
733
|
+
sale_request.Buyer.Birthdate = Date.new(1994, 9, 26).strftime("%Y-%m-%dT%H:%M:%S")
|
734
|
+
sale_request.Buyer.DocumentNumber = '12345678901'
|
735
|
+
sale_request.Buyer.DocumentType = 'CPF'
|
736
|
+
sale_request.Buyer.PersonType = 'Person'
|
737
|
+
sale_request.Buyer.Gender = 'M'
|
738
|
+
sale_request.CreditCardTransactionCollection << credit_card_transaction
|
739
|
+
|
740
|
+
sale_response = gateway.CreateSale(sale_request)
|
741
|
+
|
742
|
+
expect(sale_response['ErrorReport']).to eq nil
|
743
|
+
|
744
|
+
response = gateway.BuyerKey(sale_response['BuyerKey'])
|
745
|
+
|
746
|
+
expect(response['ErrorReport']).to eq nil
|
747
|
+
end
|
748
|
+
|
749
|
+
it 'should consult get credit card with buyer key' do
|
750
|
+
|
751
|
+
credit_card_transaction = Gateway::CreditCardTransaction.new
|
752
|
+
credit_card_transaction.CreditCard.CreditCardNumber = '4111111111111111'
|
753
|
+
credit_card_transaction.CreditCard.CreditCardBrand = 'Visa'
|
754
|
+
credit_card_transaction.CreditCard.ExpMonth = 10
|
755
|
+
credit_card_transaction.CreditCard.ExpYear = 2018
|
756
|
+
credit_card_transaction.CreditCard.SecurityCode = '123'
|
757
|
+
credit_card_transaction.CreditCard.HolderName = 'Luke Skywalker'
|
758
|
+
credit_card_transaction.AmountInCents = 100
|
759
|
+
|
760
|
+
sale_request = Gateway::CreateSaleRequest.new
|
761
|
+
sale_request.Buyer.Name = 'Anakin Skywalker'
|
762
|
+
sale_request.Buyer.Birthdate = Date.new(1994, 9, 26).strftime("%Y-%m-%dT%H:%M:%S")
|
763
|
+
sale_request.Buyer.DocumentNumber = '12345678901'
|
764
|
+
sale_request.Buyer.DocumentType = 'CPF'
|
765
|
+
sale_request.Buyer.PersonType = 'Person'
|
766
|
+
sale_request.Buyer.Gender = 'M'
|
767
|
+
sale_request.CreditCardTransactionCollection << credit_card_transaction
|
768
|
+
|
769
|
+
sale_response = gateway.CreateSale(sale_request)
|
770
|
+
|
771
|
+
expect(sale_response['ErrorReport']).to eq nil
|
772
|
+
|
773
|
+
response = gateway.GetCreditCardWithBuyerKey(sale_response['BuyerKey'])
|
774
|
+
|
775
|
+
expect(response['ErrorReport']).to eq nil
|
776
|
+
end
|
777
|
+
|
778
|
+
it 'should create a credit card' do
|
779
|
+
create_instant_buy_data = Gateway::CreateInstantBuyDataRequest.new
|
780
|
+
create_instant_buy_data.CreditCardNumber = '4111111111111111'
|
781
|
+
create_instant_buy_data.ExpMonth = 10
|
782
|
+
create_instant_buy_data.ExpYear = 2018
|
783
|
+
create_instant_buy_data.SecurityCode = '123'
|
784
|
+
create_instant_buy_data.HolderName = 'Luke Skywalker'
|
785
|
+
create_instant_buy_data.CreditCardBrand = 'Visa'
|
786
|
+
create_instant_buy_data.IsOneDollarAuthEnabled = false
|
787
|
+
create_instant_buy_data.BillingAddress.City = 'Rio de Janeiro'
|
788
|
+
create_instant_buy_data.BillingAddress.Complement = 'Em frente ao Aeroporto'
|
789
|
+
create_instant_buy_data.BillingAddress.Country = 'Brazil'
|
790
|
+
create_instant_buy_data.BillingAddress.District = 'Centro'
|
791
|
+
create_instant_buy_data.BillingAddress.Number = '123'
|
792
|
+
create_instant_buy_data.BillingAddress.State = 'RJ'
|
793
|
+
create_instant_buy_data.BillingAddress.Street = 'Av. General Justo'
|
794
|
+
create_instant_buy_data.BillingAddress.ZipCode = '20270004'
|
795
|
+
|
796
|
+
response = gateway.CreateCreditCard(create_instant_buy_data)
|
797
|
+
|
798
|
+
expect(response['ErrorReport']).to eq nil
|
799
|
+
end
|
800
|
+
|
801
|
+
it 'should create credit card with buyerkey in it' do
|
802
|
+
address = Gateway::BuyerAddress.new
|
803
|
+
address.AddressType = 'Residential'
|
804
|
+
address.City = 'Tatooine'
|
805
|
+
address.Complement = ''
|
806
|
+
address.Country = 'Brazil'
|
807
|
+
address.District = 'Mos Eisley'
|
808
|
+
address.Number = '123'
|
809
|
+
address.State = 'RJ'
|
810
|
+
address.Street = 'Mos Eisley Cantina'
|
811
|
+
address.ZipCode = '20001000'
|
812
|
+
|
813
|
+
buyer_request = Gateway::CreateBuyerRequest.new
|
814
|
+
buyer_request.AddressCollection << address
|
815
|
+
buyer_request.Birthdate = DateTime.new(1990,8,20,0,0,0).strftime("%Y-%m-%dT%H:%M:%S")
|
816
|
+
buyer_request.BuyerCategory = 'Normal'
|
817
|
+
buyer_request.BuyerReference = 'C3PO'
|
818
|
+
buyer_request.CreateDateInMerchant = DateTime.new(2015,12,11,18,36,45).strftime("%Y-%m-%dT%H:%M:%S")
|
819
|
+
buyer_request.DocumentNumber = '12345678901'
|
820
|
+
buyer_request.DocumentType = 'CPF'
|
821
|
+
buyer_request.Email = 'lskywalker@r2d2.com'
|
822
|
+
buyer_request.EmailType = 'Personal'
|
823
|
+
buyer_request.FacebookId = 'lukeskywalker8917'
|
824
|
+
buyer_request.Gender = 'M'
|
825
|
+
buyer_request.HomePhone = '(21)123456789'
|
826
|
+
buyer_request.LastBuyerUpdateInMerchant = DateTime.now.strftime("%Y-%m-%dT%H:%M:%S")
|
827
|
+
buyer_request.MobilePhone = '(21)987654321'
|
828
|
+
buyer_request.Name = 'Luke Skywalker'
|
829
|
+
buyer_request.PersonType = 'Person'
|
830
|
+
buyer_request.TwitterId = '@lukeskywalker8917'
|
831
|
+
buyer_request.WorkPhone = '(21)28467902'
|
832
|
+
|
833
|
+
new_buyer_response = gateway.CreateBuyer(buyer_request)
|
834
|
+
buyer_key = new_buyer_response['BuyerKey']
|
835
|
+
|
836
|
+
create_instant_buy_data = Gateway::CreateInstantBuyDataRequest.new
|
837
|
+
create_instant_buy_data.CreditCardNumber = '4111111111111111'
|
838
|
+
create_instant_buy_data.ExpMonth = 10
|
839
|
+
create_instant_buy_data.ExpYear = 2018
|
840
|
+
create_instant_buy_data.SecurityCode = '123'
|
841
|
+
create_instant_buy_data.HolderName = 'Luke Skywalker'
|
842
|
+
create_instant_buy_data.CreditCardBrand = 'Visa'
|
843
|
+
create_instant_buy_data.IsOneDollarAuthEnabled = false
|
844
|
+
create_instant_buy_data.BuyerKey = buyer_key
|
845
|
+
create_instant_buy_data.BillingAddress.City = 'Rio de Janeiro'
|
846
|
+
create_instant_buy_data.BillingAddress.Complement = 'Em frente ao Aeroporto'
|
847
|
+
create_instant_buy_data.BillingAddress.Country = 'Brazil'
|
848
|
+
create_instant_buy_data.BillingAddress.District = 'Centro'
|
849
|
+
create_instant_buy_data.BillingAddress.Number = '123'
|
850
|
+
create_instant_buy_data.BillingAddress.State = 'RJ'
|
851
|
+
create_instant_buy_data.BillingAddress.Street = 'Av. General Justo'
|
852
|
+
create_instant_buy_data.BillingAddress.ZipCode = '20270004'
|
853
|
+
|
854
|
+
response = gateway.CreateCreditCard(create_instant_buy_data)
|
855
|
+
|
856
|
+
expect(response['Success']).to eq true
|
857
|
+
end
|
858
|
+
|
859
|
+
it 'should create a credit card without billing address' do
|
860
|
+
create_instant_buy_data = Gateway::CreateInstantBuyDataRequest.new
|
861
|
+
create_instant_buy_data.CreditCardNumber = '4111111111111111'
|
862
|
+
create_instant_buy_data.ExpMonth = 10
|
863
|
+
create_instant_buy_data.ExpYear = 2018
|
864
|
+
create_instant_buy_data.SecurityCode = '123'
|
865
|
+
create_instant_buy_data.HolderName = 'Luke Skywalker'
|
866
|
+
create_instant_buy_data.CreditCardBrand = 'Visa'
|
867
|
+
|
868
|
+
response = gateway.CreateCreditCard(create_instant_buy_data)
|
869
|
+
|
870
|
+
expect(response['ErrorReport']).to eq nil
|
871
|
+
end
|
872
|
+
|
873
|
+
it 'should update the credit card' do
|
874
|
+
create_instant_buy_data = Gateway::CreateInstantBuyDataRequest.new
|
875
|
+
create_instant_buy_data.CreditCardNumber = '4111111111111111'
|
876
|
+
create_instant_buy_data.ExpMonth = 10
|
877
|
+
create_instant_buy_data.ExpYear = 2018
|
878
|
+
create_instant_buy_data.SecurityCode = '123'
|
879
|
+
create_instant_buy_data.HolderName = 'Luke Skywalker'
|
880
|
+
create_instant_buy_data.CreditCardBrand = 'Visa'
|
881
|
+
create_instant_buy_data.IsOneDollarAuthEnabled = false
|
882
|
+
create_instant_buy_data.BillingAddress.City = 'Rio de Janeiro'
|
883
|
+
create_instant_buy_data.BillingAddress.Complement = 'Em frente ao Aeroporto'
|
884
|
+
create_instant_buy_data.BillingAddress.Country = 'Brazil'
|
885
|
+
create_instant_buy_data.BillingAddress.District = 'Centro'
|
886
|
+
create_instant_buy_data.BillingAddress.Number = '123'
|
887
|
+
create_instant_buy_data.BillingAddress.State = 'RJ'
|
888
|
+
create_instant_buy_data.BillingAddress.Street = 'Av. General Justo'
|
889
|
+
create_instant_buy_data.BillingAddress.ZipCode = '20270004'
|
890
|
+
|
891
|
+
create_credit_card = gateway.CreateCreditCard(create_instant_buy_data)
|
892
|
+
|
893
|
+
credit_card_transaction = Gateway::CreditCardTransaction.new
|
894
|
+
credit_card_transaction.CreditCard.CreditCardNumber = '4111111111111111'
|
895
|
+
credit_card_transaction.CreditCard.CreditCardBrand = 'Visa'
|
896
|
+
credit_card_transaction.CreditCard.ExpMonth = 10
|
897
|
+
credit_card_transaction.CreditCard.ExpYear = 2018
|
898
|
+
credit_card_transaction.CreditCard.SecurityCode = '123'
|
899
|
+
credit_card_transaction.CreditCard.HolderName = 'Luke Skywalker'
|
900
|
+
credit_card_transaction.AmountInCents = 100
|
901
|
+
|
902
|
+
sale_request = Gateway::CreateSaleRequest.new
|
903
|
+
sale_request.Buyer.Name = 'Anakin Skywalker'
|
904
|
+
sale_request.Buyer.Birthdate = Date.new(1994, 9, 26).strftime("%Y-%m-%dT%H:%M:%S")
|
905
|
+
sale_request.Buyer.DocumentNumber = '12345678901'
|
906
|
+
sale_request.Buyer.DocumentType = 'CPF'
|
907
|
+
sale_request.Buyer.PersonType = 'Person'
|
908
|
+
sale_request.Buyer.Gender = 'M'
|
909
|
+
sale_request.CreditCardTransactionCollection << credit_card_transaction
|
910
|
+
|
911
|
+
sale_response = gateway.CreateSale(sale_request)
|
912
|
+
|
913
|
+
instant_buy_key = create_credit_card['InstantBuyKey']
|
914
|
+
|
915
|
+
buyer_key = sale_response['BuyerKey']
|
916
|
+
|
917
|
+
update_instant_buy_data_request = Gateway::UpdateInstantBuyDataRequest.new
|
918
|
+
update_instant_buy_data_request.BuyerKey = buyer_key
|
919
|
+
|
920
|
+
response = gateway.UpdateCreditCard(instant_buy_key, update_instant_buy_data_request)
|
921
|
+
|
922
|
+
expect(response['Success']).to eq true
|
923
|
+
end
|
924
|
+
|
925
|
+
it 'should do a credit card transaction with instant buy key' do
|
926
|
+
credit_card_transaction = Gateway::CreditCardTransaction.new
|
927
|
+
credit_card_transaction.CreditCard.CreditCardNumber = '4111111111111111'
|
928
|
+
credit_card_transaction.CreditCard.CreditCardBrand = 'Visa'
|
929
|
+
credit_card_transaction.CreditCard.ExpMonth = 10
|
930
|
+
credit_card_transaction.CreditCard.ExpYear = 2018
|
931
|
+
credit_card_transaction.CreditCard.SecurityCode = '123'
|
932
|
+
credit_card_transaction.CreditCard.HolderName = 'Luke Skywalker'
|
933
|
+
credit_card_transaction.AmountInCents = 100
|
934
|
+
|
935
|
+
sale_request = Gateway::CreateSaleRequest.new
|
936
|
+
sale_request.CreditCardTransactionCollection << credit_card_transaction
|
937
|
+
|
938
|
+
sale_response = gateway.CreateSale(sale_request)
|
939
|
+
|
940
|
+
expect(sale_response['ErrorReport']).to eq nil
|
941
|
+
|
942
|
+
instant_buy_key = sale_response['CreditCardTransactionResultCollection'][0]['CreditCard']['InstantBuyKey']
|
943
|
+
|
944
|
+
# coleta dados do cartao
|
945
|
+
creditCardTransaction = Gateway::CreditCardTransaction.new
|
946
|
+
creditCardTransaction.AmountInCents = 100
|
947
|
+
creditCardTransaction.CreditCard.InstantBuyKey = instant_buy_key
|
948
|
+
|
949
|
+
# cria a transacao
|
950
|
+
createSaleRequest = Gateway::CreateSaleRequest.new
|
951
|
+
createSaleRequest.CreditCardTransactionCollection << creditCardTransaction
|
952
|
+
|
953
|
+
# faz a requisicao de criação de transacao, retorna um hash com a resposta
|
954
|
+
response = gateway.CreateSale(createSaleRequest)
|
955
|
+
|
956
|
+
expect(response['ErrorReport']).to eq nil
|
957
|
+
end
|
958
|
+
|
959
|
+
it 'should get the buyer with buyer key' do
|
960
|
+
credit_card_transaction = Gateway::CreditCardTransaction.new
|
961
|
+
credit_card_transaction.CreditCard.CreditCardNumber = '4111111111111111'
|
962
|
+
credit_card_transaction.CreditCard.CreditCardBrand = 'Visa'
|
963
|
+
credit_card_transaction.CreditCard.ExpMonth = 10
|
964
|
+
credit_card_transaction.CreditCard.ExpYear = 2018
|
965
|
+
credit_card_transaction.CreditCard.SecurityCode = '123'
|
966
|
+
credit_card_transaction.CreditCard.HolderName = 'Luke Skywalker'
|
967
|
+
credit_card_transaction.AmountInCents = 100
|
968
|
+
|
969
|
+
sale_request = Gateway::CreateSaleRequest.new
|
970
|
+
sale_request.Buyer.Name = 'Anakin Skywalker'
|
971
|
+
sale_request.Buyer.Birthdate = Date.new(1994, 9, 26).strftime("%Y-%m-%dT%H:%M:%S")
|
972
|
+
sale_request.Buyer.DocumentNumber = '12345678901'
|
973
|
+
sale_request.Buyer.DocumentType = 'CPF'
|
974
|
+
sale_request.Buyer.PersonType = 'Person'
|
975
|
+
sale_request.Buyer.Gender = 'M'
|
976
|
+
sale_request.CreditCardTransactionCollection << credit_card_transaction
|
977
|
+
|
978
|
+
sale_response = gateway.CreateSale(sale_request)
|
979
|
+
|
980
|
+
expect(sale_response['ErrorReport']).to eq nil
|
981
|
+
|
982
|
+
response = gateway.GetBuyer(sale_response['BuyerKey'])
|
983
|
+
|
984
|
+
expect(response['ErrorReport']).to eq nil
|
985
|
+
end
|
986
|
+
|
987
|
+
it 'should create buyer with buyer request' do
|
988
|
+
address = Gateway::BuyerAddress.new
|
989
|
+
address.AddressType = 'Residential'
|
990
|
+
address.City = 'Tatooine'
|
991
|
+
address.Complement = ''
|
992
|
+
address.Country = 'Brazil'
|
993
|
+
address.District = 'Mos Eisley'
|
994
|
+
address.Number = '123'
|
995
|
+
address.State = 'RJ'
|
996
|
+
address.Street = 'Mos Eisley Cantina'
|
997
|
+
address.ZipCode = '20001000'
|
998
|
+
|
999
|
+
buyer_request = Gateway::CreateBuyerRequest.new
|
1000
|
+
buyer_request.AddressCollection << address
|
1001
|
+
buyer_request.Birthdate = DateTime.new(1990,8,20,0,0,0).strftime("%Y-%m-%dT%H:%M:%S")
|
1002
|
+
buyer_request.BuyerCategory = 'Normal'
|
1003
|
+
buyer_request.BuyerReference = 'C3PO'
|
1004
|
+
buyer_request.CreateDateInMerchant = DateTime.new(2015,12,11,18,36,45).strftime("%Y-%m-%dT%H:%M:%S")
|
1005
|
+
buyer_request.DocumentNumber = '12345678901'
|
1006
|
+
buyer_request.DocumentType = 'CPF'
|
1007
|
+
buyer_request.Email = 'lskywalker@r2d2.com'
|
1008
|
+
buyer_request.EmailType = 'Personal'
|
1009
|
+
buyer_request.FacebookId = 'lukeskywalker8917'
|
1010
|
+
buyer_request.Gender = 'M'
|
1011
|
+
buyer_request.HomePhone = '(21)123456789'
|
1012
|
+
buyer_request.LastBuyerUpdateInMerchant = DateTime.now.strftime("%Y-%m-%dT%H:%M:%S")
|
1013
|
+
buyer_request.MobilePhone = '(21)987654321'
|
1014
|
+
buyer_request.Name = 'Luke Skywalker'
|
1015
|
+
buyer_request.PersonType = 'Person'
|
1016
|
+
buyer_request.TwitterId = '@lukeskywalker8917'
|
1017
|
+
buyer_request.WorkPhone = '(21)28467902'
|
1018
|
+
|
1019
|
+
response = gateway.CreateBuyer(buyer_request)
|
1020
|
+
|
1021
|
+
expect(response['Success']).to eq true
|
1022
|
+
end
|
1023
|
+
end
|