spec/checkout_form_spec.rb in iyzipay-zebramo-1.0.36 vs spec/checkout_form_spec.rb in iyzipay-zebramo-1.0.37

- old
+ new

@@ -1,12 +1,12 @@ # coding: utf-8 require_relative 'spec_helper' -RSpec.describe 'Iyzipay' do +RSpec.describe 'IyziPay' do before :all do - @options = Iyzipay::Options.new + @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 @@ -37,45 +37,45 @@ item1 = { id: 'BI101', name: 'Binocular', category1: 'Collectibles', category2: 'Accessories', - itemType: Iyzipay::Model::BasketItemType::PHYSICAL, + 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, + itemType: IyziPay::Model::BasketItemType::VIRTUAL, price: '0.5' } item3 = { id: 'BI103', name: 'Usb', category1: 'Electronics', category2: 'Usb / Cable', - itemType: Iyzipay::Model::BasketItemType::PHYSICAL, + itemType: IyziPay::Model::BasketItemType::PHYSICAL, price: '0.2' } request = { - locale: Iyzipay::Model::Locale::TR, + locale: IyziPay::Model::Locale::TR, conversationId: '123456789', price: '1', paidPrice: '1.2', - currency: Iyzipay::Model::Currency::TRY, + currency: IyziPay::Model::Currency::TRY, basketId: 'B67832', - paymentGroup: Iyzipay::Model::PaymentGroup::PRODUCT, + paymentGroup: IyziPay::Model::PaymentGroup::PRODUCT, callbackUrl: 'https://www.merchant.com/callback', enabledInstallments: [2, 3, 6, 9], buyer: buyer, billingAddress: address, shippingAddress: address, basketItems: [item1, item2, item3] } - checkout_form_initialize = Iyzipay::Model::CheckoutFormInitialize.new.create(request, @options) + checkout_form_initialize = IyziPay::Model::CheckoutFormInitialize.new.create(request, @options) begin $stderr.puts checkout_form_initialize.inspect rescue $stderr.puts 'oops' @@ -83,21 +83,21 @@ end end it 'should retrieve checkout form result' do request = { - locale: Iyzipay::Model::Locale::TR, + locale: IyziPay::Model::Locale::TR, conversationId: '123456789', token: 'token' } - checkout_form_payment = Iyzipay::Model::CheckoutForm.new.retrieve(request, @options) + checkout_form_payment = IyziPay::Model::CheckoutForm.new.retrieve(request, @options) begin $stderr.puts checkout_form_payment.inspect rescue $stderr.puts 'oops' raise end end after :each do end -end \ No newline at end of file +end