All Projects → iyzico → iyzipay-ruby

iyzico / iyzipay-ruby

Licence: MIT license
iyzipay api ruby client

Programming Languages

ruby
36898 projects - #4 most used programming language
Roff
2310 projects

Projects that are alternatives of or similar to iyzipay-ruby

iyzipay-laravel
iyzipay api integration for Laravel
Stars: ✭ 82 (+121.62%)
Mutual labels:  fintech, iyzico, iyzipay, iyzicoder
iyzipay-dotnet-client
iyzipay api .net framework and .net core client
Stars: ✭ 30 (-18.92%)
Mutual labels:  iyzico, client-library, iyzipay
Milvasoft.Iyzipay
Iyzico client for .Net 6
Stars: ✭ 15 (-59.46%)
Mutual labels:  iyzico, client-library, iyzipay
Iyzipay Node
iyzipay api node.js client
Stars: ✭ 116 (+213.51%)
Mutual labels:  fintech, client-library
Iyzipay Php
iyzipay api php client
Stars: ✭ 205 (+454.05%)
Mutual labels:  fintech, client-library
terms-dictionary
Simple definitions of terms, acronyms, abbreviations, companies, and projects related to financial services and Moov.
Stars: ✭ 48 (+29.73%)
Mutual labels:  fintech
ably-php
PHP client library SDK for Ably realtime messaging service
Stars: ✭ 41 (+10.81%)
Mutual labels:  client-library
kubernetes-client-lambda
one-line kubernetes client: light-weight, lambda-styled, easy-testing. For a simplified kubernetes programming.
Stars: ✭ 47 (+27.03%)
Mutual labels:  client-library
clearth
Test automation tool for Clearing, Settlement and Back-Office Systems
Stars: ✭ 26 (-29.73%)
Mutual labels:  fintech
mxfactorial
a payment application intended for deployment by the united states treasury
Stars: ✭ 36 (-2.7%)
Mutual labels:  fintech
The-Ruby-Workshop
A New, Interactive Approach to Learning Ruby
Stars: ✭ 26 (-29.73%)
Mutual labels:  ruby-library
alias-wallet
Official Alias source code repository
Stars: ✭ 5 (-86.49%)
Mutual labels:  fintech
Financial-News-Analysis
招商银行FinTech-复赛-财经新闻分析
Stars: ✭ 17 (-54.05%)
Mutual labels:  fintech
OpenMAMA
OpenMAMA is an open source project that provides a high performance middleware agnostic messaging API that interfaces with a variety of proprietary and open source message oriented middleware systems.
Stars: ✭ 117 (+216.22%)
Mutual labels:  fintech
Awesome-FinTech
Everything about fintech: companies, technologies, libraries & packages, policies, jobs, milestones .
Stars: ✭ 29 (-21.62%)
Mutual labels:  fintech
activerecord-crate-adapter
Ruby on Rails ActiveRecord adapter for CrateDB
Stars: ✭ 27 (-27.03%)
Mutual labels:  ruby-library
glimmer-dsl-opal
Glimmer DSL for Opal (Pure-Ruby Web GUI and Auto-Webifier of Desktop Apps)
Stars: ✭ 22 (-40.54%)
Mutual labels:  ruby-library
ably-cocoa
iOS, tvOS and macOS Objective-C and Swift client library SDK for Ably realtime messaging service
Stars: ✭ 33 (-10.81%)
Mutual labels:  client-library
bitcloutDAO
Decentralized Social Network Money Frauds/Scams including BitClout / DeSo, Twetch, Steemit, PeakD
Stars: ✭ 29 (-21.62%)
Mutual labels:  fintech
wtpy
wtpy是基于wondertrader为底层的针对python的子框架
Stars: ✭ 283 (+664.86%)
Mutual labels:  fintech

iyzipay-ruby

Build Status

You can sign up for an iyzico account at https://iyzico.com

Requirements

  • Ruby 2.1 or newer
  • rest-client

Note

Ruby 1.9.3 will not be supported in March 2018 for TLS 1.2 migration. Please upgrade your Ruby version to minimum 2.1.0. If you have any questions, please open an issue on Github or contact us at [email protected].

Installation

gem install iyzipay

Bundler

source 'https://rubygems.org'

gem 'iyzipay'

Usage

before :all do
  @options = Iyzipay::Options.new
  @options.api_key = 'your api key'
  @options.secret_key = 'your secret key'
  @options.base_url = 'https://sandbox-api.iyzipay.com'
end

