repo stringlengths 5 92 | file_url stringlengths 80 287 | file_path stringlengths 5 197 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:37:27 2026-01-04 17:58:21 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/remote/gateways/remote_transax_test.rb | test/remote/gateways/remote_transax_test.rb | require 'test_helper'
class RemoteTransaxTest < Test::Unit::TestCase
def setup
@gateway = TransaxGateway.new(fixtures(:transax))
@amount = 100
@credit_card = credit_card('4111111111111111', year: 10, month: 10)
@declined_card = credit_card(0xDEADBEEF_0000.to_s)
@check = check()
@options = ... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/remote/gateways/remote_flo2cash_test.rb | test/remote/gateways/remote_flo2cash_test.rb | require 'test_helper'
class RemoteFlo2cashTest < Test::Unit::TestCase
def setup
Base.mode = :test
@gateway = Flo2cashGateway.new(fixtures(:flo2cash))
@amount = 100
@credit_card = credit_card('5123456789012346', brand: :master, month: 5, year: 2017, verification_value: 111)
@declined_card = cred... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/remote/gateways/remote_qvalent_test.rb | test/remote/gateways/remote_qvalent_test.rb | require 'test_helper'
class RemoteQvalentTest < Test::Unit::TestCase
def setup
@gateway = QvalentGateway.new(fixtures(:qvalent))
@amount = 100
@credit_card = credit_card('4242424242424242')
@mastercard = credit_card('5163200000000008', brand: 'master')
@declined_card = credit_card('4000000000000... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/remote/gateways/remote_reach_test.rb | test/remote/gateways/remote_reach_test.rb | require 'test_helper'
class RemoteReachTest < Test::Unit::TestCase
def setup
@gateway = ReachGateway.new(fixtures(:reach))
@amount = 100
@credit_card = credit_card('4444333322221111', {
month: 3,
year: 2030,
verification_value: 737
})
@not_supported_cc = credit_card('44443333222... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/remote/gateways/remote_redsys_test.rb | test/remote/gateways/remote_redsys_test.rb | require 'test_helper'
class RemoteRedsysTest < Test::Unit::TestCase
def setup
@gateway = RedsysGateway.new(fixtures(:redsys))
@amount = 100
@credit_card = credit_card('4548812049400004')
@declined_card = credit_card
@options = {
order_id: generate_order_id,
description: 'Test Descript... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/remote/gateways/remote_quickpay_test.rb | test/remote/gateways/remote_quickpay_test.rb | require 'test_helper'
class RemoteQuickpayTest < Test::Unit::TestCase
# These tests assumes that you have added your development IP
# in the Quickpay Manager
def setup
@gateway = QuickpayGateway.new(fixtures(:quickpay))
@amount = 100
@options = {
order_id: generate_unique_id[0...10],
bil... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/remote/gateways/remote_cashnet_test.rb | test/remote/gateways/remote_cashnet_test.rb | require 'test_helper'
class CashnetTest < Test::Unit::TestCase
def setup
@gateway = CashnetGateway.new(fixtures(:cashnet))
@amount = 100
@credit_card = credit_card(
'5454545454545454',
month: 12,
year: Time.new.year + 1
)
@options = {
order_id: generate_unique_id,
bi... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/remote/gateways/remote_sum_up_test.rb | test/remote/gateways/remote_sum_up_test.rb | require 'test_helper'
class RemoteSumUpTest < Test::Unit::TestCase
def setup
@gateway = SumUpGateway.new(fixtures(:sum_up))
@amount = 100
@credit_card = credit_card('4000100011112224')
@declined_card = credit_card('55555555555555555')
@options = {
payment_type: 'card',
billing_addres... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/remote/gateways/remote_payment_express_test.rb | test/remote/gateways/remote_payment_express_test.rb | require 'test_helper'
class RemotePaymentExpressTest < Test::Unit::TestCase
def setup
@gateway = PaymentExpressGateway.new(fixtures(:payment_express))
@credit_card = credit_card('4111111111111111')
@options = {
order_id: generate_unique_id,
billing_address: address,
email: 'cody@examp... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/remote/gateways/remote_global_transport_test.rb | test/remote/gateways/remote_global_transport_test.rb | require 'test_helper'
class RemoteGlobalTransportTest < Test::Unit::TestCase
def setup
@gateway = GlobalTransportGateway.new(fixtures(:global_transport))
@credit_card = credit_card('4003002345678903')
@options = {
email: 'john@example.com',
order_id: '1',
billing_address: address
... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/remote/gateways/remote_pay_junction_test.rb | test/remote/gateways/remote_pay_junction_test.rb | require 'test_helper'
class PayJunctionTest < Test::Unit::TestCase
include ActiveMerchant::Billing
cattr_accessor :current_invoice
AMOUNT = 250
def setup
@gateway = PayJunctionGateway.new(fixtures(:pay_junction))
@credit_card = credit_card('4444333322221111', verification_value: '999')
@valid_... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/remote/gateways/remote_sallie_mae_test.rb | test/remote/gateways/remote_sallie_mae_test.rb | require 'test_helper'
class RemoteSallieMaeTest < Test::Unit::TestCase
def setup
@gateway = SallieMaeGateway.new(fixtures(:sallie_mae))
@amount = 100
@credit_card = credit_card('5454545454545454')
@declined_card = credit_card('4000300011112220')
@options = {
billing_address: address,
... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/remote/gateways/remote_spreedly_core_test.rb | test/remote/gateways/remote_spreedly_core_test.rb | require 'test_helper'
class RemoteSpreedlyCoreTest < Test::Unit::TestCase
def setup
@gateway = SpreedlyCoreGateway.new(fixtures(:spreedly_core))
@amount = 100
@credit_card = credit_card('5555555555554444')
@declined_card = credit_card('4012888888881881')
@check = check({ routing_number: '0210000... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/remote/gateways/remote_merchant_partners_test.rb | test/remote/gateways/remote_merchant_partners_test.rb | require 'test_helper'
class RemoteMerchantPartnersTest < Test::Unit::TestCase
def setup
@gateway = MerchantPartnersGateway.new(fixtures(:merchant_partners))
@amount = 100
@credit_card = credit_card('4003000123456781')
@declined_card = credit_card('4003000123456782')
@options = {
order_id:... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/remote/gateways/remote_sage_test.rb | test/remote/gateways/remote_sage_test.rb | require 'test_helper'
class RemoteSageTest < Test::Unit::TestCase
def setup
@gateway = SageGateway.new(fixtures(:sage))
@amount = 100
@visa = credit_card('4111111111111111')
@check = check
@mastercard = credit_card('5499740000000057')
@discover = credit_card('60110009930269... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/remote/gateways/remote_stripe_test.rb | test/remote/gateways/remote_stripe_test.rb | require 'test_helper'
class RemoteStripeTest < Test::Unit::TestCase
def setup
@gateway = StripeGateway.new(fixtures(:stripe))
@amount = 100
@credit_card = credit_card('4242424242424242')
@declined_card = credit_card('4000000000000002')
@new_credit_card = credit_card('5105105105105100')
@debi... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | true |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/remote/gateways/remote_airwallex_test.rb | test/remote/gateways/remote_airwallex_test.rb | require 'test_helper'
class RemoteAirwallexTest < Test::Unit::TestCase
def setup
@gateway = AirwallexGateway.new(fixtures(:airwallex))
# https://www.airwallex.com/docs/online-payments__test-card-numbers
@amount = 100
@declined_amount = 8014
@credit_card = credit_card('4012 0003 0000 1003')
@... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/remote/gateways/remote_creditcall_test.rb | test/remote/gateways/remote_creditcall_test.rb | require 'test_helper'
class RemoteCreditcallTest < Test::Unit::TestCase
def setup
@gateway = CreditcallGateway.new(fixtures(:creditcall))
@amount = 100
@credit_card = credit_card('4000100011112224')
@declined_card = credit_card('4000300011112220')
@options = {
billing_address: address,
... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/remote/gateways/remote_jetpay_v2_certification_test.rb | test/remote/gateways/remote_jetpay_v2_certification_test.rb | require 'test_helper'
class RemoteJetpayV2CertificationTest < Test::Unit::TestCase
def setup
@gateway = JetpayV2Gateway.new(fixtures(:jetpay_v2))
@unique_id = ''
@options = {
device: 'spreedly',
application: 'spreedly',
developer_id: 'GenkID',
billing_address: address(address1: ... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/remote/gateways/remote_paymill_test.rb | test/remote/gateways/remote_paymill_test.rb | require 'test_helper'
class RemotePaymillTest < Test::Unit::TestCase
def setup
params = fixtures(:paymill)
@gateway = PaymillGateway.new(public_key: params[:public_key], private_key: params[:private_key])
@amount = 100
@credit_card = credit_card('5500000000000004')
@options = {
email: 'Long... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/remote/gateways/remote_maxipago_test.rb | test/remote/gateways/remote_maxipago_test.rb | require 'test_helper'
class RemoteMaxipagoTest < Test::Unit::TestCase
def setup
@gateway = MaxipagoGateway.new(fixtures(:maxipago))
@amount = 1000
@invalid_amount = 2009
@credit_card = credit_card('4111111111111111', verification_value: '444')
@invalid_card = credit_card('4111111111111111', year... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/remote/gateways/remote_firstdata_e4_v27_test.rb | test/remote/gateways/remote_firstdata_e4_v27_test.rb | require 'test_helper'
class RemoteFirstdataE4V27Test < Test::Unit::TestCase
def setup
@gateway = FirstdataE4V27Gateway.new(fixtures(:firstdata_e4_v27))
@credit_card = credit_card
@credit_card_master = credit_card('5500000000000004', brand: 'master')
@bad_credit_card = credit_card('4111111111111113')
... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/remote/gateways/remote_redsys_rest_test.rb | test/remote/gateways/remote_redsys_rest_test.rb | require 'test_helper'
class RemoteRedsysRestTest < Test::Unit::TestCase
def setup
@gateway = RedsysRestGateway.new(fixtures(:redsys_rest))
@amount = 100
@credit_card = credit_card('4548810000000011', verification_value: '123', month: '12', year: '34')
@credit_card_no_cvv = credit_card('45488120494000... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/avs_result_test.rb | test/unit/avs_result_test.rb | require 'test_helper'
class AVSResultTest < Test::Unit::TestCase
def test_nil
AVSResult.new(nil)
end
def test_no_match
result = AVSResult.new(code: 'N')
assert_equal 'N', result.code
assert_equal 'N', result.street_match
assert_equal 'N', result.postal_match
assert_equal AVSResult.messag... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/network_connection_retries_test.rb | test/unit/network_connection_retries_test.rb | require 'test_helper'
class NetworkConnectionRetriesTest < Test::Unit::TestCase
class MyNewError < StandardError
end
include ActiveMerchant::NetworkConnectionRetries
def setup
@logger = stubs(:logger)
@requester = stubs(:requester)
@ok = stub(code: 200, message: 'OK', body: 'success')
end
de... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/expiry_date_test.rb | test/unit/expiry_date_test.rb | require 'test_helper'
class ExpiryDateTest < Test::Unit::TestCase
def test_should_be_expired
last_month = 2.months.ago
date = CreditCard::ExpiryDate.new(last_month.month, last_month.year)
assert date.expired?
end
def test_today_should_not_be_expired
today = Time.now.utc
date = CreditCard::Ex... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/three_d_secure_eci_mapper_test.rb | test/unit/three_d_secure_eci_mapper_test.rb | require 'test_helper'
class ThreeDSecureEciMapperTest < Test::Unit::TestCase
ThreeDSecureEciMapper = ActiveMerchant::Billing::ThreeDSecureEciMapper
[
{ eci: '00', brands: %i[master maestro], expected_eci_mapping: ThreeDSecureEciMapper::NON_THREE_D_SECURE_TRANSACTION },
{ eci: '01', brands: %i[master maest... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/credit_card_formatting_test.rb | test/unit/credit_card_formatting_test.rb | require 'test_helper'
class CreditCardFormattingTest < Test::Unit::TestCase
include ActiveMerchant::Billing::CreditCardFormatting
def test_should_format_number_by_rule
assert_equal 2005, format(2005, :steven_colbert)
assert_equal '2022', format(22, :four_digits_year)
assert_equal '2022', format(2022,... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/credit_card_methods_test.rb | test/unit/credit_card_methods_test.rb | require 'test_helper'
class CreditCardMethodsTest < Test::Unit::TestCase
include ActiveMerchant::Billing::CreditCardMethods
class CreditCard
include ActiveMerchant::Billing::CreditCardMethods
end
def maestro_card_numbers
%w[
5612590000000000 5817500000000000 5818000000000000
6390000000000... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/posts_data_test.rb | test/unit/posts_data_test.rb | require 'test_helper'
class PostsDataTests < Test::Unit::TestCase
def setup
@url = 'http://example.com'
@gateway = SimpleTestGateway.new
@ok = stub(body: '', code: '200', message: 'OK')
@error = stub(code: 500, message: 'Internal Server Error', body: 'failure')
end
def teardown
SimpleTestGat... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/country_test.rb | test/unit/country_test.rb | require 'test_helper'
class CountryTest < Test::Unit::TestCase
def test_country_from_hash
country = ActiveMerchant::Country.new(name: 'Canada', alpha2: 'CA', alpha3: 'CAN', numeric: '124')
assert_equal 'CA', country.code(:alpha2).value
assert_equal 'CAN', country.code(:alpha3).value
assert_equal '124... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/country_code_test.rb | test/unit/country_code_test.rb | require 'test_helper'
class CountryCodeTest < Test::Unit::TestCase
def test_alpha2_country_code
code = ActiveMerchant::CountryCode.new('CA')
assert_equal 'CA', code.value
assert_equal 'CA', code.to_s
assert_equal :alpha2, code.format
end
def test_lower_alpha2_country_code
code = ActiveMercha... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/multi_response_test.rb | test/unit/multi_response_test.rb | require 'test_helper'
class MultiResponseTest < Test::Unit::TestCase
def test_initial_state
r = MultiResponse.new
assert r.success?
assert_nil r.params
assert !r.test?
end
def test_processes_sub_requests
r1 = Response.new(true, '1', {})
r2 = Response.new(true, '2', {})
m = MultiRespo... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/fixtures_test.rb | test/unit/fixtures_test.rb | require 'test_helper'
class FixturesTest < Test::Unit::TestCase
def test_sort
keys = YAML.safe_load(File.read(ActiveMerchant::Fixtures::DEFAULT_CREDENTIALS), aliases: true).keys
assert_equal(
keys,
keys.sort
)
end
end
| ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/network_tokenization_credit_card_test.rb | test/unit/network_tokenization_credit_card_test.rb | require 'test_helper'
class NetworkTokenizationCreditCardTest < Test::Unit::TestCase
def setup
@tokenized_card = ActiveMerchant::Billing::NetworkTokenizationCreditCard.new(
number: '4242424242424242', brand: 'visa',
month: default_expiration_date.month, year: default_expiration_date.year,
payme... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/post_data_test.rb | test/unit/post_data_test.rb | require 'test_helper'
class MyPost < ActiveMerchant::PostData
self.required_fields = %i[ccnumber ccexp firstname lastname username password order_id key time]
end
class PostDataTest < Test::Unit::TestCase
def teardown
ActiveMerchant::PostData.required_fields = []
end
def test_element_assignment
name ... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/response_test.rb | test/unit/response_test.rb | require 'test_helper'
class ResponseTest < Test::Unit::TestCase
def test_response_success
assert Response.new(true, 'message', param: 'value').success?
assert !Response.new(false, 'message', param: 'value').success?
end
def test_response_without_avs
response = Response.new(true, 'message', param: 'v... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/cvv_result_test.rb | test/unit/cvv_result_test.rb | require 'test_helper'
class CVVResultTest < Test::Unit::TestCase
def test_nil_data
result = CVVResult.new(nil)
assert_nil result.code
assert_nil result.message
end
def test_blank_data
result = CVVResult.new('')
assert_nil result.code
assert_nil result.message
end
def test_successful... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/connection_test.rb | test/unit/connection_test.rb | require 'test_helper'
class ConnectionTest < Test::Unit::TestCase
def setup
@ok = stub(code: 200, message: 'OK', body: 'success')
@endpoint = 'https://example.com/tx.php'
@connection = ActiveMerchant::Connection.new(@endpoint)
@connection.logger = stub(info: nil, debug: nil, error: nil)
end
d... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/credit_card_test.rb | test/unit/credit_card_test.rb | require 'test_helper'
class CreditCardTest < Test::Unit::TestCase
def setup
CreditCard.require_verification_value = false
@visa = credit_card('4779139500118580', brand: 'visa')
@maestro = credit_card('676700000000000000', brand: 'maestro', verification_value: '')
@bp_plus = credit_card('70501 5010216... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/apple_pay_payment_token_test.rb | test/unit/apple_pay_payment_token_test.rb | require 'test_helper'
class ApplePayPaymentTokenTest < Test::Unit::TestCase
def setup
@token = ActiveMerchant::Billing::ApplePayPaymentToken.new(payment_data: {})
end
def test_type
assert_equal 'apple_pay', @token.type
end
end
| ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/check_test.rb | test/unit/check_test.rb | require 'test_helper'
class CheckTest < Test::Unit::TestCase
VALID_ABA = '111000025'
INVALID_ABA = '999999999'
MALFORMED_ABA = 'I like fish'
VALID_ELECTRONIC_CBA = '000194611'
VALID_MICR_CBA = '94611001'
INVALID_NINE_DIGIT_CBA = '012345678'
INVALID_SEVEN_DIGIT_ROUTING_NUMBER = '0123456'
ACCOUNT_... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/versionable_test.rb | test/unit/versionable_test.rb | require 'test_helper'
class VersionableTest < Test::Unit::TestCase
class ParentClass
include ActiveMerchant::Versionable
end
class DummyClass < ParentClass
end
class FakeClass < ParentClass
end
class DummyChildClass < DummyClass
end
def setup
@dummy_instance = DummyClass.new
@fake_ins... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/rails_compatibility_test.rb | test/unit/rails_compatibility_test.rb | require 'test_helper'
class RailsCompatibilityTest < Test::Unit::TestCase
def test_should_be_able_to_access_errors_indifferently
cc = credit_card('4779139500118580', first_name: '')
silence_deprecation_warnings do
assert !cc.valid?
assert cc.errors.on(:first_name)
assert cc.errors.on('firs... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/base_test.rb | test/unit/base_test.rb | require 'test_helper'
class BaseTest < Test::Unit::TestCase
def setup
ActiveMerchant::Billing::Base.mode = :test
end
def teardown
ActiveMerchant::Billing::Base.mode = :test
end
def test_should_return_a_new_gateway_specified_by_symbol_name
assert_equal BogusGateway, Base.gateway(:bogus)
... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/orbital_cvv_result_test.rb | test/unit/gateways/orbital_cvv_result_test.rb | require 'test_helper'
class OrbitalCVVResultTest < Test::Unit::TestCase
def test_nil_data
result = ActiveMerchant::Billing::OrbitalGateway::CVVResult.new(nil)
assert_equal '', result.code
assert_equal ActiveMerchant::Billing::OrbitalGateway::CVVResult.messages[''], result.message
end
def test_blank_... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/be2bill_test.rb | test/unit/gateways/be2bill_test.rb | require 'test_helper'
class Be2billTest < Test::Unit::TestCase
def setup
@gateway = Be2billGateway.new(
login: 'login',
password: 'password'
)
@credit_card = credit_card
@amount = 100
@options = {
order_id: '1',
billing_address: address,
description: 'Store Purchas... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/mit_test.rb | test/unit/gateways/mit_test.rb | require 'test_helper'
class MitTest < Test::Unit::TestCase
def setup
@credentials = {
commerce_id: '147',
user: 'IVCA33721',
api_key: 'IGECPJ0QOJJCEHUI',
key_session: 'CB0DC4887DD1D5CEA205E66EE934E430'
}
@gateway = MitGateway.new(@credentials)
@credit_card = ActiveMerchant::B... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/eway_managed_test.rb | test/unit/gateways/eway_managed_test.rb | require 'test_helper'
class EwayManagedTest < Test::Unit::TestCase
def setup
Base.mode = :test
@gateway = EwayManagedGateway.new(username: 'username', login: 'login', password: 'password')
@valid_card = '4444333322221111'
@valid_customer_id = '9876543211000'
@credit_card = credit_card(@valid_c... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/itransact_test.rb | test/unit/gateways/itransact_test.rb | require 'test_helper'
class ItransactTest < Test::Unit::TestCase
def setup
@gateway = ItransactGateway.new(
login: 'login',
password: 'password',
gateway_id: '09999'
)
@credit_card = credit_card
@check = check
@amount = 1014 # = $10.14
@options = {
email: 'name@domai... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/quickpay_v4to7_test.rb | test/unit/gateways/quickpay_v4to7_test.rb | require 'test_helper'
class QuickpayV4to7Test < Test::Unit::TestCase
include CommStub
def merchant_id
'80000000000'
end
def setup
@gateway = QuickpayGateway.new(
login: merchant_id,
password: 'PASSWORD',
version: 7
)
@credit_card = credit_card('4242424242424242')
@amoun... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/exact_test.rb | test/unit/gateways/exact_test.rb | require 'test_helper'
class ExactTest < Test::Unit::TestCase
def setup
@gateway = ExactGateway.new(login: 'A00427-01',
password: 'testus')
@credit_card = credit_card
@amount = 100
@options = {
order_id: '1',
billing_address: address,
description: 'St... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/micropayment_test.rb | test/unit/gateways/micropayment_test.rb | require 'test_helper'
class MicropaymentTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = MicropaymentGateway.new(
access_key: 'key'
)
@credit_card = credit_card
@amount = 100
end
def test_successful_purchase
response = stub_comms do
@gateway.purchase(@amount,... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/quantum_test.rb | test/unit/gateways/quantum_test.rb | require 'test_helper'
class QuantumTest < Test::Unit::TestCase
def setup
@gateway = QuantumGateway.new(
login: '',
password: ''
)
@credit_card = credit_card
@amount = 100
@options = {
billing_address: address,
description: 'Store Purchase'
}
end
def test_success... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/merchant_warrior_test.rb | test/unit/gateways/merchant_warrior_test.rb | require 'test_helper'
class MerchantWarriorTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = MerchantWarriorGateway.new(
merchant_uuid: '4e922de8c2a4c',
api_key: 'g6jrxa9o',
api_passphrase: 'vp4ujoem'
)
@credit_card = credit_card
@success_amount = 10000
@tran... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/commercegate_test.rb | test/unit/gateways/commercegate_test.rb | require 'test_helper'
class CommercegateTest < Test::Unit::TestCase
def setup
@gateway = CommercegateGateway.new(
login: 'usrID',
password: 'usrPass',
site_id: '123',
offer_id: '321'
)
@credit_card = credit_card
@amount = 1000
@options = {
address:
}
end
... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/firstdata_e4_v27_test.rb | test/unit/gateways/firstdata_e4_v27_test.rb | require 'test_helper'
require 'nokogiri'
require 'yaml'
class FirstdataE4V27Test < Test::Unit::TestCase
include CommStub
def setup
@gateway = FirstdataE4V27Gateway.new(
login: 'A00427-01',
password: 'testus',
key_id: '12345',
hmac_key: 'hexkey'
)
@credit_card = credit_card
... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | true |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/reach_test.rb | test/unit/gateways/reach_test.rb | require 'test_helper'
class ReachTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = ReachGateway.new(fixtures(:reach))
@credit_card = credit_card
@amount = 100
@options = {
email: 'johndoe@reach.com',
order_id: '123',
currency: 'USD',
billing_address: {
... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/eway_rapid_test.rb | test/unit/gateways/eway_rapid_test.rb | require 'test_helper'
class EwayRapidTest < Test::Unit::TestCase
include CommStub
def setup
ActiveMerchant::Billing::EwayRapidGateway.partner_id = nil
@gateway = EwayRapidGateway.new(
login: 'login',
password: 'password'
)
@credit_card = credit_card
@amount = 100
@address = {... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | true |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/cyber_source_test.rb | test/unit/gateways/cyber_source_test.rb | require 'test_helper'
require 'nokogiri'
class CyberSourceTest < Test::Unit::TestCase
include CommStub
def setup
Base.mode = :test
@gateway = CyberSourceGateway.new(login: 'l', password: 'p')
key = OpenSSL::PKey::RSA.new(1024)
@gateway_certificate = CyberSourceGateway.new(login: 'l', public_key:... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | true |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/vpos_test.rb | test/unit/gateways/vpos_test.rb | require 'test_helper'
module ActiveMerchant # :nodoc:
module Billing # :nodoc:
class VposGateway
def one_time_public_key
OpenSSL::PKey::RSA.new(2048)
end
end
end
end
class VposTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = VposGateway.new(public_key: 'some_k... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/global_collect_test.rb | test/unit/gateways/global_collect_test.rb | require 'test_helper'
class GlobalCollectTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = GlobalCollectGateway.new(merchant_id: '1234',
api_key_id: '39u4193urng12',
secret_api_key: '109H/288H*50Y18W4/0G8571F245KA=... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | true |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/loan_payment_pro_test.rb | test/unit/gateways/loan_payment_pro_test.rb | require 'test_helper'
class LoanPaymentProTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = LoanPaymentProGateway.new(transaction_key: 'login')
@credit_card = credit_card('4000100011112224', month: 9, year: 2025, verification_value: '123')
@amount = 500
@options = {
order_id... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/spreedly_core_test.rb | test/unit/gateways/spreedly_core_test.rb | require 'test_helper'
class SpreedlyCoreTest < Test::Unit::TestCase
def setup
@gateway = SpreedlyCoreGateway.new(login: 'api_login', password: 'api_secret', gateway_token: 'token')
@payment_method_token = 'E3eQGR3E0xiosj7FOJRtIKbF8Ch'
@credit_card = credit_card
@check = check
@amount = 103
@... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | true |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/vanco_test.rb | test/unit/gateways/vanco_test.rb | require 'test_helper'
class VancoTest < Test::Unit::TestCase
include CommStub
SECONDS_PER_DAY = 3600 * 24
def setup
@gateway = VancoGateway.new(user_id: 'login', password: 'password', client_id: 'client_id')
@credit_card = credit_card
@check = check
@amount = 100
@options = {
order_id... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/psigate_test.rb | test/unit/gateways/psigate_test.rb | require 'test_helper'
class PsigateTest < Test::Unit::TestCase
def setup
@gateway = PsigateGateway.new(
login: 'teststore',
password: 'psigate1234'
)
@amount = 100
@credit_card = credit_card('4111111111111111')
@options = { order_id: '1', billing_address: address }
end
def test_... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/pagarme_test.rb | test/unit/gateways/pagarme_test.rb | require 'test_helper'
class PagarmeTest < Test::Unit::TestCase
def setup
@gateway = PagarmeGateway.new(api_key: 'ak_test_e1QGU2gL98MDCHZxHLJ9sofPUFJ7tH')
@credit_card = credit_card('4242424242424242', {
first_name: 'Richard',
last_name: 'Deschamps'
})
@amount = 1000
@options = {
... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | true |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/epay_test.rb | test/unit/gateways/epay_test.rb | require 'test_helper'
class EpayTest < Test::Unit::TestCase
def setup
Base.mode = :test
@gateway = EpayGateway.new(
login: '10100111001',
password: 'http://example.com'
)
@credit_card = credit_card
@options = { three_d_secure: { eci: '7', xid: '123', cavv: '456', version: '2', ds_tr... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/barclaycard_smartpay_test.rb | test/unit/gateways/barclaycard_smartpay_test.rb | require 'test_helper'
class BarclaycardSmartpayTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = BarclaycardSmartpayGateway.new(
company: 'company',
merchant: 'merchant',
password: 'password'
)
@credit_card = credit_card
@three_ds_enrolled_card = credit_card('421... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/firstdata_e4_test.rb | test/unit/gateways/firstdata_e4_test.rb | require 'test_helper'
require 'nokogiri'
require 'yaml'
class FirstdataE4Test < Test::Unit::TestCase
include CommStub
def setup
@gateway = FirstdataE4Gateway.new(
login: 'A00427-01',
password: 'testus'
)
@credit_card = credit_card
@amount = 100
@options = {
order_id: '1',
... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | true |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/trans_first_transaction_express_test.rb | test/unit/gateways/trans_first_transaction_express_test.rb | require 'test_helper'
class TransFirstTransactionExpressTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = TransFirstTransactionExpressGateway.new(
gateway_id: 'gateway_id',
reg_key: 'reg_key'
)
@credit_card = credit_card
@check = check
@amount = 100
@declined_a... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/quickpay_v10_test.rb | test/unit/gateways/quickpay_v10_test.rb | require 'test_helper'
class QuickpayV10Test < Test::Unit::TestCase
include CommStub
def setup
@gateway = QuickpayV10Gateway.new(api_key: 'APIKEY')
@credit_card = credit_card('4242424242424242')
@amount = 100
@options = { order_id: '1', billing_address: address, customer_ip: '1.1.1.1' }
end
de... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/stripe_payment_intents_test.rb | test/unit/gateways/stripe_payment_intents_test.rb | require 'test_helper'
class StripePaymentIntentsTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = StripePaymentIntentsGateway.new(login: 'sk_test_login')
@credit_card = credit_card()
@threeds_2_card = credit_card('4000000000003220')
@visa_token = 'pm_card_visa'
@three_ds_auth... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | true |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/pac_net_raven_test.rb | test/unit/gateways/pac_net_raven_test.rb | require 'test_helper'
class PacNetRavenGatewayTest < Test::Unit::TestCase
def setup
@gateway = PacNetRavenGateway.new(
user: 'user',
secret: 'secret',
prn: 123456
)
@credit_card = credit_card
@amount = 100
@options = {
billing_address: address
}
end
def test_suc... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/mercury_test.rb | test/unit/gateways/mercury_test.rb | require 'test_helper'
class MercuryTest < Test::Unit::TestCase
include CommStub
def setup
Base.mode = :test
@gateway = MercuryGateway.new(fixtures(:mercury))
@amount = 100
@credit_card = credit_card('5499990123456781', brand: 'master')
@declined_card = credit_card('4000300011112220')
@o... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/commerce_hub_test.rb | test/unit/gateways/commerce_hub_test.rb | require 'test_helper'
class CommerceHubTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = CommerceHubGateway.new(api_key: 'login', api_secret: 'password', merchant_id: '12345', terminal_id: '0001')
@amount = 1204
@credit_card = credit_card('4005550000000019', month: '02', year: '2035',... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | true |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/paypal_express_test.rb | test/unit/gateways/paypal_express_test.rb | require 'test_helper'
require 'nokogiri'
class PaypalExpressTest < Test::Unit::TestCase
TEST_REDIRECT_URL = 'https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=1234567890'
TEST_REDIRECT_URL_MOBILE = 'https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout-mobile&token=1234... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | true |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/braintree_test.rb | test/unit/gateways/braintree_test.rb | require 'test_helper'
class BraintreeTest < Test::Unit::TestCase
def test_new_with_login_password_creates_braintree_orange
gateway = BraintreeGateway.new(
login: 'LOGIN',
password: 'PASSWORD'
)
assert_instance_of BraintreeOrangeGateway, gateway
end
def test_new_with_merchant_id_creates_b... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/first_giving_test.rb | test/unit/gateways/first_giving_test.rb | require 'test_helper'
class FirstGivingTest < Test::Unit::TestCase
def setup
@gateway = FirstGivingGateway.new(
application_key: 'application_key',
security_token: 'security_token',
charity_id: 'charity_id'
)
@credit_card = credit_card
@amount = 100
@options = {}
end
def ... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/braintree_orange_test.rb | test/unit/gateways/braintree_orange_test.rb | require 'test_helper'
class BraintreeOrangeTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = BraintreeOrangeGateway.new(
login: 'LOGIN',
password: 'PASSWORD'
)
@credit_card = credit_card
@amount = 100
@options = { billing_address: address }
end
def test_succe... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/quickpay_test.rb | test/unit/gateways/quickpay_test.rb | require 'test_helper'
class QuickpayTest < Test::Unit::TestCase
def test_error_without_login_option
assert_raise ArgumentError do
QuickpayGateway.new
end
end
def test_v4to7
gateway = QuickpayGateway.new(login: 50000000, password: 'secret')
assert_instance_of QuickpayV4to7Gateway, gateway
... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/ncr_secure_pay_test.rb | test/unit/gateways/ncr_secure_pay_test.rb | require 'test_helper'
class NcrSecurePayTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = NcrSecurePayGateway.new(username: 'login', password: 'password')
@credit_card = credit_card
@amount = 100
@options = {
order_id: '1',
billing_address: address,
description: ... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/ipp_test.rb | test/unit/gateways/ipp_test.rb | require 'test_helper'
class IppTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = IppGateway.new(
username: 'username',
password: 'password'
)
@amount = 100
@credit_card = credit_card
end
def test_successful_purchase
response = stub_comms do
@gateway.purc... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/shift4_test.rb | test/unit/gateways/shift4_test.rb | require 'test_helper'
class Shift4Test < Test::Unit::TestCase
include CommStub
def setup
@gateway = Shift4Gateway.new(client_guid: '123456', auth_token: 'abcder123')
@credit_card = credit_card('4000100011112224', verification_value: '333', first_name: 'John', last_name: 'Doe')
@amount = 5
@options ... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | true |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/usa_epay_test.rb | test/unit/gateways/usa_epay_test.rb | require 'test_helper'
require 'logger'
class UsaEpayTest < Test::Unit::TestCase
def test_transaction_gateway_created
gateway = UsaEpayGateway.new(
login: 'X'
)
assert_kind_of UsaEpayTransactionGateway, gateway
end
def test_advanced_gateway_created_with_software_id
gateway = UsaEpayGateway.... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/sallie_mae_test.rb | test/unit/gateways/sallie_mae_test.rb | require 'test_helper'
class SallieMaeTest < Test::Unit::TestCase
def setup
@gateway = SallieMaeGateway.new(
login: 'FAKEACCOUNT'
)
@credit_card = credit_card
@amount = 100
@options = {
order_id: '1',
billing_address: address,
description: 'Store Purchase'
}
end
... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/clearhaus_test.rb | test/unit/gateways/clearhaus_test.rb | require 'test_helper'
class ClearhausTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = ClearhausGateway.new(api_key: 'test_key')
@credit_card = credit_card
@amount = 100
@options = {
order_id: '1',
billing_address: address,
description: 'Store Purchase'
}
... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/kushki_test.rb | test/unit/gateways/kushki_test.rb | require 'test_helper'
class KushkiTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = KushkiGateway.new(public_merchant_id: '_', private_merchant_id: '_')
@amount = 100
@credit_card = credit_card
end
def test_successful_purchase_with_version_endpoint_header
# Set up expected ver... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/webpay_test.rb | test/unit/gateways/webpay_test.rb | require 'test_helper'
class WebpayTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = WebpayGateway.new(login: 'sk_test_login')
@credit_card = credit_card()
@amount = 40000
@refund_amount = 20000
@options = {
billing_address: address(),
description: 'Test Purchase'
... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/bpoint_test.rb | test/unit/gateways/bpoint_test.rb | require 'test_helper'
class BpointTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = BpointGateway.new(
username: '',
password: '',
merchant_number: ''
)
@credit_card = credit_card
@amount = 100
@options = {
order_id: '1',
billing_address: address... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/metrics_global_test.rb | test/unit/gateways/metrics_global_test.rb | require 'test_helper'
require 'active_support/core_ext/kernel/singleton_class'
class MetricsGlobalTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = ActiveMerchant::Billing::MetricsGlobalGateway.new(
login: 'X',
password: 'Y'
)
@amount = 100
@credit_card = credit_card('4... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/latitude19_test.rb | test/unit/gateways/latitude19_test.rb | require 'test_helper'
class Latitude19Test < Test::Unit::TestCase
include CommStub
def setup
@gateway = Latitude19Gateway.new(fixtures(:latitude19))
@amount = 100
@credit_card = credit_card('4000100011112224', verification_value: '747')
@declined_card = credit_card('0000000000000000')
@optio... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/bank_frick_test.rb | test/unit/gateways/bank_frick_test.rb | require 'test_helper'
class BankFrickTest < Test::Unit::TestCase
def setup
@gateway = BankFrickGateway.new(
sender: 'sender-uuid',
channel: 'channel-uuid',
userid: 'user-uuid',
userpwd: 'password'
)
@credit_card = credit_card
@amount = 100
@options = {
order_id: '1... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/redsys_rest_test.rb | test/unit/gateways/redsys_rest_test.rb | require 'test_helper'
class RedsysRestTest < Test::Unit::TestCase
include CommStub
def setup
@credentials = {
login: '091952713',
secret_key: 'sq7HjrUOBfKmC576ILgskD5srU870gJ7',
terminal: '201'
}
@gateway = RedsysRestGateway.new(@credentials)
@credit_card = credit_card
@amoun... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/cardknox_test.rb | test/unit/gateways/cardknox_test.rb | require 'test_helper'
class CardknoxTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = CardknoxGateway.new(api_key: 'api_key')
@credit_card = credit_card('4242424242424242')
@options = {
billing_address: address,
shipping_address: address
}
@amount = 100
end
def... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/eway_test.rb | test/unit/gateways/eway_test.rb | require 'test_helper'
class EwayTest < Test::Unit::TestCase
def setup
@gateway = EwayGateway.new(
login: '87654321'
)
@amount = 100
@credit_card = credit_card('4646464646464646')
@options = {
order_id: '1230123',
email: 'bob@testbob.com',
billing_address: {
addr... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/iveri_test.rb | test/unit/gateways/iveri_test.rb | require 'test_helper'
class IveriTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = IveriGateway.new(app_id: '123', cert_id: '321')
@credit_card = credit_card('4242424242424242')
@amount = 100
@options = {
order_id: generate_unique_id,
billing_address: address,
de... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | true |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/shift4_v2_test.rb | test/unit/gateways/shift4_v2_test.rb | require 'test_helper'
require_relative 'securion_pay_test'
class Shift4V2Test < SecurionPayTest
include CommStub
def setup
super
@gateway = Shift4V2Gateway.new(
secret_key: 'pr_test_random_key'
)
@check = check
end
def test_invalid_raw_response
@gateway.expects(:ssl_request).returns... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/transact_pro_test.rb | test/unit/gateways/transact_pro_test.rb | require 'test_helper'
class TransactProTest < Test::Unit::TestCase
def setup
@gateway = TransactProGateway.new(
guid: 'login',
password: 'password',
terminal: 'terminal'
)
@credit_card = credit_card
@amount = 100
@options = {
order_id: '1',
billing_address: address... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/nmi_test.rb | test/unit/gateways/nmi_test.rb | require 'test_helper'
class NmiTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = NmiGateway.new(fixtures(:nmi))
@gateway_secure = NmiGateway.new(fixtures(:nmi_secure))
@amount = 100
@credit_card = credit_card
@check = check
@merchant_defined_fields = { merchant_defined_fi... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.