Sha256: 8740a639e311e07bfaaf77e8f04beb5741945e0ab25c5c52cbf1edebbab89c63

Contents?: true

Size: 634 Bytes

Versions: 16

Compression:

Stored size: 634 Bytes

Contents

module Spreedly

  module CreationHelper

    def create_card_on(environment, options = {})
      deets = default_card_deets.merge(options)
      environment.add_credit_card(deets).payment_method
    end

    def create_failed_card_on(environment, options = {})
      deets = default_card_deets.merge(number: '4012888888881881').merge(options)
      environment.add_credit_card(deets).payment_method
    end


    private
    def default_card_deets
      {
        email: 'perrin@wot.com', number: '5555555555554444', month: 1, year: 2019,
        last_name: 'Aybara', first_name: 'Perrin', retained: true
      }
    end
  end

end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
spreedly-2.0.16 test/helpers/creation_helper.rb
spreedly-2.0.15 test/helpers/creation_helper.rb
spreedly-2.0.14 test/helpers/creation_helper.rb
spreedly-2.0.13 test/helpers/creation_helper.rb
spreedly-2.0.11 test/helpers/creation_helper.rb
spreedly-2.0.10 test/helpers/creation_helper.rb
spreedly-2.0.9 test/helpers/creation_helper.rb
spreedly-2.0.8 test/helpers/creation_helper.rb
spreedly-2.0.7 test/helpers/creation_helper.rb
spreedly-2.0.6 test/helpers/creation_helper.rb
spreedly-2.0.5 test/helpers/creation_helper.rb
spreedly-2.0.4 test/helpers/creation_helper.rb
spreedly-2.0.3 test/helpers/creation_helper.rb
spreedly-2.0.2 test/helpers/creation_helper.rb
spreedly-2.0.1 test/helpers/creation_helper.rb
spreedly-2.0.0 test/helpers/creation_helper.rb