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/unit/gateways/ezic_test.rb | test/unit/gateways/ezic_test.rb | require 'test_helper'
class EzicTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = EzicGateway.new(account_id: 'TheID')
@credit_card = credit_card
@amount = 100
@options = {
order_id: '1',
billing_address: address,
description: 'Store Purchase'
}
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/iridium_test.rb | test/unit/gateways/iridium_test.rb | require 'test_helper'
class IridiumTest < Test::Unit::TestCase
include CommStub
def setup
Base.mode = :test
@gateway = IridiumGateway.new(login: 'login', password: 'password')
@credit_card = credit_card
@amount = 100
@options = {
order_id: '1',
billing_address: address,
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/wepay_test.rb | test/unit/gateways/wepay_test.rb | require 'test_helper'
class WepayTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = WepayGateway.new(
client_id: 'client_id',
account_id: 'account_id',
access_token: 'access_token'
)
@credit_card = credit_card
@amount = 20000
@options = {
email: 'test@e... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/modern_payments_cim_test.rb | test/unit/gateways/modern_payments_cim_test.rb | require 'test_helper'
class ModernPaymentsCimTest < Test::Unit::TestCase
def setup
Base.mode = :test
@gateway = ModernPaymentsCimGateway.new(
login: 'login',
password: 'password'
)
@credit_card = credit_card
@amount = 100
@options = {
order_id: '1',
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/pay_secure_test.rb | test/unit/gateways/pay_secure_test.rb | require 'test_helper'
class PaySecureTest < Test::Unit::TestCase
def setup
@gateway = PaySecureGateway.new(
login: 'login',
password: 'password'
)
@credit_card = credit_card
@options = {
order_id: '1000',
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/secure_pay_test.rb | test/unit/gateways/secure_pay_test.rb | require 'test_helper'
class SecurePayTest < Test::Unit::TestCase
def setup
@gateway = SecurePayGateway.new(
login: 'X',
password: 'Y'
)
@credit_card = credit_card
@options = {
order_id: generate_unique_id,
description: 'Store purchase',
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/monei_test.rb | test/unit/gateways/monei_test.rb | require 'test_helper'
class MoneiTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = MoneiGateway.new(
fixtures(:monei)
)
@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/pay_junction_test.rb | test/unit/gateways/pay_junction_test.rb | require 'test/unit'
require 'test_helper'
class PayJunctionTest < Test::Unit::TestCase
include CommStub
def setup
Base.mode = :test
@gateway = PayJunctionGateway.new(
login: 'pj-ql-01',
password: 'pj-ql-01p'
)
@credit_card = credit_card
@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/unit/gateways/stripe_test.rb | test/unit/gateways/stripe_test.rb | require 'test_helper'
class StripeTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = StripeGateway.new(login: 'sk_test_login')
@credit_card = credit_card()
@threeds_card = credit_card('4000000000003063')
@non_3ds_card = credit_card('378282246310005')
@amount = 400
@refund_a... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | true |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/redsys_sha256_test.rb | test/unit/gateways/redsys_sha256_test.rb | require 'test_helper'
class RedsysSHA256Test < Test::Unit::TestCase
include CommStub
def setup
Base.mode = :test
@credentials = {
login: '091952713',
secret_key: 'QIK77hYl6UFcoCYFKcj+ZjJg8Q6I93Dx',
signature_algorithm: 'sha256'
}
@gateway = RedsysGateway.new(@credentials)
@cr... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | true |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/deepstack_test.rb | test/unit/gateways/deepstack_test.rb | require 'test_helper'
class DeepstackTest < Test::Unit::TestCase
def setup
Base.mode = :test
@gateway = DeepstackGateway.new(fixtures(:deepstack))
@credit_card = credit_card
@amount = 100
@credit_card = ActiveMerchant::Billing::CreditCard.new(
number: '4111111111111111',
verification... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/citrus_pay_test.rb | test/unit/gateways/citrus_pay_test.rb | require 'test_helper'
class CitrusPayTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = CitrusPayGateway.new(
userid: 'userid',
password: 'password'
)
@credit_card = credit_card
@amount = 100
@options = {
order_id: '1',
billing_address: address,
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/instapay_test.rb | test/unit/gateways/instapay_test.rb | require 'test_helper'
class InstapayTest < Test::Unit::TestCase
def setup
@gateway = InstapayGateway.new(login: 'TEST0')
@credit_card = credit_card
@amount = 100
end
def test_successful_purchase
@gateway.expects(:ssl_post).returns(successful_purchase_response)
assert response = @gateway.pur... | 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_partners_test.rb | test/unit/gateways/merchant_partners_test.rb | require 'test_helper'
require 'nokogiri'
class MerchantPartnersTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = MerchantPartnersGateway.new(
account_id: 'TEST0',
merchant_pin: '1234567890'
)
@credit_card = credit_card
@amount = 100
@request_root = '/interface_dri... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/secure_pay_tech_test.rb | test/unit/gateways/secure_pay_tech_test.rb | require 'test_helper'
class SecurePayTechTest < Test::Unit::TestCase
def setup
@gateway = SecurePayTechGateway.new(
login: 'x',
password: 'y'
)
@amount = 100
@credit_card = credit_card('4987654321098769')
@options = {
billing_address: address
}
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/gateways/optimal_payment_test.rb | test/unit/gateways/optimal_payment_test.rb | require 'test_helper'
require 'nokogiri'
class ActiveMerchant::Billing::OptimalPaymentGateway
public :cc_auth_request
end
class OptimalPaymentTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = OptimalPaymentGateway.new(
account_number: '12345678',
store_id: 'login',
passwor... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/qvalent_test.rb | test/unit/gateways/qvalent_test.rb | require 'test_helper'
class QvalentTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = QvalentGateway.new(
username: 'username',
password: 'password',
merchant: 'merchant',
pem: 'pem',
pem_password: 'pempassword'
)
@credit_card = credit_card
@amount = 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/secure_pay_au_test.rb | test/unit/gateways/secure_pay_au_test.rb | require 'test_helper'
class SecurePayAuTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = SecurePayAuGateway.new(
login: 'login',
password: 'password'
)
@credit_card = credit_card
@amount = 100
@options = {
order_id: 'order123',
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/payflow_express_test.rb | test/unit/gateways/payflow_express_test.rb | require 'test_helper'
class PayflowExpressTest < 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=1234567890'
LIVE_RED... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/mercado_pago_test.rb | test/unit/gateways/mercado_pago_test.rb | require 'test_helper'
class MercadoPagoTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = MercadoPagoGateway.new(access_token: 'access_token')
@credit_card = credit_card
@elo_credit_card = credit_card(
'5067268650517446',
month: 10,
year: 2020,
first_name: 'John ... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | true |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/garanti_test.rb | test/unit/gateways/garanti_test.rb | # coding: utf-8
require 'test_helper'
class GarantiTest < Test::Unit::TestCase
def setup
@original_kcode = nil
Base.mode = :test
@gateway = GarantiGateway.new(login: 'a', password: 'b', terminal_id: 'c', merchant_id: 'd')
@credit_card = credit_card('4242424242424242')
@amount = 1000 # 1000 cen... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/s5_test.rb | test/unit/gateways/s5_test.rb | require 'test_helper'
class S5Test < Test::Unit::TestCase
include CommStub
def setup
@gateway = S5Gateway.new(
sender: 'sender',
channel: 'channel',
login: 'login',
password: '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/payu_latam_test.rb | test/unit/gateways/payu_latam_test.rb | require 'test_helper'
class PayuLatamTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = PayuLatamGateway.new(merchant_id: 'merchant_id', account_id: 'account_id', api_login: 'api_login', api_key: 'api_key', payment_country: 'AR')
@amount = 4000
@credit_card = credit_card('4097440000000... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | true |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/payex_test.rb | test/unit/gateways/payex_test.rb | require 'test_helper'
class PayexTest < Test::Unit::TestCase
def setup
@gateway = PayexGateway.new(
account: 'account',
encryption_key: 'encryption_key'
)
@credit_card = credit_card
@amount = 1000
@options = {
order_id: '1234'
}
end
def test_successful_purchase
@g... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/usa_epay_transaction_test.rb | test/unit/gateways/usa_epay_transaction_test.rb | require 'test_helper'
class UsaEpayTransactionTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = UsaEpayTransactionGateway.new(login: 'LOGIN')
@credit_card = credit_card('4242424242424242')
@check = check
@options = {
billing_address: address,
shipping_address: 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/flex_charge_test.rb | test/unit/gateways/flex_charge_test.rb | require 'test_helper'
class FlexChargeTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = FlexChargeGateway.new(
app_key: 'SOMECREDENTIAL',
app_secret: 'SOMECREDENTIAL',
site_id: 'SOMECREDENTIAL',
mid: 'SOMECREDENTIAL'
)
@credit_card = credit_card
@amount = 10... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | true |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/network_merchants_test.rb | test/unit/gateways/network_merchants_test.rb | require 'test_helper'
class NetworkMerchantsTest < Test::Unit::TestCase
def setup
@gateway = NetworkMerchantsGateway.new(
login: 'login',
password: 'password'
)
@credit_card = credit_card
@check = check
@amount = 100
@options = {
order_id: '1',
billing_address: addre... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/payflow_test.rb | test/unit/gateways/payflow_test.rb | require 'test_helper'
class PayflowTest < Test::Unit::TestCase
include CommStub
# From `BuyerAuthStatusEnum` in https://www.paypalobjects.com/webstatic/en_US/developer/docs/pdf/pp_payflowpro_xmlpay_guide.pdf, page 109
SUCCESSFUL_AUTHENTICATION_STATUS = 'Y'
CHALLENGE_REQUIRED_AUTHENTICATION_STATUS = 'C'
def... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | true |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/jetpay_v2_test.rb | test/unit/gateways/jetpay_v2_test.rb | require 'test_helper'
class JetpayV2Test < Test::Unit::TestCase
include CommStub
def setup
@gateway = JetpayV2Gateway.new(login: 'login')
@credit_card = credit_card
@amount = 100
@options = {
device: 'spreedly',
application: 'spreedly',
developer_id: 'GenkID',
billing_add... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/ipg_test.rb | test/unit/gateways/ipg_test.rb | require 'test_helper'
class IpgTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = IpgGateway.new(fixtures(:ipg))
@gateway_ma = IpgGateway.new(fixtures(:ipg_ma))
@credit_card = credit_card
@amount = 100
@options = {
currency: 'ARS'
}
end
def test_successful_purcha... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | true |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/flo2cash_simple_test.rb | test/unit/gateways/flo2cash_simple_test.rb | require 'test_helper'
class Flo2cashSimpleTest < Test::Unit::TestCase
include CommStub
def setup
Base.mode = :test
@gateway = Flo2cashSimpleGateway.new(
username: 'username',
password: 'password',
account_id: 'account_id'
)
@credit_card = credit_card
@amount = 100
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/merchant_ware_test.rb | test/unit/gateways/merchant_ware_test.rb | require 'test_helper'
class MerchantWareTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = MerchantWareGateway.new(
login: 'login',
password: 'password',
name: 'name'
)
@credit_card = credit_card
@amount = 100
@options = {
order_id: '1',
billing_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/opp_test.rb | test/unit/gateways/opp_test.rb | require 'test_helper'
class OppTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = OppGateway.new(fixtures(:opp))
@amount = 100
@valid_card = credit_card('4200000000000000', month: 05, year: Date.today.year + 2, verification_value: '123')
@invalid_card = credit_card('444444444444444... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/pay_junction_v2_test.rb | test/unit/gateways/pay_junction_v2_test.rb | require 'test_helper'
class PayJunctionV2Test < Test::Unit::TestCase
def setup
@gateway = PayJunctionV2Gateway.new(api_login: 'api_login', api_password: 'api_password', api_key: 'api_key')
@amount = 99
@credit_card = credit_card('4444333322221111', month: 01, year: 2022, verification_value: 999)
@op... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/gateway_test.rb | test/unit/gateways/gateway_test.rb | require 'test_helper'
class GatewayTest < Test::Unit::TestCase
def setup
@gateway = Gateway.new
end
def teardown
Gateway.money_format = :dollars
end
def test_should_detect_if_a_card_is_supported
Gateway.supported_cardtypes = %i[visa bogus]
assert(%i[visa bogus].all? { |supported_cardtype| G... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/nab_transact_test.rb | test/unit/gateways/nab_transact_test.rb | require 'test_helper'
class NabTransactTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = NabTransactGateway.new(
login: 'login',
password: 'password'
)
@credit_card = credit_card
@amount = 200
@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/ixopay_test.rb | test/unit/gateways/ixopay_test.rb | require 'test_helper'
class IxopayTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = IxopayGateway.new(
username: 'username',
password: 'password',
secret: 'secret',
api_key: 'api_key'
)
@declined_card = credit_card('4000300011112220')
@credit_card = cred... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/multi_pay_test.rb | test/unit/gateways/multi_pay_test.rb | require 'test_helper'
class MultiPayTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = MultiPayGateway.new(
company: 'company123',
branch: 'branch456',
pos: 'pos123',
user: 'test_user',
password: 'test_password'
)
@credit_card = credit_card
@amount = 10... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/paypal_digital_goods_test.rb | test/unit/gateways/paypal_digital_goods_test.rb | require 'test_helper'
class PaypalDigitalGoodsTest < Test::Unit::TestCase
TEST_REDIRECT_URL = 'https://www.sandbox.paypal.com/incontext?cmd=_express-checkout&token=1234567890&useraction=commit'
MOBILE_TEST_REDIRECT_URL = 'https://www.sandbox.paypal.com/incontext?cmd=_express-checkout-mobile&token=12345678... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/trans_first_test.rb | test/unit/gateways/trans_first_test.rb | require 'test_helper'
class TransFirstTest < Test::Unit::TestCase
def setup
@gateway = TransFirstGateway.new(
login: 'LOGIN',
password: 'PASSWORD'
)
@credit_card = credit_card('4242424242424242')
@check = check
@options = {
billing_address: address
}
@amount = 100
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/orbital_test.rb | test/unit/gateways/orbital_test.rb | # encoding: utf-8
require 'test_helper'
require 'nokogiri'
class OrbitalGatewayTest < Test::Unit::TestCase
include CommStub
def setup
@schema_version = '9.5'
@gateway = ActiveMerchant::Billing::OrbitalGateway.new(
login: 'login',
password: 'password',
merchant_id: 'test12'
)
@cu... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | true |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/rapyd_test.rb | test/unit/gateways/rapyd_test.rb | require 'test_helper'
class RapydTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = RapydGateway.new(secret_key: 'secret_key', access_key: 'access_key')
@gateway_payment_redirect = RapydGateway.new(secret_key: 'secret_key', access_key: 'access_key', url_override: 'payment_redirect')
@cr... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | true |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/visanet_peru_test.rb | test/unit/gateways/visanet_peru_test.rb | require 'test_helper'
require 'timecop'
class VisanetPeruTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = VisanetPeruGateway.new(fixtures(:visanet_peru))
@amount = 100
@credit_card = credit_card('4500340090000016', verification_value: '377')
@declined_card = credit_card('41111111... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/cecabank_rest_json_test.rb | test/unit/gateways/cecabank_rest_json_test.rb | require 'test_helper'
class CecabankJsonTest < Test::Unit::TestCase
include CommStub
XID = 'some_xid'
def setup
@gateway = CecabankJsonGateway.new(
merchant_id: '12345678',
acquirer_bin: '12345678',
terminal_id: '00000003',
cypher_key: 'enc_key',
encryption_key: '0011223344556... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/credorax_test.rb | test/unit/gateways/credorax_test.rb | require 'test_helper'
class CredoraxTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = CredoraxGateway.new(merchant_id: 'login', cipher_key: 'password')
@credit_card = credit_card
@amount = 100
@options = {
billing_address: address,
description: 'Store Purchase'
}
... | 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_test.rb | test/unit/gateways/paypal_test.rb | require 'test_helper'
class PaypalTest < Test::Unit::TestCase
include CommStub
def setup
PaypalGateway.pem_file = nil
@amount = 100
@gateway = PaypalGateway.new(
login: 'cody',
password: 'test',
pem: 'PEM'
)
@credit_card = credit_card('4242424242424242')
@options = { bi... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | true |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/decidir_test.rb | test/unit/gateways/decidir_test.rb | require 'test_helper'
class DecidirTest < Test::Unit::TestCase
include CommStub
include ActiveMerchant::Billing::CreditCardFormatting
def setup
@gateway_for_purchase = DecidirGateway.new(api_key: 'api_key')
@gateway_for_auth = DecidirGateway.new(api_key: 'api_key', preauth_mode: true)
@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/versa_pay_test.rb | test/unit/gateways/versa_pay_test.rb | require 'test_helper'
class VersaPayTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = VersaPayGateway.new(fixtures(:versa_pay))
@credit_card = credit_card
@amount = 100
@options = {
email: 'test@gmail.com',
billing_address: address.merge(name: 'Cure Tester')
}
@... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | true |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/payu_in_test.rb | test/unit/gateways/payu_in_test.rb | require 'test_helper'
class PayuInTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = PayuInGateway.new(
key: 'key',
salt: 'salt'
)
@credit_card = credit_card
@options = {
order_id: '1'
}
end
def assert_parameter(parameter, expected_value, data, options =... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/payscout_test.rb | test/unit/gateways/payscout_test.rb | require 'test_helper'
class PayscoutTest < Test::Unit::TestCase
def setup
@gateway = PayscoutGateway.new(
username: 'xxx',
password: 'xxx'
)
@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/pro_pay_test.rb | test/unit/gateways/pro_pay_test.rb | require 'test_helper'
class ProPayTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = ProPayGateway.new(cert_str: 'certStr')
@credit_card = credit_card
@amount = 100
@options = {
order_id: '1',
billing_address: address,
description: 'Store Purchase'
}
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/gateways/cecabank_test.rb | test/unit/gateways/cecabank_test.rb | require 'test_helper'
class CecabankTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = CecabankXmlGateway.new(
merchant_id: '12345678',
acquirer_bin: '12345678',
terminal_id: '00000003',
cypher_key: 'enc_key'
)
@credit_card = credit_card
@amount = 100
@... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/element_test.rb | test/unit/gateways/element_test.rb | require 'test_helper'
class ElementTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = ElementGateway.new(account_id: '', account_token: '', application_id: '', acceptor_id: '', application_name: '', application_version: '')
@credit_card = credit_card
@check = check
@amount = 100
... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | true |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/first_pay_json_test.rb | test/unit/gateways/first_pay_json_test.rb | require 'test_helper'
class FirstPayJsonTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = FirstPayJsonGateway.new(
processor_id: 1234,
merchant_key: 'a91c38c3-7d7f-4d29-acc7-927b4dca0dbe'
)
@credit_card = credit_card
@google_pay = network_tokenization_credit_card(
... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/so_easy_pay_test.rb | test/unit/gateways/so_easy_pay_test.rb | require 'test_helper'
class SoEasyPayTest < Test::Unit::TestCase
def setup
@gateway = SoEasyPayGateway.new(
login: 'login',
password: 'password'
)
@credit_card = credit_card
@amount = 100
@options = {
order_id: '1',
billing_address: address,
description: 'Store Pur... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/ct_payment_test.rb | test/unit/gateways/ct_payment_test.rb | require 'test_helper'
class CtPaymentTest < Test::Unit::TestCase
def setup
@gateway = CtPaymentGateway.new(api_key: 'api_key', company_number: 'company number', merchant_number: 'merchant_number')
@credit_card = credit_card
@amount = 100
@options = {
order_id: '1',
billing_address: addre... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/ogone_test.rb | test/unit/gateways/ogone_test.rb | require 'test_helper'
class OgoneTest < Test::Unit::TestCase
def setup
@credentials = { login: 'pspid',
user: 'username',
password: 'password',
signature: 'mynicesig',
signature_encryptor: 'sha512',
timeout: ... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/blue_pay_test.rb | test/unit/gateways/blue_pay_test.rb | require 'test_helper'
RSP = {
approved_auth: 'AUTH_CODE=XCADZ&PAYMENT_ACCOUNT_MASK=xxxxxxxxxxxx4242&CARD_TYPE=VISA&TRANS_TYPE=AUTH&REBID=&STATUS=1&AVS=_&TRANS_ID=100134203758&CVV2=_&MESSAGE=Approved%20Auth',
approved_capture: 'AUTH_CODE=CHTHX&PAYMENT_ACCOUNT_MASK=xxxxxxxxxxxx4242&CARD_TYPE=VISA&TRANS_TYPE=CAPTURE&... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/money_movers_test.rb | test/unit/gateways/money_movers_test.rb | require 'test_helper'
class MoneyMoversTest < Test::Unit::TestCase
def setup
@gateway = MoneyMoversGateway.new(
login: 'demo',
password: 'password'
)
@credit_card = credit_card('4111111111111111')
@credit_card.verification_value = '999'
@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/braintree_blue_test.rb | test/unit/gateways/braintree_blue_test.rb | require 'test_helper'
class BraintreeBlueTest < Test::Unit::TestCase
def setup
@old_verbose, $VERBOSE = $VERBOSE, false
@gateway = BraintreeBlueGateway.new(
merchant_id: 'test',
public_key: 'test',
private_key: 'test',
test: true
)
@internal_gateway = @gateway.instance_varia... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | true |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/migs_test.rb | test/unit/gateways/migs_test.rb | require 'test_helper'
class MigsTest < Test::Unit::TestCase
def setup
@gateway = MigsGateway.new(
login: 'login',
password: 'password',
secure_hash: '76AF3392002D202A60D0AB5F9D81653C',
advanced_login: 'advlogin',
advanced_password: 'advpass'
)
@credit_card = credit_card
... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/telr_test.rb | test/unit/gateways/telr_test.rb | require 'test_helper'
class TelrTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = TelrGateway.new(
merchant_id: 'login',
api_key: 'password'
)
@credit_card = credit_card
@amount = 100
end
def test_successful_purchase
response = stub_comms do
@gateway.pur... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/allied_wallet_test.rb | test/unit/gateways/allied_wallet_test.rb | require 'test_helper'
class AlliedWalletTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = AlliedWalletGateway.new(
site_id: '1234',
merchant_id: '1234',
token: 'token'
)
@credit_card = credit_card
@amount = 100
end
def test_successful_purchase
response =... | 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_one_test.rb | test/unit/gateways/merchant_one_test.rb | require 'test_helper'
class MerchantOneTest < Test::Unit::TestCase
def setup
@gateway = MerchantOneGateway.new(fixtures(:merchant_one))
@credit_card = credit_card
@amount = 1000
@options = {
order_id: '1',
description: 'Store Purchase',
billing_address: {
name: 'Jim Smith',
... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/culqi_test.rb | test/unit/gateways/culqi_test.rb | require 'test_helper'
class CulqiTest < Test::Unit::TestCase
def setup
@gateway = CulqiGateway.new(merchant_id: 'merchant', terminal_id: 'terminal', secret_key: 'password')
@amount = 1000
@credit_card = credit_card('4111111111111111')
@options = {
order_id: generate_unique_id,
billing_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/payflow_express_uk_test.rb | test/unit/gateways/payflow_express_uk_test.rb | require 'test_helper'
class PayflowExpressUkTest < Test::Unit::TestCase
def setup
@gateway = PayflowExpressUkGateway.new(
login: 'LOGIN',
password: 'PASSWORD'
)
end
def test_supported_countries
assert_equal ['GB'], PayflowExpressUkGateway.supported_countries
end
def test_get_express... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/omise_test.rb | test/unit/gateways/omise_test.rb | require 'test_helper'
class OmiseTest < Test::Unit::TestCase
def setup
@gateway = OmiseGateway.new(
public_key: 'pkey_test_abc',
secret_key: 'skey_test_123'
)
@credit_card = credit_card
@amount = 3333
@options = {
order_id: '1',
billing_address: address,
descriptio... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/wirecard_test.rb | test/unit/gateways/wirecard_test.rb | # encoding: UTF-8
require 'test_helper'
class WirecardTest < Test::Unit::TestCase
include CommStub
TEST_AUTHORIZATION_GUWID = 'C822580121385121429927'
TEST_PURCHASE_GUWID = 'C865402121385575982910'
TEST_CAPTURE_GUWID = 'C833707121385268439116'
def setup
@gateway = WirecardGateway.new(login: '', passwo... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/openpay_test.rb | test/unit/gateways/openpay_test.rb | require 'test_helper'
class OpenpayTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = OpenpayGateway.new(
key: 'key',
merchant_id: 'merchant_id'
)
@credit_card = credit_card('4111111111111111')
@amount = 100
@refund_amount = 50
@options = {
order_id: '123... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/bogus_test.rb | test/unit/gateways/bogus_test.rb | require 'test_helper'
class BogusTest < Test::Unit::TestCase
CC_SUCCESS_PLACEHOLDER = '4444333322221111'
CC_FAILURE_PLACEHOLDER = '4444333311112222'
CHECK_SUCCESS_PLACEHOLDER = '111111111111'
CHECK_FAILURE_PLACEHOLDER = '222222222222'
def setup
@gateway = BogusGateway.new(
login: 'bogus',
pa... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/moka_test.rb | test/unit/gateways/moka_test.rb | require 'test_helper'
class MokaTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = MokaGateway.new(dealer_code: '123', username: 'username', password: 'password')
@credit_card = credit_card
@amount = 100
@options = {
description: 'Store Purchase'
}
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/ebanx_test.rb | test/unit/gateways/ebanx_test.rb | require 'test_helper'
class EbanxTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = EbanxGateway.new(integration_key: 'key')
@credit_card = credit_card
@amount = 100
@options = {
order_id: '1',
billing_address: address,
description: 'Store Purchase'
}
@ne... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/world_net_test.rb | test/unit/gateways/world_net_test.rb | require 'test_helper'
class WorldNetTest < Test::Unit::TestCase
def setup
@gateway = WorldNetGateway.new(terminal_id: '6001', secret: 'SOMECREDENTIAL')
@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/evo_ca_test.rb | test/unit/gateways/evo_ca_test.rb | require 'test_helper'
class EvoCaTest < Test::Unit::TestCase
def setup
@gateway = EvoCaGateway.new(username: 'demo', password: 'password')
@credit_card = credit_card
@amount = 100
@options = {
order_id: '1',
billing_address: address,
description: 'Store Purchase',
tracking_n... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/simetrik_test.rb | test/unit/gateways/simetrik_test.rb | require 'test_helper'
class SimetrikTest < Test::Unit::TestCase
def setup
@token_acquirer = 'ea890fd1-49f3-4a34-a150-192bf9a59205'
@datetime = Time.new.strftime('%Y-%m-%dT%H:%M:%S.%L%:z')
@gateway = SimetrikGateway.new(
client_id: 'client_id',
client_secret: 'client_secret_key',
audienc... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | true |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/skip_jack_test.rb | test/unit/gateways/skip_jack_test.rb | require 'test_helper'
class SkipJackTest < Test::Unit::TestCase
def setup
Base.mode = :test
@gateway = SkipJackGateway.new(login: 'X', password: 'Y')
@credit_card = credit_card('4242424242424242')
@billing_address = {
address1: '123 Any St.',
address2: 'Apt. B',
city: 'Anytown',
... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/vantiv_express_test.rb | test/unit/gateways/vantiv_express_test.rb | require 'test_helper'
class VantivExpressTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = VantivExpressGateway.new(fixtures(:element))
@credit_card = credit_card
@check = check
@amount = 100
@options = {
billing_address: address,
description: 'Store Purchase'
... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | true |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/authorize_net_cim_test.rb | test/unit/gateways/authorize_net_cim_test.rb | require 'test_helper'
class AuthorizeNetCimTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = AuthorizeNetCimGateway.new(
login: 'X',
password: 'Y'
)
@amount = 100
@credit_card = credit_card
@address = address
@customer_profile_id = '3187'
@customer_payment_p... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | true |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/sage_pay_test.rb | test/unit/gateways/sage_pay_test.rb | require 'test_helper'
class SagePayTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = SagePayGateway.new(login: 'X')
@credit_card = credit_card('4242424242424242', brand: 'visa')
@electron_credit_card = credit_card('4245190000000000', brand: 'visa')
@options = {
billing_addre... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/trexle_test.rb | test/unit/gateways/trexle_test.rb | require 'test_helper'
class TrexleTest < Test::Unit::TestCase
def setup
@gateway = TrexleGateway.new(api_key: 'THIS_IS_NOT_A_REAL_API_KEY')
@credit_card = credit_card
@amount = 100
@options = {
email: 'john@trexle.com',
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/fat_zebra_test.rb | test/unit/gateways/fat_zebra_test.rb | require 'test_helper'
class FatZebraTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = FatZebraGateway.new(
username: 'TEST',
token: 'TEST'
)
@credit_card = credit_card
@amount = 100
@options = {
order_id: rand(10000),
billing_address: address,
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/realex_test.rb | test/unit/gateways/realex_test.rb | require 'test_helper'
class RealexTest < Test::Unit::TestCase
include CommStub
class ActiveMerchant::Billing::RealexGateway
# For the purposes of testing, lets redefine some protected methods as public.
public :build_purchase_or_authorization_request
public :build_refund_request
public :build_void... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/borgun_test.rb | test/unit/gateways/borgun_test.rb | require 'test_helper'
class BorgunTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = BorgunGateway.new(
processor: '118',
merchant_id: '118',
username: 'dude',
password: 'secret'
)
@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/bridge_pay_test.rb | test/unit/gateways/bridge_pay_test.rb | require 'test_helper'
class BridgePayTest < Test::Unit::TestCase
include CommStub
def setup
Base.mode = :test
@gateway = BridgePayGateway.new(
user_name: 'login',
password: 'password'
)
@credit_card = credit_card
@check = check
@amount = 100
@options = {}
end
def tes... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/nuvei_test.rb | test/unit/gateways/nuvei_test.rb | require 'test_helper'
class NuveiTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = NuveiGateway.new(
merchant_id: 'SOMECREDENTIAL',
merchant_site_id: 'SOMECREDENTIAL',
secret_key: 'SOMECREDENTIAL',
session_token: 'fdda0126-674f-4f8c-ad24-31ac846654ab',
token_expir... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | true |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/axcessms_test.rb | test/unit/gateways/axcessms_test.rb | require 'test_helper'
class AxcessmsTest < Test::Unit::TestCase
include CommStub
TEST_AUTHORIZATION = '8a8294494830a3bb01483174f1827b9a'
TEST_PURCHASE = '8a82944a4830c4810148350aeeec5e58'
def setup
@gateway = AxcessmsGateway.new(fixtures(:axcessms))
@amount = 1500
@credit_card = credit_card('420... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/paymentez_test.rb | test/unit/gateways/paymentez_test.rb | require 'test_helper'
class PaymentezTest < Test::Unit::TestCase
include CommStub
def setup
@gateway = PaymentezGateway.new(application_code: 'foo', app_key: 'bar')
@credit_card = credit_card
@elo_credit_card = credit_card(
'6362970000457013',
month: 10,
year: 2020,
first_name:... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/unit/gateways/paypal/paypal_common_api_test.rb | test/unit/gateways/paypal/paypal_common_api_test.rb | require 'test_helper'
require 'active_merchant/billing/gateway'
require File.expand_path(File.dirname(__FILE__) + '/../../../../lib/active_merchant/billing/gateways/paypal/paypal_common_api')
require 'nokogiri'
class CommonPaypalGateway < ActiveMerchant::Billing::Gateway
include ActiveMerchant::Billing::PaypalCommon... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/generators/active_merchant_generator.rb | generators/active_merchant_generator.rb | require "thor/group"
class ActiveMerchantGenerator < Thor::Group
include Thor::Actions
argument :name
class_option :destroy, :type => :boolean, :desc => "Destroys rather than generates the gateway"
def initialize(*args)
super
rescue Thor::InvocationError
at_exit{print self.class.help(shell)}
ra... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/generators/gateway/gateway_generator.rb | generators/gateway/gateway_generator.rb | require "thor/group"
require "yaml"
class GatewayGenerator < ActiveMerchantGenerator
source_root File.expand_path("..", __FILE__)
def generate
template "templates/gateway.rb", gateway_file
template "templates/gateway_test.rb", gateway_test_file
template "templates/remote_gateway_test.rb", remote_gatew... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/generators/gateway/templates/gateway.rb | generators/gateway/templates/gateway.rb | module ActiveMerchant # :nodoc:
module Billing # :nodoc:
class <%= class_name %>Gateway < Gateway
self.test_url = 'https://example.com/test'
self.live_url = 'https://example.com/live'
self.supported_countries = ['US']
self.default_currency = 'USD'
self.supported_cardtypes = %i[visa ... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/generators/gateway/templates/remote_gateway_test.rb | generators/gateway/templates/remote_gateway_test.rb | require 'test_helper'
class Remote<%= class_name %>Test < Test::Unit::TestCase
def setup
@gateway = <%= class_name %>Gateway.new(fixtures(:<%= identifier %>))
@amount = 100
@credit_card = credit_card('4000100011112224')
@declined_card = credit_card('4000300011112220')
@options = {
billing_... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/generators/gateway/templates/gateway_test.rb | generators/gateway/templates/gateway_test.rb | require 'test_helper'
class <%= class_name %>Test < Test::Unit::TestCase
def setup
@gateway = <%= class_name %>Gateway.new(some_credential: 'login', another_credential: 'password')
@credit_card = credit_card
@amount = 100
@options = {
order_id: '1',
billing_address: address,
descri... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/lib/active_merchant.rb | lib/active_merchant.rb | #--
# Copyright (c) 2005-2010 Tobias Luetke
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publi... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/lib/activemerchant.rb | lib/activemerchant.rb | require 'active_merchant'
| ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/lib/support/outbound_hosts.rb | lib/support/outbound_hosts.rb | require 'uri'
require 'set'
class OutboundHosts
def self.list
hosts = Set.new
invalid_lines = Set.new
Dir['lib/**/*.rb'].each do |file|
content = File.read(file)
content.each_line do |line|
next if line =~ /homepage_url/
if line =~ /("|')(https:\/\/[^'"]*)("|')/
b... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/lib/support/gateway_support.rb | lib/support/gateway_support.rb | require 'rubygems'
require 'active_support'
require 'active_merchant'
class GatewaySupport # :nodoc:
ACTIONS = %i[purchase authorize capture void credit recurring]
include ActiveMerchant::Billing
attr_reader :gateways
def initialize
Dir[File.expand_path(File.dirname(__FILE__) + '/../active_merchant/bill... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/lib/support/ssl_version.rb | lib/support/ssl_version.rb | require 'active_merchant'
require 'support/gateway_support'
class SSLVersion
attr_accessor :success, :failed, :missing, :errored
def initialize
@gateways = GatewaySupport.new.gateways
@success, @failed, @missing, @errored = [], [], [], []
end
def test_gateways(min_version = :TLS1_1)
raise 'Requir... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/lib/support/ssl_verify.rb | lib/support/ssl_verify.rb | require 'active_merchant'
require 'support/gateway_support'
class SSLVerify
def initialize
@gateways = GatewaySupport.new.gateways
end
def test_gateways
success, failed, missing, errored, disabled = [], [], [], [], []
puts "Verifying #{@gateways.count} SSL certificates\n\n"
@gateways.each do |... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
activemerchant/active_merchant | https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/lib/active_merchant/network_connection_retries.rb | lib/active_merchant/network_connection_retries.rb | require 'openssl'
module ActiveMerchant
module NetworkConnectionRetries
DEFAULT_RETRIES = 3
DEFAULT_CONNECTION_ERRORS = {
EOFError => 'The remote server dropped the connection',
Errno::ECONNRESET => 'The remote server reset the connection',
Timeout::Error => 'The ... | ruby | MIT | ca45b1b063ce2e1495e1427e0a1d42dcb482d57d | 2026-01-04T15:45:54.027332Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.