iyzipay 1.0.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +15 -0
- data/.gitignore +11 -0
- data/.rspec +2 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/.travis.yml +14 -0
- data/Gemfile +8 -0
- data/LICENSE.txt +21 -0
- data/README.md +3 -0
- data/Rakefile +5 -0
- data/VERSION +1 -0
- data/contributors +2 -0
- data/iyzipay.gemspec +24 -0
- data/lib/Iyzipay.rb +16 -0
- data/lib/iyzipay/http_client.rb +19 -0
- data/lib/iyzipay/iyzipay_resource.rb +59 -0
- data/lib/iyzipay/model.rb +43 -0
- data/lib/iyzipay/model/address.rb +17 -0
- data/lib/iyzipay/model/approval.rb +17 -0
- data/lib/iyzipay/model/basic_bkm.rb +17 -0
- data/lib/iyzipay/model/basic_bkm_initialize.rb +24 -0
- data/lib/iyzipay/model/basic_payment.rb +26 -0
- data/lib/iyzipay/model/basic_payment_post_auth.rb +19 -0
- data/lib/iyzipay/model/basic_payment_pre_auth.rb +26 -0
- data/lib/iyzipay/model/basic_threeds_initialize.rb +26 -0
- data/lib/iyzipay/model/basic_threeds_initialize_pre_auth.rb +26 -0
- data/lib/iyzipay/model/basic_threeds_payment.rb +18 -0
- data/lib/iyzipay/model/basket.rb +26 -0
- data/lib/iyzipay/model/basket_item_type.rb +8 -0
- data/lib/iyzipay/model/bin_number.rb +17 -0
- data/lib/iyzipay/model/bkm.rb +17 -0
- data/lib/iyzipay/model/bkm_initialize.rb +24 -0
- data/lib/iyzipay/model/bounced_bank_transfer_list.rb +17 -0
- data/lib/iyzipay/model/buyer.rb +25 -0
- data/lib/iyzipay/model/cancel.rb +18 -0
- data/lib/iyzipay/model/checkout_form.rb +17 -0
- data/lib/iyzipay/model/checkout_form_initialize.rb +29 -0
- data/lib/iyzipay/model/checkout_form_initialize_pre_auth.rb +29 -0
- data/lib/iyzipay/model/cross_booking_from_sub_merchant.rb +19 -0
- data/lib/iyzipay/model/cross_booking_to_sub_merchant.rb +19 -0
- data/lib/iyzipay/model/disapproval.rb +17 -0
- data/lib/iyzipay/model/installment_details.rb +19 -0
- data/lib/iyzipay/model/installment_info.rb +18 -0
- data/lib/iyzipay/model/installment_prices.rb +19 -0
- data/lib/iyzipay/model/payment.rb +28 -0
- data/lib/iyzipay/model/payment_card.rb +22 -0
- data/lib/iyzipay/model/payment_channel.rb +14 -0
- data/lib/iyzipay/model/payment_group.rb +9 -0
- data/lib/iyzipay/model/payment_post_auth.rb +19 -0
- data/lib/iyzipay/model/payment_pre_auth.rb +44 -0
- data/lib/iyzipay/model/payout_completed_transaction_list.rb +17 -0
- data/lib/iyzipay/model/refund.rb +19 -0
- data/lib/iyzipay/model/refund_charged_from_merchant.rb +19 -0
- data/lib/iyzipay/model/sub_merchant.rb +68 -0
- data/lib/iyzipay/model/sub_merchant_type.rb +9 -0
- data/lib/iyzipay/model/threeds_initialize.rb +28 -0
- data/lib/iyzipay/model/threeds_initialize_pre_auth.rb +31 -0
- data/lib/iyzipay/model/threeds_payment.rb +34 -0
- data/lib/iyzipay/options.rb +7 -0
- data/lib/iyzipay/pki_builder.rb +101 -0
- data/lib/iyzipay/version.rb +3 -0
- data/spec/approval_spec.rb +45 -0
- data/spec/basic_bkm_spec.rb +261 -0
- data/spec/basic_payment_post_auth_spec.rb +32 -0
- data/spec/basic_payment_pre_auth_spec.rb +71 -0
- data/spec/basic_payment_spec.rb +71 -0
- data/spec/basic_threeds_pre_auth_spec.rb +85 -0
- data/spec/basic_threeds_spec.rb +101 -0
- data/spec/bin_number_spec.rb +30 -0
- data/spec/bkm_spec.rb +111 -0
- data/spec/cancel_spec.rb +31 -0
- data/spec/checkout_form_pre_auth_spec.rb +92 -0
- data/spec/checkout_form_spec.rb +107 -0
- data/spec/cross_booking_spec.rb +49 -0
- data/spec/installment_spec.rb +31 -0
- data/spec/payment_post_auth_spec.rb +32 -0
- data/spec/payment_pre_auth_spec.rb +117 -0
- data/spec/payment_spec.rb +101 -0
- data/spec/refund_spec.rb +49 -0
- data/spec/retrieve_transactions_spec.rb +45 -0
- data/spec/spec_helper.rb +80 -0
- data/spec/sub_merchant_spec.rb +174 -0
- data/spec/threeds_pre_auth_spec.rb +139 -0
- metadata +185 -0
@@ -0,0 +1,45 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
require_relative 'spec_helper'
|
4
|
+
|
5
|
+
RSpec.describe 'Iyzipay' do
|
6
|
+
before :all do
|
7
|
+
@options = Iyzipay::Options.new
|
8
|
+
@options.api_key = 'your api key'
|
9
|
+
@options.secret_key = 'your secret key'
|
10
|
+
@options.base_url = 'https://api.iyzipay.com'
|
11
|
+
end
|
12
|
+
|
13
|
+
it 'should retrieve payout completed transactions' do
|
14
|
+
request = {
|
15
|
+
locale: 'tr',
|
16
|
+
conversationId: '123456789',
|
17
|
+
date: '2016-01-22 19:13:00'
|
18
|
+
}
|
19
|
+
refund = Iyzipay::Model::PayoutCompletedTransactionList.new.retrieve(request, @options)
|
20
|
+
begin
|
21
|
+
$stderr.puts refund.inspect
|
22
|
+
rescue
|
23
|
+
$stderr.puts 'oops'
|
24
|
+
raise
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
it 'should retrieve bounced bank transfers' do
|
29
|
+
request = {
|
30
|
+
locale: 'tr',
|
31
|
+
conversationId: '123456789',
|
32
|
+
date: '2016-01-22 19:13:00'
|
33
|
+
}
|
34
|
+
refund = Iyzipay::Model::BouncedBankTransferList.new.retrieve(request, @options)
|
35
|
+
begin
|
36
|
+
$stderr.puts refund.inspect
|
37
|
+
rescue
|
38
|
+
$stderr.puts 'oops'
|
39
|
+
raise
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
after :each do
|
44
|
+
end
|
45
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,80 @@
|
|
1
|
+
require_relative '../lib/Iyzipay.rb'
|
2
|
+
|
3
|
+
RSpec.configure do |config|
|
4
|
+
# rspec-expectations config goes here. You can use an alternate
|
5
|
+
# assertion/expectation library such as wrong or the stdlib/minitest
|
6
|
+
# assertions if you prefer.
|
7
|
+
config.expect_with :rspec do |expectations|
|
8
|
+
# This option will default to `true` in RSpec 4. It makes the `description`
|
9
|
+
# and `failure_message` of custom matchers include text for helper methods
|
10
|
+
# defined using `chain`, e.g.:
|
11
|
+
# be_bigger_than(2).and_smaller_than(4).description
|
12
|
+
# # => "be bigger than 2 and smaller than 4"
|
13
|
+
# ...rather than:
|
14
|
+
# # => "be bigger than 2"
|
15
|
+
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
16
|
+
end
|
17
|
+
|
18
|
+
# rspec-mocks config goes here. You can use an alternate test double
|
19
|
+
# library (such as bogus or mocha) by changing the `mock_with` option here.
|
20
|
+
config.mock_with :rspec do |mocks|
|
21
|
+
# Prevents you from mocking or stubbing a method that does not exist on
|
22
|
+
# a real object. This is generally recommended, and will default to
|
23
|
+
# `true` in RSpec 4.
|
24
|
+
mocks.verify_partial_doubles = true
|
25
|
+
end
|
26
|
+
|
27
|
+
# The settings below are suggested to provide a good initial experience
|
28
|
+
# with RSpec, but feel free to customize to your heart's content.
|
29
|
+
=begin
|
30
|
+
# These two settings work together to allow you to limit a spec run
|
31
|
+
# to individual examples or groups you care about by tagging them with
|
32
|
+
# `:focus` metadata. When nothing is tagged with `:focus`, all examples
|
33
|
+
# get run.
|
34
|
+
config.filter_run :focus
|
35
|
+
config.run_all_when_everything_filtered = true
|
36
|
+
|
37
|
+
# Allows RSpec to persist some state between runs in order to support
|
38
|
+
# the `--only-failures` and `--next-failure` CLI options. We recommend
|
39
|
+
# you configure your source control system to ignore this file.
|
40
|
+
config.example_status_persistence_file_path = "spec/examples.txt"
|
41
|
+
|
42
|
+
# Limits the available syntax to the non-monkey patched syntax that is
|
43
|
+
# recommended. For more details, see:
|
44
|
+
# - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
|
45
|
+
# - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
|
46
|
+
# - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
|
47
|
+
config.disable_monkey_patching!
|
48
|
+
|
49
|
+
# This setting enables warnings. It's recommended, but in some cases may
|
50
|
+
# be too noisy due to issues in dependencies.
|
51
|
+
config.warnings = true
|
52
|
+
|
53
|
+
# Many RSpec users commonly either run the entire suite or an individual
|
54
|
+
# file, and it's useful to allow more verbose output when running an
|
55
|
+
# individual spec file.
|
56
|
+
if config.files_to_run.one?
|
57
|
+
# Use the documentation formatter for detailed output,
|
58
|
+
# unless a formatter has already been configured
|
59
|
+
# (e.g. via a command-line flag).
|
60
|
+
config.default_formatter = 'doc'
|
61
|
+
end
|
62
|
+
|
63
|
+
# Print the 10 slowest examples and example groups at the
|
64
|
+
# end of the spec run, to help surface which specs are running
|
65
|
+
# particularly slow.
|
66
|
+
config.profile_examples = 10
|
67
|
+
|
68
|
+
# Run specs in random order to surface order dependencies. If you find an
|
69
|
+
# order dependency and want to debug it, you can fix the order by providing
|
70
|
+
# the seed, which is printed after each run.
|
71
|
+
# --seed 1234
|
72
|
+
config.order = :random
|
73
|
+
|
74
|
+
# Seed global randomization in this process using the `--seed` CLI option.
|
75
|
+
# Setting this allows you to use `--seed` to deterministically reproduce
|
76
|
+
# test failures related to randomization by passing the same `--seed` value
|
77
|
+
# as the one that triggered the failure.
|
78
|
+
Kernel.srand config.seed
|
79
|
+
=end
|
80
|
+
end
|
@@ -0,0 +1,174 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
require_relative 'spec_helper'
|
4
|
+
|
5
|
+
RSpec.describe 'Iyzipay' do
|
6
|
+
before :all do
|
7
|
+
@options = Iyzipay::Options.new
|
8
|
+
@options.api_key = 'your api key'
|
9
|
+
@options.secret_key = 'your secret key'
|
10
|
+
@options.base_url = 'https://api.iyzipay.com'
|
11
|
+
end
|
12
|
+
|
13
|
+
it 'should create personal sub merchant' do
|
14
|
+
request = {
|
15
|
+
locale: 'tr',
|
16
|
+
conversationId: '123456789',
|
17
|
+
subMerchantExternalId: 'B49224',
|
18
|
+
subMerchantType: Iyzipay::Model::SubMerchantType::PERSONAL,
|
19
|
+
address: 'Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1',
|
20
|
+
contactName: 'John',
|
21
|
+
contactSurname: 'Doe',
|
22
|
+
email: 'email@submerchantemail.com',
|
23
|
+
gsmNumber: '+905350000000',
|
24
|
+
name: 'John\'s market',
|
25
|
+
iban: 'TR180006200119000006672315',
|
26
|
+
identityNumber: '1234567890'
|
27
|
+
}
|
28
|
+
sub_merchant = Iyzipay::Model::SubMerchant.new.create(request, @options)
|
29
|
+
begin
|
30
|
+
$stderr.puts sub_merchant.inspect
|
31
|
+
rescue
|
32
|
+
$stderr.puts 'oops'
|
33
|
+
raise
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
it 'should create private sub merchant' do
|
38
|
+
request = {
|
39
|
+
locale: 'tr',
|
40
|
+
conversationId: '123456789',
|
41
|
+
subMerchantExternalId: 'S49222',
|
42
|
+
subMerchantType: Iyzipay::Model::SubMerchantType::PRIVATE_COMPANY,
|
43
|
+
address: 'Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1',
|
44
|
+
taxOffice: 'Tax office',
|
45
|
+
legalCompanyTitle: 'John Doe inc',
|
46
|
+
email: 'email@submerchantemail.com',
|
47
|
+
gsmNumber: '+905350000000',
|
48
|
+
name: 'John\'s market',
|
49
|
+
iban: 'TR180006200119000006672315',
|
50
|
+
identityNumber: '31300864726'
|
51
|
+
}
|
52
|
+
sub_merchant = Iyzipay::Model::SubMerchant.new.create(request, @options)
|
53
|
+
begin
|
54
|
+
$stderr.puts sub_merchant.inspect
|
55
|
+
rescue
|
56
|
+
$stderr.puts 'oops'
|
57
|
+
raise
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
it 'should create limited company sub merchant' do
|
62
|
+
request = {
|
63
|
+
locale: 'tr',
|
64
|
+
conversationId: '123456789',
|
65
|
+
subMerchantExternalId: 'AS49224',
|
66
|
+
subMerchantType: Iyzipay::Model::SubMerchantType::LIMITED_OR_JOINT_STOCK_COMPANY,
|
67
|
+
address: 'Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1',
|
68
|
+
taxOffice: 'Tax office',
|
69
|
+
taxNumber: '9261877',
|
70
|
+
legalCompanyTitle: 'XYZ inc',
|
71
|
+
email: 'email@submerchantemail.com',
|
72
|
+
gsmNumber: '+905350000000',
|
73
|
+
name: 'John\'s market',
|
74
|
+
iban: 'TR180006200119000006672315'
|
75
|
+
}
|
76
|
+
sub_merchant = Iyzipay::Model::SubMerchant.new.create(request, @options)
|
77
|
+
begin
|
78
|
+
$stderr.puts sub_merchant.inspect
|
79
|
+
rescue
|
80
|
+
$stderr.puts 'oops'
|
81
|
+
raise
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
it 'should update personal sub merchant' do
|
86
|
+
request = {
|
87
|
+
locale: 'tr',
|
88
|
+
conversationId: '123456789',
|
89
|
+
subMerchantExternalId: 'B49224',
|
90
|
+
subMerchantKey: 'sub merchant key',
|
91
|
+
iban: 'TR180006200119000006672315',
|
92
|
+
address: 'Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1',
|
93
|
+
contactName: 'Jane',
|
94
|
+
contactSurname: 'Doe',
|
95
|
+
email: 'email@submerchantemail.com',
|
96
|
+
gsmNumber: '+905350000000',
|
97
|
+
name: 'Jane\'s market',
|
98
|
+
identityNumber: '31300864726'
|
99
|
+
}
|
100
|
+
sub_merchant = Iyzipay::Model::SubMerchant.new.update(request, @options)
|
101
|
+
begin
|
102
|
+
$stderr.puts sub_merchant.inspect
|
103
|
+
rescue
|
104
|
+
$stderr.puts 'oops'
|
105
|
+
raise
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
it 'should update private sub merchant' do
|
110
|
+
request = {
|
111
|
+
locale: 'tr',
|
112
|
+
conversationId: '123456789',
|
113
|
+
subMerchantExternalId: 'S49222',
|
114
|
+
subMerchantKey: 'sub merchant key',
|
115
|
+
address: 'Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1',
|
116
|
+
taxOffice: 'Tax office',
|
117
|
+
legalCompanyTitle: 'Jane Doe inc',
|
118
|
+
email: 'email@submerchantemail.com',
|
119
|
+
gsmNumber: '+905350000000',
|
120
|
+
name: 'Jane\'s market',
|
121
|
+
iban: 'TR180006200119000006672315',
|
122
|
+
identityNumber: '31300864726'
|
123
|
+
}
|
124
|
+
sub_merchant = Iyzipay::Model::SubMerchant.new.update(request, @options)
|
125
|
+
begin
|
126
|
+
$stderr.puts sub_merchant.inspect
|
127
|
+
rescue
|
128
|
+
$stderr.puts 'oops'
|
129
|
+
raise
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
133
|
+
it 'should update limited company sub merchant' do
|
134
|
+
request = {
|
135
|
+
locale: 'tr',
|
136
|
+
conversationId: '123456789',
|
137
|
+
subMerchantExternalId: 'AS49224',
|
138
|
+
subMerchantKey: 'sub merchant key',
|
139
|
+
address: 'Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1',
|
140
|
+
taxOffice: 'Tax office',
|
141
|
+
taxNumber: '9261877',
|
142
|
+
legalCompanyTitle: 'ABC inc',
|
143
|
+
email: 'email@submerchantemail.com',
|
144
|
+
gsmNumber: '+905350000000',
|
145
|
+
name: 'Jane\'s market',
|
146
|
+
iban: 'TR180006200119000006672315'
|
147
|
+
}
|
148
|
+
sub_merchant = Iyzipay::Model::SubMerchant.new.update(request, @options)
|
149
|
+
begin
|
150
|
+
$stderr.puts sub_merchant.inspect
|
151
|
+
rescue
|
152
|
+
$stderr.puts 'oops'
|
153
|
+
raise
|
154
|
+
end
|
155
|
+
end
|
156
|
+
|
157
|
+
it 'should retrieve sub merchant' do
|
158
|
+
request = {
|
159
|
+
locale: 'tr',
|
160
|
+
conversationId: '123456789',
|
161
|
+
subMerchantExternalId: 'AS49224'
|
162
|
+
}
|
163
|
+
sub_merchant = Iyzipay::Model::SubMerchant.new.retrieve(request, @options)
|
164
|
+
begin
|
165
|
+
$stderr.puts sub_merchant.inspect
|
166
|
+
rescue
|
167
|
+
$stderr.puts 'oops'
|
168
|
+
raise
|
169
|
+
end
|
170
|
+
end
|
171
|
+
|
172
|
+
after :each do
|
173
|
+
end
|
174
|
+
end
|
@@ -0,0 +1,139 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
require_relative 'spec_helper'
|
4
|
+
|
5
|
+
RSpec.describe 'Iyzipay' do
|
6
|
+
before :all do
|
7
|
+
@options = Iyzipay::Options.new
|
8
|
+
@options.api_key = 'your api key'
|
9
|
+
@options.secret_key = 'your secret key'
|
10
|
+
@options.base_url = 'https://api.iyzipay.com'
|
11
|
+
end
|
12
|
+
|
13
|
+
it 'should create three payment with physical and virtual item for market place' do
|
14
|
+
payment_card = {
|
15
|
+
cardHolderName: 'John Doe',
|
16
|
+
cardNumber: '5528790000000008',
|
17
|
+
expireYear: '2030',
|
18
|
+
expireMonth: '12',
|
19
|
+
cvc: '123',
|
20
|
+
registerCard: 0
|
21
|
+
}
|
22
|
+
buyer = {
|
23
|
+
id: 'BY789',
|
24
|
+
name: 'John',
|
25
|
+
surname: 'Doe',
|
26
|
+
identityNumber: '74300864791',
|
27
|
+
email: 'email@email.com',
|
28
|
+
gsmNumber: '+905350000000',
|
29
|
+
registrationDate: '2013-04-21 15:12:09',
|
30
|
+
lastLoginDate: '2015-10-05 12:43:35',
|
31
|
+
registrationAddress: 'Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1',
|
32
|
+
city: 'Istanbul',
|
33
|
+
country: 'Turkey',
|
34
|
+
zipCode: '34732',
|
35
|
+
ip: '85.34.78.112'
|
36
|
+
}
|
37
|
+
address = {
|
38
|
+
address: 'Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1',
|
39
|
+
zipCode: '34732',
|
40
|
+
contactName: 'John Doe',
|
41
|
+
city: 'Istanbul',
|
42
|
+
country: 'Turkey'
|
43
|
+
}
|
44
|
+
|
45
|
+
item1 = {
|
46
|
+
id: 'BI101',
|
47
|
+
name: 'Binocular',
|
48
|
+
category1: 'Collectibles',
|
49
|
+
category2: 'Accessories',
|
50
|
+
itemType: Iyzipay::Model::BasketItemType::PHYSICAL,
|
51
|
+
price: '0.3',
|
52
|
+
subMerchantKey: 'sub merchant key',
|
53
|
+
subMerchantPrice: '0.27'
|
54
|
+
}
|
55
|
+
item2 = {
|
56
|
+
id: 'BI102',
|
57
|
+
name: 'Game code',
|
58
|
+
category1: 'Game',
|
59
|
+
category2: 'Online Game Items',
|
60
|
+
itemType: Iyzipay::Model::BasketItemType::VIRTUAL,
|
61
|
+
price: '0.5',
|
62
|
+
subMerchantKey: 'sub merchant key',
|
63
|
+
subMerchantPrice: '0.42'
|
64
|
+
}
|
65
|
+
item3 = {
|
66
|
+
id: 'BI103',
|
67
|
+
name: 'Usb',
|
68
|
+
category1: 'Electronics',
|
69
|
+
category2: 'Usb / Cable',
|
70
|
+
itemType: Iyzipay::Model::BasketItemType::PHYSICAL,
|
71
|
+
price: '0.2',
|
72
|
+
subMerchantKey: 'sub merchant key',
|
73
|
+
subMerchantPrice: '0.18'
|
74
|
+
}
|
75
|
+
request = {
|
76
|
+
locale: 'tr',
|
77
|
+
conversationId: '123456789',
|
78
|
+
price: '1.0',
|
79
|
+
paidPrice: '1.1',
|
80
|
+
installment: 1,
|
81
|
+
paymentChannel: Iyzipay::Model::PaymentChannel::WEB,
|
82
|
+
basketId: 'B67832',
|
83
|
+
paymentGroup: Iyzipay::Model::PaymentGroup::PRODUCT,
|
84
|
+
callbackUrl: 'https://www.merchant.com/callback',
|
85
|
+
paymentCard: payment_card,
|
86
|
+
buyer: buyer,
|
87
|
+
billingAddress: address,
|
88
|
+
shippingAddress: address,
|
89
|
+
basketItems: [item1, item2, item3]
|
90
|
+
}
|
91
|
+
threeds_initialize_pre_auth = Iyzipay::Model::ThreedsInitializePreAuth.new.create(request, @options)
|
92
|
+
begin
|
93
|
+
$stderr.puts threeds_initialize_pre_auth.inspect
|
94
|
+
|
95
|
+
threeds_initialize_dict = JSON.parse(threeds_initialize_pre_auth)
|
96
|
+
unless threeds_initialize_dict['threeDSHtmlContent'].nil?
|
97
|
+
$stderr.puts Base64.decode64(threeds_initialize_dict['threeDSHtmlContent']).inspect
|
98
|
+
end
|
99
|
+
rescue
|
100
|
+
$stderr.puts 'oops'
|
101
|
+
raise
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
it 'should auth threeds' do
|
106
|
+
request = {
|
107
|
+
locale: 'tr',
|
108
|
+
conversationId: '123456789',
|
109
|
+
paymentId: '1',
|
110
|
+
conversationData: 'conversation data',
|
111
|
+
}
|
112
|
+
threeds_payment = Iyzipay::Model::ThreedsPayment.new.create(request, @options)
|
113
|
+
begin
|
114
|
+
$stderr.puts threeds_payment.inspect
|
115
|
+
rescue
|
116
|
+
$stderr.puts 'oops'
|
117
|
+
raise
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
121
|
+
it 'should retrieve payment' do
|
122
|
+
request = {
|
123
|
+
locale: 'tr',
|
124
|
+
conversationId: '123456789',
|
125
|
+
paymentId: '9',
|
126
|
+
paymentConversationId: '123456789',
|
127
|
+
}
|
128
|
+
threeds_payment = Iyzipay::Model::PaymentPreAuth.new.retrieve(request, @options)
|
129
|
+
begin
|
130
|
+
$stderr.puts threeds_payment.inspect
|
131
|
+
rescue
|
132
|
+
$stderr.puts 'oops'
|
133
|
+
raise
|
134
|
+
end
|
135
|
+
end
|
136
|
+
|
137
|
+
after :each do
|
138
|
+
end
|
139
|
+
end
|
metadata
ADDED
@@ -0,0 +1,185 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: iyzipay
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.29
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Iyzico
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-05-12 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rest-client
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.8'
|
20
|
+
- - ! '>='
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 1.8.0
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '1.8'
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 1.8.0
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: rspec
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - ~>
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '3.3'
|
40
|
+
- - ! '>='
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: 3.3.0
|
43
|
+
type: :development
|
44
|
+
prerelease: false
|
45
|
+
version_requirements: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - ~>
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '3.3'
|
50
|
+
- - ! '>='
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: 3.3.0
|
53
|
+
- !ruby/object:Gem::Dependency
|
54
|
+
name: rspec-rails
|
55
|
+
requirement: !ruby/object:Gem::Requirement
|
56
|
+
requirements:
|
57
|
+
- - ~>
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: '3.3'
|
60
|
+
- - ! '>='
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: 3.3.0
|
63
|
+
type: :development
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - ~>
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '3.3'
|
70
|
+
- - ! '>='
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: 3.3.0
|
73
|
+
description: iyzipay api ruby client. You can sign up for an iyzico account at https://iyzico.com
|
74
|
+
email: iyzico-ci@iyzico.com
|
75
|
+
executables: []
|
76
|
+
extensions: []
|
77
|
+
extra_rdoc_files: []
|
78
|
+
files:
|
79
|
+
- .gitignore
|
80
|
+
- .rspec
|
81
|
+
- .ruby-gemset
|
82
|
+
- .ruby-version
|
83
|
+
- .travis.yml
|
84
|
+
- Gemfile
|
85
|
+
- LICENSE.txt
|
86
|
+
- README.md
|
87
|
+
- Rakefile
|
88
|
+
- VERSION
|
89
|
+
- contributors
|
90
|
+
- iyzipay.gemspec
|
91
|
+
- lib/Iyzipay.rb
|
92
|
+
- lib/iyzipay/http_client.rb
|
93
|
+
- lib/iyzipay/iyzipay_resource.rb
|
94
|
+
- lib/iyzipay/model.rb
|
95
|
+
- lib/iyzipay/model/address.rb
|
96
|
+
- lib/iyzipay/model/approval.rb
|
97
|
+
- lib/iyzipay/model/basic_bkm.rb
|
98
|
+
- lib/iyzipay/model/basic_bkm_initialize.rb
|
99
|
+
- lib/iyzipay/model/basic_payment.rb
|
100
|
+
- lib/iyzipay/model/basic_payment_post_auth.rb
|
101
|
+
- lib/iyzipay/model/basic_payment_pre_auth.rb
|
102
|
+
- lib/iyzipay/model/basic_threeds_initialize.rb
|
103
|
+
- lib/iyzipay/model/basic_threeds_initialize_pre_auth.rb
|
104
|
+
- lib/iyzipay/model/basic_threeds_payment.rb
|
105
|
+
- lib/iyzipay/model/basket.rb
|
106
|
+
- lib/iyzipay/model/basket_item_type.rb
|
107
|
+
- lib/iyzipay/model/bin_number.rb
|
108
|
+
- lib/iyzipay/model/bkm.rb
|
109
|
+
- lib/iyzipay/model/bkm_initialize.rb
|
110
|
+
- lib/iyzipay/model/bounced_bank_transfer_list.rb
|
111
|
+
- lib/iyzipay/model/buyer.rb
|
112
|
+
- lib/iyzipay/model/cancel.rb
|
113
|
+
- lib/iyzipay/model/checkout_form.rb
|
114
|
+
- lib/iyzipay/model/checkout_form_initialize.rb
|
115
|
+
- lib/iyzipay/model/checkout_form_initialize_pre_auth.rb
|
116
|
+
- lib/iyzipay/model/cross_booking_from_sub_merchant.rb
|
117
|
+
- lib/iyzipay/model/cross_booking_to_sub_merchant.rb
|
118
|
+
- lib/iyzipay/model/disapproval.rb
|
119
|
+
- lib/iyzipay/model/installment_details.rb
|
120
|
+
- lib/iyzipay/model/installment_info.rb
|
121
|
+
- lib/iyzipay/model/installment_prices.rb
|
122
|
+
- lib/iyzipay/model/payment.rb
|
123
|
+
- lib/iyzipay/model/payment_card.rb
|
124
|
+
- lib/iyzipay/model/payment_channel.rb
|
125
|
+
- lib/iyzipay/model/payment_group.rb
|
126
|
+
- lib/iyzipay/model/payment_post_auth.rb
|
127
|
+
- lib/iyzipay/model/payment_pre_auth.rb
|
128
|
+
- lib/iyzipay/model/payout_completed_transaction_list.rb
|
129
|
+
- lib/iyzipay/model/refund.rb
|
130
|
+
- lib/iyzipay/model/refund_charged_from_merchant.rb
|
131
|
+
- lib/iyzipay/model/sub_merchant.rb
|
132
|
+
- lib/iyzipay/model/sub_merchant_type.rb
|
133
|
+
- lib/iyzipay/model/threeds_initialize.rb
|
134
|
+
- lib/iyzipay/model/threeds_initialize_pre_auth.rb
|
135
|
+
- lib/iyzipay/model/threeds_payment.rb
|
136
|
+
- lib/iyzipay/options.rb
|
137
|
+
- lib/iyzipay/pki_builder.rb
|
138
|
+
- lib/iyzipay/version.rb
|
139
|
+
- spec/approval_spec.rb
|
140
|
+
- spec/basic_bkm_spec.rb
|
141
|
+
- spec/basic_payment_post_auth_spec.rb
|
142
|
+
- spec/basic_payment_pre_auth_spec.rb
|
143
|
+
- spec/basic_payment_spec.rb
|
144
|
+
- spec/basic_threeds_pre_auth_spec.rb
|
145
|
+
- spec/basic_threeds_spec.rb
|
146
|
+
- spec/bin_number_spec.rb
|
147
|
+
- spec/bkm_spec.rb
|
148
|
+
- spec/cancel_spec.rb
|
149
|
+
- spec/checkout_form_pre_auth_spec.rb
|
150
|
+
- spec/checkout_form_spec.rb
|
151
|
+
- spec/cross_booking_spec.rb
|
152
|
+
- spec/installment_spec.rb
|
153
|
+
- spec/payment_post_auth_spec.rb
|
154
|
+
- spec/payment_pre_auth_spec.rb
|
155
|
+
- spec/payment_spec.rb
|
156
|
+
- spec/refund_spec.rb
|
157
|
+
- spec/retrieve_transactions_spec.rb
|
158
|
+
- spec/spec_helper.rb
|
159
|
+
- spec/sub_merchant_spec.rb
|
160
|
+
- spec/threeds_pre_auth_spec.rb
|
161
|
+
homepage: http://rubygems.org/gems/iyzipay
|
162
|
+
licenses:
|
163
|
+
- MIT
|
164
|
+
metadata: {}
|
165
|
+
post_install_message:
|
166
|
+
rdoc_options: []
|
167
|
+
require_paths:
|
168
|
+
- lib
|
169
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - ! '>='
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: 2.1.6
|
174
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
175
|
+
requirements:
|
176
|
+
- - ! '>='
|
177
|
+
- !ruby/object:Gem::Version
|
178
|
+
version: '0'
|
179
|
+
requirements: []
|
180
|
+
rubyforge_project:
|
181
|
+
rubygems_version: 2.4.5
|
182
|
+
signing_key:
|
183
|
+
specification_version: 4
|
184
|
+
summary: iyzipay api ruby client
|
185
|
+
test_files: []
|