Sha256: b621db18a2f03a7f3df3962b5c40d50ae56e63d7b44729ac0e16beede964f038

Contents?: true

Size: 1.2 KB

Versions: 14

Compression:

Stored size: 1.2 KB

Contents

require File.join(File.expand_path(File.dirname(__FILE__)), "..", "..", "..", "spec_helper")

describe BillForward::AuthorizeNetToken do
	before :all do
		@client = BillForwardTest::TEST_CLIENT
		BillForward::Client.default_client = @client

		# Authorize.Net credentials used to test adding a tokenized card
		@authorize_net_customer_profile_id = BillForwardTest::AUTHORIZE_NET_CUSTOMER_PROFILE_ID
		@authorize_net_customer_payment_profile_id = BillForwardTest::AUTHORIZE_NET_CUSTOMER_PAYMENT_PROFILE_ID
		@authorize_net_card_last_4_digits = BillForwardTest::AUTHORIZE_NET_CARD_LAST_4_DIGITS
	end
	describe '::create' do
		it 'creates a token' do
			created_account = BillForward::Account.create

			organisations = BillForward::Organisation.get_mine
			first_org = organisations.first

			authorize_net_token = BillForward::AuthorizeNetToken.new({
				'accountID' => created_account.id,
				'customerProfileID' => @authorize_net_customer_profile_id,
				'customerPaymentProfileID' => @authorize_net_customer_payment_profile_id,
				'lastFourDigits' => @authorize_net_card_last_4_digits,
				'organizationID' => first_org.id
				})

			created_token = BillForward::AuthorizeNetToken.create(authorize_net_token)
		end
	end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
bill_forward-2.2016.241 spec/functional/bad_citizen/situational/authorize_net_token_spec.rb
bill_forward-2.2016.227 spec/functional/bad_citizen/situational/authorize_net_token_spec.rb
bill_forward-2.2016.222 spec/functional/bad_citizen/situational/authorize_net_token_spec.rb
bill_forward-2.2016.209 spec/functional/bad_citizen/situational/authorize_net_token_spec.rb
bill_forward-1.2016.117 spec/functional/bad_citizen/situational/authorize_net_token_spec.rb
bill_forward-1.2016.101 spec/functional/bad_citizen/situational/authorize_net_token_spec.rb
bill_forward-1.2016.26 spec/functional/bad_citizen/situational/authorize_net_token_spec.rb
bill_forward-1.2015.321.1 spec/functional/bad_citizen/situational/authorize_net_token_spec.rb
bill_forward-1.2015.321 spec/functional/bad_citizen/situational/authorize_net_token_spec.rb
bill_forward-1.2015.299 spec/functional/bad_citizen/situational/authorize_net_token_spec.rb
bill_forward-1.2015.217.1 spec/functional/bad_citizen/situational/authorize_net_token_spec.rb
bill_forward-1.2015.217 spec/functional/bad_citizen/situational/authorize_net_token_spec.rb
bill_forward-1.2015.186 spec/functional/bad_citizen/situational/authorize_net_token_spec.rb
bill_forward-1.2015.183 spec/functional/bad_citizen/situational/authorize_net_token_spec.rb