it 'should create payment' do
    payment_card = {
        cardHolderName: 'John Doe',
        cardNumber: '5528790000000008',
        expireYear: '2030',
        expireMonth: '12',
        cvc: '123',
        registerCard: 0
    }
    buyer = {
        id: 'BY789',
        name: 'John',
        surname: 'Doe',
        identityNumber: '74300864791',
        email: '[email protected]',
        gsmNumber: '+905350000000',
        registrationDate: '2013-04-21 15:12:09',
        lastLoginDate: '2015-10-05 12:43:35',
        registrationAddress: 'Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1',
        city: 'Istanbul',
        country: 'Turkey',
        zipCode: '34732',
        ip: '85.34.78.112'
    }
    address = {
        address: 'Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1',
        zipCode: '34732',
        contactName: 'John Doe',
        city: 'Istanbul',
        country: 'Turkey'
    }

    item1 = {
        id: 'BI101',
        name: 'Binocular',
        category1: 'Collectibles',
        category2: 'Accessories',
        itemType: Iyzipay::Model::BasketItemType::PHYSICAL,
        price: '0.3'
    }
    item2 = {
        id: 'BI102',
        name: 'Game code',
        category1: 'Game',
        category2: 'Online Game Items',
        itemType: Iyzipay::Model::BasketItemType::VIRTUAL,
        price: '0.5'
    }
    item3 = {
        id: 'BI103',
        name: 'Usb',
        category1: 'Electronics',
        category2: 'Usb / Cable',
        itemType: Iyzipay::Model::BasketItemType::PHYSICAL,
        price: '0.2'
    }
    request = {
        locale: Iyzipay::Model::Locale::TR,
        conversationId: '123456789',
        price: '1.0',
        paidPrice: '1.1',
        installment: 1,
        paymentChannel: Iyzipay::Model::PaymentChannel::WEB,
        basketId: 'B67832',
        paymentGroup: Iyzipay::Model::PaymentGroup::SUBSCRIPTION,
        currency: Iyzipay::Model::Currency::TRY,
        paymentCard: payment_card,
        buyer: buyer,
        billingAddress: address,
        shippingAddress: address,
        basketItems: [item1, item2, item3]
    }
    payment = Iyzipay::Model::Payment.new.create(request, @options)
    begin
      $stderr.puts payment.inspect
    rescue
      $stderr.puts 'oops'
      raise
    end
  end

See other samples under iyzipay-ruby/spec module.

Testing

You can run specs with RSpec under spec module.

Mock test cards

Test cards that can be used to simulate a successful payment:

Card Number Bank Card Type
5890040000000016 Akbank Master Card (Debit)
5526080000000006 Akbank Master Card (Credit)
4766620000000001 Denizbank Visa (Debit)
4603450000000000 Denizbank Visa (Credit)
4729150000000005 Denizbank Bonus Visa (Credit)
4987490000000002 Finansbank Visa (Debit)
5311570000000005 Finansbank Master Card (Credit)
9792020000000001 Finansbank Troy (Debit)
9792030000000000 Finansbank Troy (Credit)
5170410000000004 Garanti Bankası Master Card (Debit)
5400360000000003 Garanti Bankası Master Card (Credit)
374427000000003 Garanti Bankası American Express
4475050000000003 Halkbank Visa (Debit)
5528790000000008 Halkbank Master Card (Credit)
4059030000000009 HSBC Bank Visa (Debit)
5504720000000003 HSBC Bank Master Card (Credit)
5892830000000000 Türkiye İş Bankası Master Card (Debit)
4543590000000006 Türkiye İş Bankası Visa (Credit)
4910050000000006 Vakıfbank Visa (Debit)
4157920000000002 Vakıfbank Visa (Credit)
5168880000000002 Yapı ve Kredi Bankası Master Card (Debit)
5451030000000000 Yapı ve Kredi Bankası Master Card (Credit)

Cross border test cards:

Card Number Country
4054180000000007 Non-Turkish (Debit)
5400010000000004 Non-Turkish (Credit)

Test cards to get specific error codes:

Card Number Description
5406670000000009 Success but cannot be cancelled, refund or post auth
4111111111111129 Not sufficient funds
4129111111111111 Do not honour
4128111111111112 Invalid transaction
4127111111111113 Lost card
4126111111111114 Stolen card
4125111111111115 Expired card
4124111111111116 Invalid cvc2
4123111111111117 Not permitted to card holder
4122111111111118 Not permitted to terminal
4121111111111119 Fraud suspect
4120111111111110 Pickup card
4130111111111118 General error
4131111111111117 Success but mdStatus is 0
4141111111111115 Success but mdStatus is 4
4151111111111112 3dsecure initialize failed
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].