Sha256: 23f403ff893767a58e9b6fb49d3cd00a18ef75d05e65bff5cc84ebc002559b84

Contents?: true

Size: 1.05 KB

Versions: 14

Compression:

Stored size: 1.05 KB

Contents

FactoryGirl.define do
  factory :payment_transaction do

    order

    trait :splitable do
      transaction_gid "42826554YH061931A"
      success 't'
      operation 'purchased'
    end

    trait :paypalwp do
      transaction_gid "42826554YH061931A"
      success 't'
      operation 'purchased'
      amount 14237
    end

    trait :authorizedotnet do
      success 't'
      operation 'authorized'
      amount 11200
      transaction_gid "2172281042"
      params do
        { response_code: 1,
          response_reason_code: "1",
          response_reason_text: "This transaction has been approved.",
          avs_result_code: "Y",
          transaction_id: "2172281042",
          card_code: "P" }
      end
      metadata do
        { card_number: 'XXXX-XXXX-XXXX-0027', cardtype: 'visaa' }
      end
    end

    factory :payment_transaction_with_splitable,         traits: [ :splitable ]
    factory :payment_transaction_with_paypalwp,          traits: [ :paypalwp ]
    factory :payment_transaction_with_authorizedotnet,   traits: [ :authorizedotnet ]

  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
nimbleshop_core-0.0.7 test/factories/payment_transaction_factory.rb
nimbleshop_core-0.0.5 test/factories/payment_transaction_factory.rb
nimbleshop_core-0.0.4.beta1 test/factories/payment_transaction_factory.rb
nimbleshop_core-0.0.4 test/factories/payment_transaction_factory.rb
nimbleshop_core-0.0.3 test/factories/payment_transaction_factory.rb
nimbleshop_core-0.0.2 test/factories/payment_transaction_factory.rb
nimbleshop_core-0.0.2.beta1 test/factories/payment_transaction_factory.rb
nimbleshop_core-0.0.1 test/factories/payment_transaction_factory.rb
nimbleshop_core-0.0.1.rc6 test/factories/payment_transaction_factory.rb
nimbleshop_core-0.0.1.rc5 test/factories/payment_transaction_factory.rb
nimbleshop_core-0.0.1.rc4 test/factories/payment_transaction_factory.rb
nimbleshop_core-0.0.1.rc3 test/factories/payment_transaction_factory.rb
nimbleshop_core-0.0.1.rc2 test/factories/payment_transaction_factory.rb
nimbleshop_core-0.0.1.rc1 test/factories/payment_transaction_factory.rb