iyzipay 1.0.31 → 1.0.32
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 +8 -8
- data/README.md +12 -1
- data/VERSION +1 -1
- data/lib/iyzipay/model.rb +1 -0
- data/lib/iyzipay/model/basic_payment.rb +1 -0
- data/lib/iyzipay/model/basic_payment_post_auth.rb +1 -0
- data/lib/iyzipay/model/basic_payment_pre_auth.rb +1 -0
- data/lib/iyzipay/model/basic_threeds_initialize.rb +1 -0
- data/lib/iyzipay/model/basic_threeds_initialize_pre_auth.rb +1 -0
- data/lib/iyzipay/model/checkout_form_initialize.rb +1 -0
- data/lib/iyzipay/model/cross_booking_from_sub_merchant.rb +1 -0
- data/lib/iyzipay/model/cross_booking_to_sub_merchant.rb +1 -0
- data/lib/iyzipay/model/currency.rb +10 -0
- data/lib/iyzipay/model/payment_post_auth.rb +1 -0
- data/lib/iyzipay/model/refund.rb +1 -0
- data/lib/iyzipay/model/refund_charged_from_merchant.rb +1 -0
- data/lib/iyzipay/model/sub_merchant.rb +4 -0
- data/spec/approval_spec.rb +1 -1
- data/spec/basic_bkm_spec.rb +1 -1
- data/spec/basic_payment_post_auth_spec.rb +2 -1
- data/spec/basic_payment_pre_auth_spec.rb +3 -1
- data/spec/basic_payment_spec.rb +3 -1
- data/spec/basic_threeds_pre_auth_spec.rb +19 -1
- data/spec/basic_threeds_spec.rb +3 -1
- data/spec/bin_number_spec.rb +1 -1
- data/spec/bkm_spec.rb +1 -1
- data/spec/cancel_spec.rb +1 -1
- data/spec/checkout_form_pre_auth_spec.rb +1 -1
- data/spec/checkout_form_spec.rb +2 -1
- data/spec/cross_booking_spec.rb +3 -1
- data/spec/installment_spec.rb +1 -1
- data/spec/payment_post_auth_spec.rb +2 -1
- data/spec/payment_pre_auth_spec.rb +5 -2
- data/spec/payment_spec.rb +7 -4
- data/spec/refund_spec.rb +5 -3
- data/spec/retrieve_transactions_spec.rb +1 -1
- data/spec/sub_merchant_spec.rb +13 -7
- data/spec/threeds_payment_spec.rb +4 -2
- data/spec/threeds_pre_auth_spec.rb +3 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZGYxOGUyNTczMTE4MzIwNGVmYzg4NWI1Yjc5YzI0YjJkOGRmZTM1Nw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MTY3ODVjNDBmNWE3NmY2YmIwZTViZWY3ZWQxZDYxNThjMDJlODA4NA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MjM1ZTM1MmU2ZDAxMjE5MTExMjNkMGVjOGZkNGMxZDJjMjBiYjI0NjQzZDA5
|
10
|
+
NzBmZjE1OTdiYjhiNjA1NDhkZWU4NzEwM2IyYzZkODliYzM2ZWM0ZThlZjhl
|
11
|
+
OGJjZDNmMTIxNjg0YmFiZDljNDAxOGFmMjFiYzY5OGNjNGMyMWE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
Nzc3ZDk4ZWJjYmFmYWI5ODUzMDQ5OGJlOTI1ZTNjYTQ2NTFkZWE1YzhmMTA2
|
14
|
+
MDMwMTYxYTlmYTY0MGQzYzRiYTNlMTE2MjYyOGM5MGYyMWViZmY4ZmY1MDkz
|
15
|
+
ZDYyMTRiNjJlYTUxNzRiMmUyYmQ0OWNiNDc0MDIyYmYzOTc0ODY=
|
data/README.md
CHANGED
@@ -13,6 +13,16 @@ You can sign up for an iyzico account at https://iyzico.com
|
|
13
13
|
|
14
14
|
gem install iyzipay
|
15
15
|
|
16
|
+
## Bundler
|
17
|
+
|
18
|
+
``` ruby
|
19
|
+
source 'https://rubygems.org'
|
20
|
+
|
21
|
+
gem 'rails'
|
22
|
+
gem 'iyzipay'
|
23
|
+
|
24
|
+
```
|
25
|
+
|
16
26
|
# Usage
|
17
27
|
|
18
28
|
```ruby
|
@@ -21,7 +31,7 @@ before :all do
|
|
21
31
|
@options = Iyzipay::Options.new
|
22
32
|
@options.api_key = 'your api key'
|
23
33
|
@options.secret_key = 'your secret key'
|
24
|
-
@options.base_url = 'https://api.iyzipay.com'
|
34
|
+
@options.base_url = 'https://sandbox-api.iyzipay.com'
|
25
35
|
end
|
26
36
|
|
27
37
|
it 'should create payment with physical and virtual item for listing or subscription' do
|
@@ -89,6 +99,7 @@ it 'should create payment with physical and virtual item for listing or subscrip
|
|
89
99
|
paymentChannel: Iyzipay::Model::PaymentChannel::WEB,
|
90
100
|
basketId: 'B67832',
|
91
101
|
paymentGroup: Iyzipay::Model::PaymentGroup::SUBSCRIPTION,
|
102
|
+
currency: Iyzipay::Model::Currency::TRY,
|
92
103
|
paymentCard: payment_card,
|
93
104
|
buyer: buyer,
|
94
105
|
billingAddress: address,
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.32
|
data/lib/iyzipay/model.rb
CHANGED
@@ -17,6 +17,7 @@ module Iyzipay
|
|
17
17
|
append(:buyerIp, request[:buyerIp]).
|
18
18
|
append(:posOrderId, request[:posOrderId]).
|
19
19
|
append(:paymentCard, PaymentCard.to_pki_string(request[:paymentCard])).
|
20
|
+
append(:currency, request[:currency]).
|
20
21
|
append(:connectorName, request[:connectorName]).
|
21
22
|
append(:callbackUrl, request[:callbackUrl]).
|
22
23
|
get_request_string
|
@@ -17,6 +17,7 @@ module Iyzipay
|
|
17
17
|
append(:buyerIp, request[:buyerIp]).
|
18
18
|
append(:posOrderId, request[:posOrderId]).
|
19
19
|
append(:paymentCard, PaymentCard.to_pki_string(request[:paymentCard])).
|
20
|
+
append(:currency, request[:currency]).
|
20
21
|
append(:connectorName, request[:connectorName]).
|
21
22
|
append(:callbackUrl, request[:callbackUrl]).
|
22
23
|
get_request_string
|
@@ -17,6 +17,7 @@ module Iyzipay
|
|
17
17
|
append(:buyerIp, request[:buyerIp]).
|
18
18
|
append(:posOrderId, request[:posOrderId]).
|
19
19
|
append(:paymentCard, PaymentCard.to_pki_string(request[:paymentCard])).
|
20
|
+
append(:currency, request[:currency]).
|
20
21
|
append(:connectorName, request[:connectorName]).
|
21
22
|
append(:callbackUrl, request[:callbackUrl]).
|
22
23
|
get_request_string
|
@@ -17,6 +17,7 @@ module Iyzipay
|
|
17
17
|
append(:buyerIp, request[:buyerIp]).
|
18
18
|
append(:posOrderId, request[:posOrderId]).
|
19
19
|
append(:paymentCard, PaymentCard.to_pki_string(request[:paymentCard])).
|
20
|
+
append(:currency, request[:currency]).
|
20
21
|
append(:connectorName, request[:connectorName]).
|
21
22
|
append(:callbackUrl, request[:callbackUrl]).
|
22
23
|
get_request_string
|
@@ -18,6 +18,7 @@ module Iyzipay
|
|
18
18
|
append_array(:basketItems, Basket.to_pki_string(request[:basketItems])).
|
19
19
|
append(:callbackUrl, request[:callbackUrl]).
|
20
20
|
append(:paymentSource, request[:paymentSource]).
|
21
|
+
append(:currency, request[:currency]).
|
21
22
|
append(:posOrderId, request[:posOrderId]).
|
22
23
|
append_price(:paidPrice, request[:paidPrice]).
|
23
24
|
append(:forceThreeDS, request[:forceThreeDS]).
|
data/lib/iyzipay/model/refund.rb
CHANGED
@@ -30,6 +30,8 @@ module Iyzipay
|
|
30
30
|
append(:contactName, request[:contactName]).
|
31
31
|
append(:contactSurname, request[:contactSurname]).
|
32
32
|
append(:legalCompanyTitle, request[:legalCompanyTitle]).
|
33
|
+
append(:swiftCode, request[:swiftCode]).
|
34
|
+
append(:currency, request[:currency]).
|
33
35
|
append(:subMerchantExternalId, request[:subMerchantExternalId]).
|
34
36
|
append(:identityNumber, request[:identityNumber]).
|
35
37
|
append(:taxNumber, request[:taxNumber]).
|
@@ -50,6 +52,8 @@ module Iyzipay
|
|
50
52
|
append(:contactName, request[:contactName]).
|
51
53
|
append(:contactSurname, request[:contactSurname]).
|
52
54
|
append(:legalCompanyTitle, request[:legalCompanyTitle]).
|
55
|
+
append(:swiftCode, request[:swiftCode]).
|
56
|
+
append(:currency, request[:currency]).
|
53
57
|
append(:subMerchantKey, request[:subMerchantKey]).
|
54
58
|
append(:identityNumber, request[:identityNumber]).
|
55
59
|
append(:taxNumber, request[:taxNumber]).
|
data/spec/approval_spec.rb
CHANGED
@@ -7,7 +7,7 @@ RSpec.describe 'Iyzipay' do
|
|
7
7
|
@options = Iyzipay::Options.new
|
8
8
|
@options.api_key = 'your api key'
|
9
9
|
@options.secret_key = 'your secret key'
|
10
|
-
@options.base_url = 'https://api.iyzipay.com'
|
10
|
+
@options.base_url = 'https://sandbox-api.iyzipay.com'
|
11
11
|
end
|
12
12
|
|
13
13
|
it 'should approve payment item' do
|
data/spec/basic_bkm_spec.rb
CHANGED
@@ -7,7 +7,7 @@ RSpec.describe 'Iyzipay' do
|
|
7
7
|
@options = Iyzipay::Options.new
|
8
8
|
@options.api_key = 'your api key'
|
9
9
|
@options.secret_key = 'your secret key'
|
10
|
-
@options.base_url = 'https://api.iyzipay.com'
|
10
|
+
@options.base_url = 'https://sandbox-api.iyzipay.com'
|
11
11
|
end
|
12
12
|
|
13
13
|
it 'should initialize bkm express' do
|
@@ -7,7 +7,7 @@ RSpec.describe 'Iyzipay' do
|
|
7
7
|
@options = Iyzipay::Options.new
|
8
8
|
@options.api_key = 'your api key'
|
9
9
|
@options.secret_key = 'your secret key'
|
10
|
-
@options.base_url = 'https://api.iyzipay.com'
|
10
|
+
@options.base_url = 'https://sandbox-api.iyzipay.com'
|
11
11
|
end
|
12
12
|
|
13
13
|
it 'should post auth' do
|
@@ -17,6 +17,7 @@ RSpec.describe 'Iyzipay' do
|
|
17
17
|
paymentId: '252',
|
18
18
|
paidPrice: '1',
|
19
19
|
ip: '85.34.78.112',
|
20
|
+
currency: Iyzipay::Model::Currency::TRY
|
20
21
|
}
|
21
22
|
payment = Iyzipay::Model::BasicPaymentPostAuth.new.create(request, @options)
|
22
23
|
begin
|
@@ -7,7 +7,7 @@ RSpec.describe 'Iyzipay' do
|
|
7
7
|
@options = Iyzipay::Options.new
|
8
8
|
@options.api_key = 'your api key'
|
9
9
|
@options.secret_key = 'your secret key'
|
10
|
-
@options.base_url = 'https://api.iyzipay.com'
|
10
|
+
@options.base_url = 'https://sandbox-api.iyzipay.com'
|
11
11
|
end
|
12
12
|
|
13
13
|
it 'should pay with card' do
|
@@ -29,6 +29,7 @@ RSpec.describe 'Iyzipay' do
|
|
29
29
|
installment: 1,
|
30
30
|
paidPrice: '1',
|
31
31
|
price: '1',
|
32
|
+
currency: Iyzipay::Model::Currency::TRY,
|
32
33
|
paymentCard: payment_card
|
33
34
|
}
|
34
35
|
payment = Iyzipay::Model::BasicPaymentPreAuth.new.create(request, @options)
|
@@ -55,6 +56,7 @@ RSpec.describe 'Iyzipay' do
|
|
55
56
|
installment: 1,
|
56
57
|
paidPrice: '1',
|
57
58
|
price: '1',
|
59
|
+
currency: Iyzipay::Model::Currency::TRY,
|
58
60
|
paymentCard: payment_card
|
59
61
|
}
|
60
62
|
payment = Iyzipay::Model::BasicPaymentPreAuth.new.create(request, @options)
|
data/spec/basic_payment_spec.rb
CHANGED
@@ -7,7 +7,7 @@ RSpec.describe 'Iyzipay' do
|
|
7
7
|
@options = Iyzipay::Options.new
|
8
8
|
@options.api_key = 'your api key'
|
9
9
|
@options.secret_key = 'your secret key'
|
10
|
-
@options.base_url = 'https://api.iyzipay.com'
|
10
|
+
@options.base_url = 'https://sandbox-api.iyzipay.com'
|
11
11
|
end
|
12
12
|
|
13
13
|
it 'should pay with card' do
|
@@ -29,6 +29,7 @@ RSpec.describe 'Iyzipay' do
|
|
29
29
|
installment: 1,
|
30
30
|
paidPrice: '1',
|
31
31
|
price: '1',
|
32
|
+
currency: Iyzipay::Model::Currency::TRY,
|
32
33
|
paymentCard: payment_card
|
33
34
|
}
|
34
35
|
payment = Iyzipay::Model::BasicPayment.new.create(request, @options)
|
@@ -55,6 +56,7 @@ RSpec.describe 'Iyzipay' do
|
|
55
56
|
installment: 1,
|
56
57
|
paidPrice: '1',
|
57
58
|
price: '1',
|
59
|
+
currency: Iyzipay::Model::Currency::TRY,
|
58
60
|
paymentCard: payment_card
|
59
61
|
}
|
60
62
|
payment = Iyzipay::Model::BasicPayment.new.create(request, @options)
|
@@ -7,7 +7,7 @@ RSpec.describe 'Iyzipay' do
|
|
7
7
|
@options = Iyzipay::Options.new
|
8
8
|
@options.api_key = 'your api key'
|
9
9
|
@options.secret_key = 'your secret key'
|
10
|
-
@options.base_url = 'https://api.iyzipay.com'
|
10
|
+
@options.base_url = 'https://sandbox-api.iyzipay.com'
|
11
11
|
end
|
12
12
|
|
13
13
|
it 'should initialize threeds pre auth with card' do
|
@@ -30,6 +30,7 @@ RSpec.describe 'Iyzipay' do
|
|
30
30
|
paidPrice: '1',
|
31
31
|
price: '1',
|
32
32
|
callbackUrl: 'https://www.merchant.com/callback',
|
33
|
+
currency: Iyzipay::Model::Currency::TRY,
|
33
34
|
paymentCard: payment_card
|
34
35
|
}
|
35
36
|
threeds_initialize = Iyzipay::Model::BasicThreedsInitializePreAuth.new.create(request, @options)
|
@@ -63,6 +64,7 @@ RSpec.describe 'Iyzipay' do
|
|
63
64
|
paidPrice: '1',
|
64
65
|
price: '1',
|
65
66
|
callbackUrl: 'https://www.merchant.com/callback',
|
67
|
+
currency: Iyzipay::Model::Currency::TRY,
|
66
68
|
paymentCard: payment_card
|
67
69
|
}
|
68
70
|
threeds_initialize = Iyzipay::Model::BasicThreedsInitializePreAuth.new.create(request, @options)
|
@@ -80,6 +82,22 @@ RSpec.describe 'Iyzipay' do
|
|
80
82
|
end
|
81
83
|
end
|
82
84
|
|
85
|
+
it 'should auth threeds' do
|
86
|
+
request = {
|
87
|
+
locale: 'tr',
|
88
|
+
conversationId: '123456789',
|
89
|
+
paymentId: '1'
|
90
|
+
}
|
91
|
+
basic_threeds = Iyzipay::Model::BasicThreedsPayment.new.create(request, @options)
|
92
|
+
|
93
|
+
begin
|
94
|
+
$stderr.puts basic_threeds.inspect
|
95
|
+
rescue
|
96
|
+
$stderr.puts 'oops'
|
97
|
+
raise
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
83
101
|
after :each do
|
84
102
|
end
|
85
103
|
end
|
data/spec/basic_threeds_spec.rb
CHANGED
@@ -7,7 +7,7 @@ RSpec.describe 'Iyzipay' do
|
|
7
7
|
@options = Iyzipay::Options.new
|
8
8
|
@options.api_key = 'your api key'
|
9
9
|
@options.secret_key = 'your secret key'
|
10
|
-
@options.base_url = 'https://api.iyzipay.com'
|
10
|
+
@options.base_url = 'https://sandbox-api.iyzipay.com'
|
11
11
|
end
|
12
12
|
|
13
13
|
it 'should initialize threeds with card' do
|
@@ -30,6 +30,7 @@ RSpec.describe 'Iyzipay' do
|
|
30
30
|
paidPrice: '1',
|
31
31
|
price: '1',
|
32
32
|
callbackUrl: 'https://www.merchant.com/callback',
|
33
|
+
currency: Iyzipay::Model::Currency::TRY,
|
33
34
|
paymentCard: payment_card
|
34
35
|
}
|
35
36
|
threeds_initialize = Iyzipay::Model::BasicThreedsInitialize.new.create(request, @options)
|
@@ -63,6 +64,7 @@ RSpec.describe 'Iyzipay' do
|
|
63
64
|
paidPrice: '1',
|
64
65
|
price: '1',
|
65
66
|
callbackUrl: 'https://www.merchant.com/callback',
|
67
|
+
currency: Iyzipay::Model::Currency::TRY,
|
66
68
|
paymentCard: payment_card
|
67
69
|
}
|
68
70
|
threeds_initialize = Iyzipay::Model::BasicThreedsInitialize.new.create(request, @options)
|
data/spec/bin_number_spec.rb
CHANGED
@@ -7,7 +7,7 @@ RSpec.describe 'Iyzipay' do
|
|
7
7
|
@options = Iyzipay::Options.new
|
8
8
|
@options.api_key = 'your api key'
|
9
9
|
@options.secret_key = 'your secret key'
|
10
|
-
@options.base_url = 'https://api.iyzipay.com'
|
10
|
+
@options.base_url = 'https://sandbox-api.iyzipay.com'
|
11
11
|
end
|
12
12
|
|
13
13
|
it 'should retrieve bin number' do
|
data/spec/bkm_spec.rb
CHANGED
@@ -7,7 +7,7 @@ RSpec.describe 'Iyzipay' do
|
|
7
7
|
@options = Iyzipay::Options.new
|
8
8
|
@options.api_key = 'your api key'
|
9
9
|
@options.secret_key = 'your secret key'
|
10
|
-
@options.base_url = 'https://api.iyzipay.com'
|
10
|
+
@options.base_url = 'https://sandbox-api.iyzipay.com'
|
11
11
|
end
|
12
12
|
|
13
13
|
it 'should initialize bkm express' do
|
data/spec/cancel_spec.rb
CHANGED
@@ -7,7 +7,7 @@ RSpec.describe 'Iyzipay' do
|
|
7
7
|
@options = Iyzipay::Options.new
|
8
8
|
@options.api_key = 'your api key'
|
9
9
|
@options.secret_key = 'your secret key'
|
10
|
-
@options.base_url = 'https://api.iyzipay.com'
|
10
|
+
@options.base_url = 'https://sandbox-api.iyzipay.com'
|
11
11
|
end
|
12
12
|
|
13
13
|
it 'should cancel payment' do
|
@@ -7,7 +7,7 @@ RSpec.describe 'Iyzipay' do
|
|
7
7
|
@options = Iyzipay::Options.new
|
8
8
|
@options.api_key = 'your api key'
|
9
9
|
@options.secret_key = 'your secret key'
|
10
|
-
@options.base_url = 'https://api.iyzipay.com'
|
10
|
+
@options.base_url = 'https://sandbox-api.iyzipay.com'
|
11
11
|
end
|
12
12
|
|
13
13
|
it 'should initialize checkout form' do
|
data/spec/checkout_form_spec.rb
CHANGED
@@ -7,7 +7,7 @@ RSpec.describe 'Iyzipay' do
|
|
7
7
|
@options = Iyzipay::Options.new
|
8
8
|
@options.api_key = 'your api key'
|
9
9
|
@options.secret_key = 'your secret key'
|
10
|
-
@options.base_url = 'https://api.iyzipay.com'
|
10
|
+
@options.base_url = 'https://sandbox-api.iyzipay.com'
|
11
11
|
end
|
12
12
|
|
13
13
|
it 'should initialize checkout form' do
|
@@ -72,6 +72,7 @@ RSpec.describe 'Iyzipay' do
|
|
72
72
|
basketId: 'B67832',
|
73
73
|
paymentGroup: Iyzipay::Model::PaymentGroup::PRODUCT,
|
74
74
|
callbackUrl: 'https://www.merchant.com/callback',
|
75
|
+
currency: Iyzipay::Model::Currency::TRY,
|
75
76
|
buyer: buyer,
|
76
77
|
billingAddress: address,
|
77
78
|
shippingAddress: address,
|
data/spec/cross_booking_spec.rb
CHANGED
@@ -7,7 +7,7 @@ RSpec.describe 'Iyzipay' do
|
|
7
7
|
@options = Iyzipay::Options.new
|
8
8
|
@options.api_key = 'your api key'
|
9
9
|
@options.secret_key = 'your secret key'
|
10
|
-
@options.base_url = 'https://api.iyzipay.com'
|
10
|
+
@options.base_url = 'https://sandbox-api.iyzipay.com'
|
11
11
|
end
|
12
12
|
|
13
13
|
it 'should send money to sub merchant' do
|
@@ -17,6 +17,7 @@ RSpec.describe 'Iyzipay' do
|
|
17
17
|
subMerchantKey: 'sub merchant key',
|
18
18
|
price: '1.0',
|
19
19
|
reason: 'reason text',
|
20
|
+
currency: Iyzipay::Model::Currency::TRY
|
20
21
|
}
|
21
22
|
cross_booking = Iyzipay::Model::CrossBookingToSubMerchant.new.create(request, @options)
|
22
23
|
begin
|
@@ -34,6 +35,7 @@ RSpec.describe 'Iyzipay' do
|
|
34
35
|
subMerchantKey: 'sub merchant key',
|
35
36
|
price: '1.0',
|
36
37
|
reason: 'reason text',
|
38
|
+
currency: Iyzipay::Model::Currency::TRY
|
37
39
|
}
|
38
40
|
cross_booking = Iyzipay::Model::CrossBookingFromSubMerchant.new.create(request, @options)
|
39
41
|
begin
|
data/spec/installment_spec.rb
CHANGED
@@ -7,7 +7,7 @@ RSpec.describe 'Iyzipay' do
|
|
7
7
|
@options = Iyzipay::Options.new
|
8
8
|
@options.api_key = 'your api key'
|
9
9
|
@options.secret_key = 'your secret key'
|
10
|
-
@options.base_url = 'https://api.iyzipay.com'
|
10
|
+
@options.base_url = 'https://sandbox-api.iyzipay.com'
|
11
11
|
end
|
12
12
|
|
13
13
|
it 'should retrieve bin number' do
|
@@ -7,7 +7,7 @@ RSpec.describe 'Iyzipay' do
|
|
7
7
|
@options = Iyzipay::Options.new
|
8
8
|
@options.api_key = 'your api key'
|
9
9
|
@options.secret_key = 'your secret key'
|
10
|
-
@options.base_url = 'https://api.iyzipay.com'
|
10
|
+
@options.base_url = 'https://sandbox-api.iyzipay.com'
|
11
11
|
end
|
12
12
|
|
13
13
|
it 'should post auth' do
|
@@ -17,6 +17,7 @@ RSpec.describe 'Iyzipay' do
|
|
17
17
|
paymentId: '258',
|
18
18
|
paidPrice: '1',
|
19
19
|
ip: '85.34.78.112',
|
20
|
+
currency: Iyzipay::Model::Currency::TRY,
|
20
21
|
}
|
21
22
|
payment = Iyzipay::Model::PaymentPostAuth.new.create(request, @options)
|
22
23
|
begin
|
@@ -7,7 +7,7 @@ RSpec.describe 'Iyzipay' do
|
|
7
7
|
@options = Iyzipay::Options.new
|
8
8
|
@options.api_key = 'your api key'
|
9
9
|
@options.secret_key = 'your secret key'
|
10
|
-
@options.base_url = 'https://api.iyzipay.com'
|
10
|
+
@options.base_url = 'https://sandbox-api.iyzipay.com'
|
11
11
|
end
|
12
12
|
|
13
13
|
it 'should create payment with physical and virtual item for standard merchant' do
|
@@ -75,6 +75,7 @@ RSpec.describe 'Iyzipay' do
|
|
75
75
|
paymentChannel: Iyzipay::Model::PaymentChannel::WEB,
|
76
76
|
basketId: 'B67832',
|
77
77
|
paymentGroup: Iyzipay::Model::PaymentGroup::PRODUCT,
|
78
|
+
currency: Iyzipay::Model::Currency::TRY,
|
78
79
|
paymentCard: payment_card,
|
79
80
|
buyer: buyer,
|
80
81
|
billingAddress: address,
|
@@ -90,7 +91,7 @@ RSpec.describe 'Iyzipay' do
|
|
90
91
|
end
|
91
92
|
end
|
92
93
|
|
93
|
-
it 'should create payment with physical and virtual item for
|
94
|
+
it 'should create payment with physical and virtual item for marketplace' do
|
94
95
|
payment_card = {
|
95
96
|
cardHolderName: 'John Doe',
|
96
97
|
cardNumber: '5528790000000008',
|
@@ -161,6 +162,7 @@ RSpec.describe 'Iyzipay' do
|
|
161
162
|
paymentChannel: Iyzipay::Model::PaymentChannel::WEB,
|
162
163
|
basketId: 'B67832',
|
163
164
|
paymentGroup: Iyzipay::Model::PaymentGroup::PRODUCT,
|
165
|
+
currency: Iyzipay::Model::Currency::TRY,
|
164
166
|
paymentCard: payment_card,
|
165
167
|
buyer: buyer,
|
166
168
|
billingAddress: address,
|
@@ -241,6 +243,7 @@ RSpec.describe 'Iyzipay' do
|
|
241
243
|
paymentChannel: Iyzipay::Model::PaymentChannel::WEB,
|
242
244
|
basketId: 'B67832',
|
243
245
|
paymentGroup: Iyzipay::Model::PaymentGroup::SUBSCRIPTION,
|
246
|
+
currency: Iyzipay::Model::Currency::TRY,
|
244
247
|
paymentCard: payment_card,
|
245
248
|
buyer: buyer,
|
246
249
|
billingAddress: address,
|
data/spec/payment_spec.rb
CHANGED
@@ -7,7 +7,7 @@ RSpec.describe 'Iyzipay' do
|
|
7
7
|
@options = Iyzipay::Options.new
|
8
8
|
@options.api_key = 'your api key'
|
9
9
|
@options.secret_key = 'your secret key'
|
10
|
-
@options.base_url = 'https://api.iyzipay.com'
|
10
|
+
@options.base_url = 'https://sandbox-api.iyzipay.com'
|
11
11
|
end
|
12
12
|
|
13
13
|
it 'should create payment with physical and virtual item for standard merchant' do
|
@@ -75,6 +75,7 @@ RSpec.describe 'Iyzipay' do
|
|
75
75
|
paymentChannel: Iyzipay::Model::PaymentChannel::WEB,
|
76
76
|
basketId: 'B67832',
|
77
77
|
paymentGroup: Iyzipay::Model::PaymentGroup::PRODUCT,
|
78
|
+
currency: Iyzipay::Model::Currency::TRY,
|
78
79
|
paymentCard: payment_card,
|
79
80
|
buyer: buyer,
|
80
81
|
billingAddress: address,
|
@@ -129,7 +130,7 @@ RSpec.describe 'Iyzipay' do
|
|
129
130
|
category2: 'Accessories',
|
130
131
|
itemType: Iyzipay::Model::BasketItemType::PHYSICAL,
|
131
132
|
price: '0.3',
|
132
|
-
subMerchantKey: '
|
133
|
+
subMerchantKey: 'sub merchant key',
|
133
134
|
subMerchantPrice: '0.27'
|
134
135
|
}
|
135
136
|
item2 = {
|
@@ -139,7 +140,7 @@ RSpec.describe 'Iyzipay' do
|
|
139
140
|
category2: 'Online Game Items',
|
140
141
|
itemType: Iyzipay::Model::BasketItemType::VIRTUAL,
|
141
142
|
price: '0.5',
|
142
|
-
subMerchantKey: '
|
143
|
+
subMerchantKey: 'sub merchant key',
|
143
144
|
subMerchantPrice: '0.42'
|
144
145
|
}
|
145
146
|
item3 = {
|
@@ -149,7 +150,7 @@ RSpec.describe 'Iyzipay' do
|
|
149
150
|
category2: 'Usb / Cable',
|
150
151
|
itemType: Iyzipay::Model::BasketItemType::PHYSICAL,
|
151
152
|
price: '0.2',
|
152
|
-
subMerchantKey: '
|
153
|
+
subMerchantKey: 'sub merchant key',
|
153
154
|
subMerchantPrice: '0.18'
|
154
155
|
}
|
155
156
|
request = {
|
@@ -161,6 +162,7 @@ RSpec.describe 'Iyzipay' do
|
|
161
162
|
paymentChannel: Iyzipay::Model::PaymentChannel::WEB,
|
162
163
|
basketId: 'B67832',
|
163
164
|
paymentGroup: Iyzipay::Model::PaymentGroup::PRODUCT,
|
165
|
+
currency: Iyzipay::Model::Currency::TRY,
|
164
166
|
paymentCard: payment_card,
|
165
167
|
buyer: buyer,
|
166
168
|
billingAddress: address,
|
@@ -241,6 +243,7 @@ RSpec.describe 'Iyzipay' do
|
|
241
243
|
paymentChannel: Iyzipay::Model::PaymentChannel::WEB,
|
242
244
|
basketId: 'B67832',
|
243
245
|
paymentGroup: Iyzipay::Model::PaymentGroup::SUBSCRIPTION,
|
246
|
+
currency: Iyzipay::Model::Currency::TRY,
|
244
247
|
paymentCard: payment_card,
|
245
248
|
buyer: buyer,
|
246
249
|
billingAddress: address,
|
data/spec/refund_spec.rb
CHANGED
@@ -7,7 +7,7 @@ RSpec.describe 'Iyzipay' do
|
|
7
7
|
@options = Iyzipay::Options.new
|
8
8
|
@options.api_key = 'your api key'
|
9
9
|
@options.secret_key = 'your secret key'
|
10
|
-
@options.base_url = 'https://api.iyzipay.com'
|
10
|
+
@options.base_url = 'https://sandbox-api.iyzipay.com'
|
11
11
|
end
|
12
12
|
|
13
13
|
it 'should refund payment' do
|
@@ -16,7 +16,8 @@ RSpec.describe 'Iyzipay' do
|
|
16
16
|
conversationId: '123456789',
|
17
17
|
paymentTransactionId: '702',
|
18
18
|
price: '0.1',
|
19
|
-
ip: '85.34.78.112'
|
19
|
+
ip: '85.34.78.112',
|
20
|
+
currency: Iyzipay::Model::Currency::TRY
|
20
21
|
}
|
21
22
|
refund = Iyzipay::Model::Refund.new.create(request, @options)
|
22
23
|
begin
|
@@ -33,7 +34,8 @@ RSpec.describe 'Iyzipay' do
|
|
33
34
|
conversationId: '123456789',
|
34
35
|
paymentTransactionId: '258',
|
35
36
|
price: '0.1',
|
36
|
-
ip: '85.34.78.112'
|
37
|
+
ip: '85.34.78.112',
|
38
|
+
currency: Iyzipay::Model::Currency::TRY
|
37
39
|
}
|
38
40
|
refund = Iyzipay::Model::RefundChargedFromMerchant.new.create(request, @options)
|
39
41
|
begin
|
@@ -7,7 +7,7 @@ RSpec.describe 'Iyzipay' do
|
|
7
7
|
@options = Iyzipay::Options.new
|
8
8
|
@options.api_key = 'your api key'
|
9
9
|
@options.secret_key = 'your secret key'
|
10
|
-
@options.base_url = 'https://api.iyzipay.com'
|
10
|
+
@options.base_url = 'https://sandbox-api.iyzipay.com'
|
11
11
|
end
|
12
12
|
|
13
13
|
it 'should retrieve payout completed transactions' do
|
data/spec/sub_merchant_spec.rb
CHANGED
@@ -7,7 +7,7 @@ RSpec.describe 'Iyzipay' do
|
|
7
7
|
@options = Iyzipay::Options.new
|
8
8
|
@options.api_key = 'your api key'
|
9
9
|
@options.secret_key = 'your secret key'
|
10
|
-
@options.base_url = 'https://api.iyzipay.com'
|
10
|
+
@options.base_url = 'https://sandbox-api.iyzipay.com'
|
11
11
|
end
|
12
12
|
|
13
13
|
it 'should create personal sub merchant' do
|
@@ -23,7 +23,8 @@ RSpec.describe 'Iyzipay' do
|
|
23
23
|
gsmNumber: '+905350000000',
|
24
24
|
name: 'John\'s market',
|
25
25
|
iban: 'TR180006200119000006672315',
|
26
|
-
identityNumber: '1234567890'
|
26
|
+
identityNumber: '1234567890',
|
27
|
+
currency: Iyzipay::Model::Currency::TRY
|
27
28
|
}
|
28
29
|
sub_merchant = Iyzipay::Model::SubMerchant.new.create(request, @options)
|
29
30
|
begin
|
@@ -47,7 +48,8 @@ RSpec.describe 'Iyzipay' do
|
|
47
48
|
gsmNumber: '+905350000000',
|
48
49
|
name: 'John\'s market',
|
49
50
|
iban: 'TR180006200119000006672315',
|
50
|
-
identityNumber: '31300864726'
|
51
|
+
identityNumber: '31300864726',
|
52
|
+
currency: Iyzipay::Model::Currency::TRY
|
51
53
|
}
|
52
54
|
sub_merchant = Iyzipay::Model::SubMerchant.new.create(request, @options)
|
53
55
|
begin
|
@@ -71,7 +73,8 @@ RSpec.describe 'Iyzipay' do
|
|
71
73
|
email: 'email@submerchantemail.com',
|
72
74
|
gsmNumber: '+905350000000',
|
73
75
|
name: 'John\'s market',
|
74
|
-
iban: 'TR180006200119000006672315'
|
76
|
+
iban: 'TR180006200119000006672315',
|
77
|
+
currency: Iyzipay::Model::Currency::TRY
|
75
78
|
}
|
76
79
|
sub_merchant = Iyzipay::Model::SubMerchant.new.create(request, @options)
|
77
80
|
begin
|
@@ -95,7 +98,8 @@ RSpec.describe 'Iyzipay' do
|
|
95
98
|
email: 'email@submerchantemail.com',
|
96
99
|
gsmNumber: '+905350000000',
|
97
100
|
name: 'Jane\'s market',
|
98
|
-
identityNumber: '31300864726'
|
101
|
+
identityNumber: '31300864726',
|
102
|
+
currency: Iyzipay::Model::Currency::TRY
|
99
103
|
}
|
100
104
|
sub_merchant = Iyzipay::Model::SubMerchant.new.update(request, @options)
|
101
105
|
begin
|
@@ -119,7 +123,8 @@ RSpec.describe 'Iyzipay' do
|
|
119
123
|
gsmNumber: '+905350000000',
|
120
124
|
name: 'Jane\'s market',
|
121
125
|
iban: 'TR180006200119000006672315',
|
122
|
-
identityNumber: '31300864726'
|
126
|
+
identityNumber: '31300864726',
|
127
|
+
currency: Iyzipay::Model::Currency::TRY
|
123
128
|
}
|
124
129
|
sub_merchant = Iyzipay::Model::SubMerchant.new.update(request, @options)
|
125
130
|
begin
|
@@ -143,7 +148,8 @@ RSpec.describe 'Iyzipay' do
|
|
143
148
|
email: 'email@submerchantemail.com',
|
144
149
|
gsmNumber: '+905350000000',
|
145
150
|
name: 'Jane\'s market',
|
146
|
-
iban: 'TR180006200119000006672315'
|
151
|
+
iban: 'TR180006200119000006672315',
|
152
|
+
currency: Iyzipay::Model::Currency::TRY
|
147
153
|
}
|
148
154
|
sub_merchant = Iyzipay::Model::SubMerchant.new.update(request, @options)
|
149
155
|
begin
|
@@ -7,7 +7,7 @@ RSpec.describe 'Iyzipay' do
|
|
7
7
|
@options = Iyzipay::Options.new
|
8
8
|
@options.api_key = 'your api key'
|
9
9
|
@options.secret_key = 'your secret key'
|
10
|
-
@options.base_url = 'https://api.iyzipay.com'
|
10
|
+
@options.base_url = 'https://sandbox-api.iyzipay.com'
|
11
11
|
end
|
12
12
|
|
13
13
|
it 'should create payment with physical and virtual item for standard merchant' do
|
@@ -76,6 +76,7 @@ RSpec.describe 'Iyzipay' do
|
|
76
76
|
basketId: 'B67832',
|
77
77
|
paymentGroup: Iyzipay::Model::PaymentGroup::PRODUCT,
|
78
78
|
callbackUrl: 'https://www.merchant.com/callback',
|
79
|
+
currency: Iyzipay::Model::Currency::TRY,
|
79
80
|
paymentCard: payment_card,
|
80
81
|
buyer: buyer,
|
81
82
|
billingAddress: address,
|
@@ -167,6 +168,7 @@ RSpec.describe 'Iyzipay' do
|
|
167
168
|
basketId: 'B67832',
|
168
169
|
paymentGroup: Iyzipay::Model::PaymentGroup::PRODUCT,
|
169
170
|
callbackUrl: 'https://www.merchant.com/callback',
|
171
|
+
currency: Iyzipay::Model::Currency::TRY,
|
170
172
|
paymentCard: payment_card,
|
171
173
|
buyer: buyer,
|
172
174
|
billingAddress: address,
|
@@ -194,7 +196,7 @@ RSpec.describe 'Iyzipay' do
|
|
194
196
|
paymentId: '1',
|
195
197
|
conversationData: 'conversation data',
|
196
198
|
}
|
197
|
-
threeds_payment = Iyzipay::Model::ThreedsPayment.new.
|
199
|
+
threeds_payment = Iyzipay::Model::ThreedsPayment.new.create(request, @options)
|
198
200
|
begin
|
199
201
|
$stderr.puts threeds_payment.inspect
|
200
202
|
rescue
|
@@ -7,7 +7,7 @@ RSpec.describe 'Iyzipay' do
|
|
7
7
|
@options = Iyzipay::Options.new
|
8
8
|
@options.api_key = 'your api key'
|
9
9
|
@options.secret_key = 'your secret key'
|
10
|
-
@options.base_url = 'https://api.iyzipay.com'
|
10
|
+
@options.base_url = 'https://sandbox-api.iyzipay.com'
|
11
11
|
end
|
12
12
|
|
13
13
|
it 'should create payment with physical and virtual item for standard merchant' do
|
@@ -76,6 +76,7 @@ RSpec.describe 'Iyzipay' do
|
|
76
76
|
basketId: 'B67832',
|
77
77
|
paymentGroup: Iyzipay::Model::PaymentGroup::PRODUCT,
|
78
78
|
callbackUrl: 'https://www.merchant.com/callback',
|
79
|
+
currency: Iyzipay::Model::Currency::TRY,
|
79
80
|
paymentCard: payment_card,
|
80
81
|
buyer: buyer,
|
81
82
|
billingAddress: address,
|
@@ -167,6 +168,7 @@ RSpec.describe 'Iyzipay' do
|
|
167
168
|
basketId: 'B67832',
|
168
169
|
paymentGroup: Iyzipay::Model::PaymentGroup::PRODUCT,
|
169
170
|
callbackUrl: 'https://www.merchant.com/callback',
|
171
|
+
currency: Iyzipay::Model::Currency::TRY,
|
170
172
|
paymentCard: payment_card,
|
171
173
|
buyer: buyer,
|
172
174
|
billingAddress: address,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: iyzipay
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.32
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Iyzico
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -115,6 +115,7 @@ files:
|
|
115
115
|
- lib/iyzipay/model/checkout_form_initialize_pre_auth.rb
|
116
116
|
- lib/iyzipay/model/cross_booking_from_sub_merchant.rb
|
117
117
|
- lib/iyzipay/model/cross_booking_to_sub_merchant.rb
|
118
|
+
- lib/iyzipay/model/currency.rb
|
118
119
|
- lib/iyzipay/model/disapproval.rb
|
119
120
|
- lib/iyzipay/model/installment_details.rb
|
120
121
|
- lib/iyzipay/model/installment_info.rb
|