Sha256: 1af2e6b868b0234fc706121aa8672220706c11813e6012cf7e47dbfd92130122
Contents?: true
Size: 1.05 KB
Versions: 4
Compression:
Stored size: 1.05 KB
Contents
# coding: utf-8 require_relative 'spec_helper' require_relative 'builder' RSpec.describe 'Iyzipay' do before :all do @options = Iyzipay::Options.new @options.api_key = SpecOptions::API_KEY @options.secret_key = SpecOptions::SECRET_KEY @options.base_url = SpecOptions::BASE_URL end it 'should refund to balance' do # create payment payment = Builder::PaymentBuilder.new.create_standard_listing_payment(@options) request = { locale: Iyzipay::Model::Locale::TR, conversationId: '123456789', paymentId: payment['paymentId'], callbackUrl: 'https://merchanturl.com' } refundToBalance = Iyzipay::Model::RefundToBalance.new.create(request, @options) begin $stdout.puts refundToBalance.inspect refundToBalance = JSON.parse(refundToBalance) expect(refundToBalance['status']).not_to be_nil expect(refundToBalance['token']).not_to be_nil expect(refundToBalance['url']).not_to be_nil rescue $stderr.puts 'oops' raise end end after :each do end end
Version data entries
4 entries across 4 versions & 2 rubygems