iyzi 0.2.0 → 0.7.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 47aa48b209a4d375ae07f367e7604e1533ecd1cf
4
- data.tar.gz: 45cdcb29aee854fe0acac23c1b2a92118cdd7b7e
2
+ SHA256:
3
+ metadata.gz: 465f6436e00460d71a19e3545e977640b5262a04995190aaf1b341035046caa4
4
+ data.tar.gz: cefe7584445bbee17dd73048620cfce24cf5dce993bca25bf16f85f353863504
5
5
  SHA512:
6
- metadata.gz: 421d6331bd482c3b16d1f2791ecfcb4273b5434622f3e94af545732a72b9ef867e36a121635c14067961c80208c6b271ba65e8301b1c8b8326c42fdeece36191
7
- data.tar.gz: 51e97458e7a466b5c6656f25f58ab48e6e25350d837ea384d736cdffe6e927123c5f72f53731b57a8d5e690f2caa7df14274236abc577a123b25d611537fea5b
6
+ metadata.gz: db0438509c6d0977fd3bc503b4ac0303d8126d2055960eeb3987b657ed5d883f672213e5fde3c741c01b6ae2354fa490c4c86a49a5c96eb8465c0d20b486fb44
7
+ data.tar.gz: bd940e099520805ae898f300e4c96896447dc9e58c2fce73a5e3772c5c6fa01a3341c2cb4589fd8379377e238d46ab384cea214341a11afaac9fb7639d8d73da
@@ -1,10 +1,15 @@
1
1
  language: ruby
2
2
  rvm:
3
3
  - 2.2.3
4
- before_install: gem install bundler -v 1.11.2
4
+ - 2.3.5
5
+ - 2.4.4
6
+ - 2.5.1
7
+ before_install: gem install bundler -v 1.15.4
5
8
  deploy:
6
9
  provider: rubygems
7
10
  api_key:
8
- secure: RPl3sI541nNa1U+XZJ2u5rRyKYG+MbAXHBrQWjyCqqspa5NsVzNXodtp2s3oun9zLtR6ZrDA/c/Zqt7yGoGlWD9ELE541cJOUlIFZwUYX5HuXQPSuGWq1vTFw2lBQg6et/6H7JqdTgqbr0rVMvtziDNKmaqM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4+SPx77zmhj29WYHLiK4/uSb/dwh11ejhFw29R2aRACw2on6UjCXrGnhnCBaUnzYdmM1K645wMjf9mTZsNAgU7I6LXFsmLP4nJEcl1x1d28goiW9cq3ZNROVZ5RBhsXWeMx6QokRClEQgLmO9hu7wwY=
12
+ gem: iyzi
9
13
  on:
10
- tags: true
14
+ tags: true
15
+ repo: parasutcom/iyzi
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
- - [ ] 3D Secure Ödeme (initialize 3DS) Başlatma Servisi /payment/iyzipos/initialize3ds/ecom POST
56
- - [ ] 3D Secure Ödeme (Auth 3DS) Servisi /payment/iyzipos/auth3ds/ecom POST
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
- - [ ] Taksit Matrisi (Installment) Servisi /payment/iyzipos/installment POST
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
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
21
21
 
22
22
  spec.add_dependency "faraday", '~> 0.9.2'
23
23
  spec.add_dependency "faraday_middleware", '~> 0.10.0'
24
- spec.add_dependency "activesupport", '~> 4.2'
24
+ spec.add_dependency "activesupport", '> 4.1', '<= 5.2.4.4'
25
25
 
26
26
  spec.add_development_dependency "bundler", "~> 1.11"
27
27
  spec.add_development_dependency "rake", "~> 10.0"
@@ -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'
@@ -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
@@ -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
@@ -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
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Iyzi
2
- VERSION = "0.2.0"
4
+ VERSION = '0.7.0'
3
5
  end
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.2.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Demirhan Aydin
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-03-28 00:00:00.000000000 Z
11
+ date: 2020-12-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -42,16 +42,22 @@ dependencies:
42
42
  name: activesupport
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">"
46
+ - !ruby/object:Gem::Version
47
+ version: '4.1'
48
+ - - "<="
46
49
  - !ruby/object:Gem::Version
47
- version: '4.2'
50
+ version: 5.2.4.4
48
51
  type: :runtime
49
52
  prerelease: false
50
53
  version_requirements: !ruby/object:Gem::Requirement
51
54
  requirements:
52
- - - "~>"
55
+ - - ">"
56
+ - !ruby/object:Gem::Version
57
+ version: '4.1'
58
+ - - "<="
53
59
  - !ruby/object:Gem::Version
54
- version: '4.2'
60
+ version: 5.2.4.4
55
61
  - !ruby/object:Gem::Dependency
56
62
  name: bundler
57
63
  requirement: !ruby/object:Gem::Requirement
@@ -160,7 +166,6 @@ files:
160
166
  - ".codeclimate.yml"
161
167
  - ".gitignore"
162
168
  - ".rspec"
163
- - ".ruby-version"
164
169
  - ".travis.yml"
165
170
  - Gemfile
166
171
  - LICENSE.txt
@@ -189,6 +194,8 @@ files:
189
194
  - lib/iyzi/pki_builders/payment_card.rb
190
195
  - lib/iyzi/pki_builders/store_card.rb
191
196
  - lib/iyzi/pki_builders/sub_merchant.rb
197
+ - lib/iyzi/pki_builders/threeds_initialize.rb
198
+ - lib/iyzi/pki_builders/threeds_payment_create.rb
192
199
  - lib/iyzi/request.rb
193
200
  - lib/iyzi/requests/api_test.rb
194
201
  - lib/iyzi/requests/bin_control.rb
@@ -198,6 +205,8 @@ files:
198
205
  - lib/iyzi/requests/installment_info.rb
199
206
  - lib/iyzi/requests/payment_auth.rb
200
207
  - lib/iyzi/requests/sub_merchant.rb
208
+ - lib/iyzi/requests/threeds_initialize.rb
209
+ - lib/iyzi/requests/threeds_payment_create.rb
201
210
  - lib/iyzi/resources.rb
202
211
  - lib/iyzi/utils.rb
203
212
  - lib/iyzi/version.rb
@@ -205,7 +214,7 @@ homepage: https://github.com/parasutcom/iyzi
205
214
  licenses:
206
215
  - MIT
207
216
  metadata: {}
208
- post_install_message:
217
+ post_install_message:
209
218
  rdoc_options: []
210
219
  require_paths:
211
220
  - lib
@@ -220,9 +229,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
220
229
  - !ruby/object:Gem::Version
221
230
  version: '0'
222
231
  requirements: []
223
- rubyforge_project:
224
- rubygems_version: 2.4.5.1
225
- signing_key:
232
+ rubygems_version: 3.0.9
233
+ signing_key:
226
234
  specification_version: 4
227
235
  summary: Iyzico ruby client
228
236
  test_files: []
@@ -1 +0,0 @@
1
- ruby-2.2.3