iyzico v1.0.0 Iyzico.Payment
Represents a successfully made payment returned from the platform.
Link to this section Summary
Functions
Converts a card association string into existing atom
Converts given card family string to existing atom
Converts a card type string into existing atom
Converts a given integer representation of a fraud status of a payment to respective type
Link to this section Types
card_family :: :bonus | :axess | :world | :maximum | :paraf | :cardfinans | :advantage
t() :: %Iyzico.Payment{basket_id: binary, bin_id: binary, card_assoc: card_assoc, card_family: card_family, card_type: card_type, commission_amount: number, commission_fee: number, conversation_id: binary, currency: currency, fraud_status: fraud_status, id: binary, installment: integer, last_four_digits: binary, merchant_commission_amount: number, merchant_commission_rate: number, paid_price: number, price: number, transactions: list}
Link to this section Functions
Converts a card association string into existing atom.
iex> Iyzico.Payment.get_card_assoc “MASTER_CARD” :mastercard
iex> Iyzico.Payment.get_card_assoc “VISA” :visa
iex> Iyzico.Payment.get_card_assoc “AMERICAN_EXPRESS” :amex
iex> Iyzico.Payment.get_card_assoc “TROY” :troy
Converts given card family string to existing atom.
iex> Iyzico.Payment.get_card_family “Bonus” :bonus
iex> Iyzico.Payment.get_card_family “Axess” :axess
iex> Iyzico.Payment.get_card_family “World” :world
iex> Iyzico.Payment.get_card_family “Maximum” :maximum
iex> Iyzico.Payment.get_card_family “Paraf” :paraf
iex> Iyzico.Payment.get_card_family “CardFinans” :cardfinans
iex> Iyzico.Payment.get_card_family “Advantage” :advantage
Converts a card type string into existing atom.
iex> Iyzico.Payment.get_card_type “CREDIT_CARD” :credit
iex> Iyzico.Payment.get_card_type “DEBIT_CARD” :debit
iex> Iyzico.Payment.get_card_type “PREPAID_CARD” :prepaid
Converts a given integer representation of a fraud status of a payment to respective type.
Discussion
A merchant should only proceed to the transaction if and only if the fraud status is :ok.
A payments fraud status would be :awaiting if transaction safety is being processed in present.
Transactions with fraud status with :restrict value should be avoided.
iex> Iyzico.Payment.to_fraud_status -1 :restrict
iex> Iyzico.Payment.to_fraud_status 0 :awaiting
iex> Iyzico.Payment.to_fraud_status 1 :ok