iyzi 0.2.0 → 0.3.0
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 +4 -4
- data/README.md +3 -3
- data/lib/iyzi.rb +4 -0
- data/lib/iyzi/endpoints.rb +4 -0
- data/lib/iyzi/pki_builders/threeds_initialize.rb +40 -0
- data/lib/iyzi/pki_builders/threeds_payment_create.rb +16 -0
- data/lib/iyzi/request.rb +6 -0
- data/lib/iyzi/requests/threeds_initialize.rb +13 -0
- data/lib/iyzi/requests/threeds_payment_create.rb +13 -0
- data/lib/iyzi/resources.rb +8 -0
- data/lib/iyzi/version.rb +1 -1
- metadata +6 -3
- data/.ruby-version +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67529622a7e13c1afcf8c83f6d3a0aba39d9e1f9
|
4
|
+
data.tar.gz: ca660fff6fab7ae0b46a7af4a67c0a5c09ada3b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a4c037fa67e416340dae6c51e9c0bc20f1110afb4650d64bab7e1d1bc67f40dd058a0decfa27c3707533b082a5ddb9429fac67253c89c1bd9943d9f9f63f9ce
|
7
|
+
data.tar.gz: 161c9cd9182a4a4825ab966761b8d53631270d55fe1fa2acdb09108d60dc9fc159eed6654ad92d606e81f5bd9a35f981086894386c35b9d90b821269f086110f
|
data/README.md
CHANGED
@@ -52,8 +52,8 @@ Checked items are supported
|
|
52
52
|
- [x] Yeni Alt Üye İşyeri Ekleme Servisi /onboarding/submerchant POST
|
53
53
|
- [x] Alt Üye İşyeri Güncelleme Servisi /onboarding/submerchant PUT
|
54
54
|
- [x] Ödeme (Auth) Servisi /payment/iyzipos/auth/ecom POST
|
55
|
-
- [
|
56
|
-
- [
|
55
|
+
- [x] 3D Secure Ödeme (initialize 3DS) Başlatma Servisi /payment/iyzipos/initialize3ds/ecom POST
|
56
|
+
- [x] 3D Secure Ödeme (Auth 3DS) Servisi /payment/iyzipos/auth3ds/ecom POST
|
57
57
|
- [ ] Ön Otorizasyon (PreAuth) Servisi /payment/iyzipos/preauth/ecom POST
|
58
58
|
- [ ] Son Otorizasyon (PostAuth=Capture) Servisi /payment/iyzipos/postauth POST
|
59
59
|
- [ ] İptal (Cancel) Servisi /payment/iyzipos/cancel POST
|
@@ -65,7 +65,7 @@ Checked items are supported
|
|
65
65
|
- [ ] Mahsuplaşma - Alt Üye İşyerinden Para Alma Servisi /crossbooking/receive POST
|
66
66
|
- [x] Servis Ayakta mı Testi (Healthcheck) /payment/test GET
|
67
67
|
- [x] BIN Kontrol Servisi /payment/bin/check POST
|
68
|
-
- [
|
68
|
+
- [x] Taksit Matrisi (Installment) Servisi /payment/iyzipos/installment POST
|
69
69
|
- [x] Ödemeden Bağımsız Kart Ekleme Servisi /cardstorage/card POST
|
70
70
|
- [x] Ödemeden Bağımsız Kart Silme Servisi /cardstorage/card DELETE
|
71
71
|
- [x] Ödemeden Bağımsız Kart Bilgilerini Çekme Servisi /cardstorage/cards POST
|
data/lib/iyzi.rb
CHANGED
@@ -21,6 +21,8 @@ require 'iyzi/pki_builders/store_card'
|
|
21
21
|
require 'iyzi/pki_builders/payment_auth'
|
22
22
|
require 'iyzi/pki_builders/bin_control'
|
23
23
|
require 'iyzi/pki_builders/installment_info'
|
24
|
+
require 'iyzi/pki_builders/threeds_initialize'
|
25
|
+
require 'iyzi/pki_builders/threeds_payment_create'
|
24
26
|
|
25
27
|
# Requests
|
26
28
|
require 'iyzi/request'
|
@@ -32,6 +34,8 @@ require 'iyzi/requests/card_storage'
|
|
32
34
|
require 'iyzi/requests/payment_auth'
|
33
35
|
require 'iyzi/requests/bin_control'
|
34
36
|
require 'iyzi/requests/installment_info'
|
37
|
+
require 'iyzi/requests/threeds_initialize'
|
38
|
+
require 'iyzi/requests/threeds_payment_create'
|
35
39
|
|
36
40
|
# Misc
|
37
41
|
require 'active_support/all'
|
data/lib/iyzi/endpoints.rb
CHANGED
@@ -17,6 +17,10 @@ module Iyzi
|
|
17
17
|
# PAYMENT AUTH
|
18
18
|
PAYMENT_AUTH_CREATE = '/payment/iyzipos/auth/ecom'.freeze
|
19
19
|
|
20
|
+
# 3DS
|
21
|
+
THREEDS_INITIALIZE = '/payment/iyzipos/initialize3ds/ecom'.freeze
|
22
|
+
THREEDS_PAYMENT_CREATE = '/payment/iyzipos/auth3ds/ecom'.freeze
|
23
|
+
|
20
24
|
# HTTP VERBS
|
21
25
|
HTTP_POST = 'post'.freeze
|
22
26
|
HTTP_GET = 'get'.freeze
|
@@ -0,0 +1,40 @@
|
|
1
|
+
module Iyzi
|
2
|
+
module PkiBuilders
|
3
|
+
class ThreedsInitialize < PkiBuilder
|
4
|
+
ATTRIBUTES_ORDER = %w{
|
5
|
+
locale
|
6
|
+
conversationId
|
7
|
+
price
|
8
|
+
paidPrice
|
9
|
+
installment
|
10
|
+
paymentChannel
|
11
|
+
basketId
|
12
|
+
paymentGroup
|
13
|
+
paymentCard
|
14
|
+
buyer
|
15
|
+
shippingAddress
|
16
|
+
billingAddress
|
17
|
+
basketItems
|
18
|
+
paymentSource
|
19
|
+
currency
|
20
|
+
posOrderId
|
21
|
+
connectorName
|
22
|
+
callbackUrl
|
23
|
+
}.freeze
|
24
|
+
|
25
|
+
TYPE_CAST = {
|
26
|
+
price: 'add_price',
|
27
|
+
paidPrice: 'add_price',
|
28
|
+
paymentCard: 'add_payment_card',
|
29
|
+
buyer: 'add_buyer',
|
30
|
+
shippingAddress: 'add_address',
|
31
|
+
billingAddress: 'add_address',
|
32
|
+
basketItems: 'add_basket_items'
|
33
|
+
}.freeze
|
34
|
+
|
35
|
+
def initialize(values = {})
|
36
|
+
super(values, ATTRIBUTES_ORDER, TYPE_CAST)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module Iyzi
|
2
|
+
module PkiBuilders
|
3
|
+
class ThreedsPaymentCreate < PkiBuilder
|
4
|
+
ATTRIBUTES_ORDER = %w{
|
5
|
+
locale
|
6
|
+
conversationId
|
7
|
+
paymentId
|
8
|
+
conversationData
|
9
|
+
}.freeze
|
10
|
+
|
11
|
+
def initialize(values = {})
|
12
|
+
super(values, ATTRIBUTES_ORDER)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/lib/iyzi/request.rb
CHANGED
@@ -19,6 +19,12 @@ module Iyzi
|
|
19
19
|
@options = options
|
20
20
|
@options[:locale] = options[:locale] || DEFAULT_LOCALE
|
21
21
|
@options[:currency] = Currency.find(options[:currency]) if options[:currency].present?
|
22
|
+
|
23
|
+
# In #add method of `PkiBuilder`, we ignore empty strings
|
24
|
+
# So, in order to get valid signature, we need to make sure that
|
25
|
+
# there is no empty value in request body
|
26
|
+
@options.delete_if { |key, value| value.is_a?(String) && value.empty? }
|
27
|
+
|
22
28
|
@pki = to_pki
|
23
29
|
@random_string = secure_random_string
|
24
30
|
# config must have all required params
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module Iyzi
|
2
|
+
module Requests
|
3
|
+
class ThreedsInitialize < Request
|
4
|
+
def initialize(options = {})
|
5
|
+
super(Endpoints::HTTP_POST, Endpoints::THREEDS_INITIALIZE, options)
|
6
|
+
end
|
7
|
+
|
8
|
+
def to_pki
|
9
|
+
PkiBuilders::ThreedsInitialize.new(iyzi_options).request_string
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module Iyzi
|
2
|
+
module Requests
|
3
|
+
class ThreedsPaymentCreate < Request
|
4
|
+
def initialize(options = {})
|
5
|
+
super(Endpoints::HTTP_POST, Endpoints::THREEDS_PAYMENT_CREATE, options)
|
6
|
+
end
|
7
|
+
|
8
|
+
def to_pki
|
9
|
+
PkiBuilders::ThreedsPaymentCreate.new(iyzi_options).request_string
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
data/lib/iyzi/resources.rb
CHANGED
@@ -35,5 +35,13 @@ module Iyzi
|
|
35
35
|
def installment_info(options, &block)
|
36
36
|
Requests::InstallmentInfo.new(options).response(&block)
|
37
37
|
end
|
38
|
+
|
39
|
+
def threeds_initialize(options, &block)
|
40
|
+
Requests::ThreedsInitialize.new(options).response(&block)
|
41
|
+
end
|
42
|
+
|
43
|
+
def threeds_payment_create(options, &block)
|
44
|
+
Requests::ThreedsPaymentCreate.new(options).response(&block)
|
45
|
+
end
|
38
46
|
end
|
39
47
|
end
|
data/lib/iyzi/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: iyzi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Demirhan Aydin
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -160,7 +160,6 @@ files:
|
|
160
160
|
- ".codeclimate.yml"
|
161
161
|
- ".gitignore"
|
162
162
|
- ".rspec"
|
163
|
-
- ".ruby-version"
|
164
163
|
- ".travis.yml"
|
165
164
|
- Gemfile
|
166
165
|
- LICENSE.txt
|
@@ -189,6 +188,8 @@ files:
|
|
189
188
|
- lib/iyzi/pki_builders/payment_card.rb
|
190
189
|
- lib/iyzi/pki_builders/store_card.rb
|
191
190
|
- lib/iyzi/pki_builders/sub_merchant.rb
|
191
|
+
- lib/iyzi/pki_builders/threeds_initialize.rb
|
192
|
+
- lib/iyzi/pki_builders/threeds_payment_create.rb
|
192
193
|
- lib/iyzi/request.rb
|
193
194
|
- lib/iyzi/requests/api_test.rb
|
194
195
|
- lib/iyzi/requests/bin_control.rb
|
@@ -198,6 +199,8 @@ files:
|
|
198
199
|
- lib/iyzi/requests/installment_info.rb
|
199
200
|
- lib/iyzi/requests/payment_auth.rb
|
200
201
|
- lib/iyzi/requests/sub_merchant.rb
|
202
|
+
- lib/iyzi/requests/threeds_initialize.rb
|
203
|
+
- lib/iyzi/requests/threeds_payment_create.rb
|
201
204
|
- lib/iyzi/resources.rb
|
202
205
|
- lib/iyzi/utils.rb
|
203
206
|
- lib/iyzi/version.rb
|
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
ruby-2.2.3
|