Sha256: 5879920f618a02a8532f0f32878cd452f9d74b0420376f3c567e12b483ceba68

Contents?: true

Size: 1.05 KB

Versions: 1

Compression:

Stored size: 1.05 KB

Contents

# coding: utf-8

require_relative 'spec_helper'

RSpec.describe 'IyziPay' do
  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 retrieve payout completed transactions' do
    request = {
        locale: IyziPay::Model::Locale::TR,
        conversationId: '123456789',
        date: '2016-01-22 19:13:00'
    }
    refund = IyziPay::Model::PayoutCompletedTransactionList.new.retrieve(request, @options)
    begin
      $stderr.puts refund.inspect
    rescue
      $stderr.puts 'oops'
      raise
    end
  end

  it 'should retrieve bounced bank transfers' do
    request = {
        locale: IyziPay::Model::Locale::TR,
        conversationId: '123456789',
        date: '2016-01-22 19:13:00'
    }
    refund = IyziPay::Model::BouncedBankTransferList.new.retrieve(request, @options)
    begin
      $stderr.puts refund.inspect
    rescue
      $stderr.puts 'oops'
      raise
    end
  end

  after :each do
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
iyzipay-zebramo-1.0.37 spec/retrieve_transactions_spec.rb