Sha256: 522cca86bd667c6289a8da83470edbd9a6d51bc10cc7640001de5e44d08b1805

Contents?: true

Size: 1.05 KB

Versions: 16

Compression:

Stored size: 1.05 KB

Contents

module Iyzipay
  module Model
    class BasicThreedsInitialize < IyzipayResource

      def create(request = {}, options)
        pki_string = to_pki_string(request)
        HttpClient.post("#{options.base_url}/payment/iyziconnect/initialize3ds", get_http_header(pki_string, options), request.to_json)
      end

      def to_pki_string(request)
        PkiBuilder.new.append_super(super).
            append_price(:price, request[:price]).
            append_price(:paidPrice, request[:paidPrice]).
            append(:installment, request[:installment]).
            append(:buyerEmail, request[:buyerEmail]).
            append(:buyerId, request[:buyerId]).
            append(:buyerIp, request[:buyerIp]).
            append(:posOrderId, request[:posOrderId]).
            append(:paymentCard, PaymentCard.to_pki_string(request[:paymentCard])).
            append(:currency, request[:currency]).
            append(:connectorName, request[:connectorName]).
            append(:callbackUrl, request[:callbackUrl]).
            get_request_string
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 5 rubygems

Version Path
iyzipay-subscription-payments-1.0.2 lib/iyzipay/model/basic_threeds_initialize.rb
iyzipay-subscription-payments-1.0.1 lib/iyzipay/model/basic_threeds_initialize.rb
iyzipay-subscriptions-1.0.1 lib/iyzipay/model/basic_threeds_initialize.rb
iyzipay-subscriptions-1.0.0 lib/iyzipay/model/basic_threeds_initialize.rb
iyzipay-1.0.45 lib/iyzipay/model/basic_threeds_initialize.rb
iyzipay-1.0.44 lib/iyzipay/model/basic_threeds_initialize.rb
iyzipay-1.0.43 lib/iyzipay/model/basic_threeds_initialize.rb
iyzipay-1.0.42 lib/iyzipay/model/basic_threeds_initialize.rb
iyzipay-1.0.39 lib/iyzipay/model/basic_threeds_initialize.rb
erdem-iyzipay-1.1.0 lib/iyzipay/model/basic_threeds_initialize.rb
iyzipay-1.0.36 lib/iyzipay/model/basic_threeds_initialize.rb
iyzipay-1.0.35 lib/iyzipay/model/basic_threeds_initialize.rb
iyzipay-zebramo-1.0.36 lib/iyzipay/model/basic_threeds_initialize.rb
iyzipay-zebramo-1.0.35 lib/iyzipay/model/basic_threeds_initialize.rb
iyzipay-1.0.34 lib/iyzipay/model/basic_threeds_initialize.rb
iyzipay-1.0.32 lib/iyzipay/model/basic_threeds_initialize.rb