Class: IyziPay::Model::BasicThreedsInitialize
- Inherits:
-
IyziPayResource
- Object
- IyziPayResource
- IyziPay::Model::BasicThreedsInitialize
- Defined in:
- lib/iyzipay/model/basic_threeds_initialize.rb
Constant Summary
Constants inherited from IyziPayResource
IyziPayResource::AUTHORIZATION_HEADER_NAME, IyziPayResource::AUTHORIZATION_HEADER_STRING, IyziPayResource::RANDOM_CHARS, IyziPayResource::RANDOM_HEADER_NAME, IyziPayResource::RANDOM_STRING_SIZE
Instance Method Summary collapse
Methods inherited from IyziPayResource
#calculate_hash, #format_header_string, #get_http_header, #get_plain_http_header, #json_decode, #prepare_authorization_string, #random_string
Instance Method Details
#create(request = {}, options) ⇒ Object
5 6 7 8 |
# File 'lib/iyzipay/model/basic_threeds_initialize.rb', line 5 def create(request = {}, ) pki_string = to_pki_string(request) HttpClient.post("#{.base_url}/payment/iyziconnect/initialize3ds", get_http_header(pki_string, ), request.to_json) end |
#to_pki_string(request) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/iyzipay/model/basic_threeds_initialize.rb', line 10 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 |