Sha256: 97a7d8437773ecd7858b1d9cb05699011eedc4ad1944a070144e7f849f846334

Contents?: true

Size: 848 Bytes

Versions: 3

Compression:

Stored size: 848 Bytes

Contents

require 'test_helper'

module RubyPsigate
  class RemoteAccountTest < Test::Unit::TestCase
    
    def setup
      @gateway = RubyPsigate::Gateway.new(:cid => 1000001, :user_id => "teststore", :password => "testpass")
    end
    
    should "create a new billing account" do
      @account = RubyPsigate::Account.new
      @account.action = { :account => :register }
      
      @credit_card = RubyPsigate::CreditCard.new(
        :number => "4111111111111111",
        :month  => "12",
        :year   => "2011",
        :verification_value => "123",
        :name   => "Bob John"
      )
      
      @account.email = "bob@gmail.com"
      @account.cc = @credit_card
      # @account.address = valid_address
      
      @gateway.account = @account
      
      response = @gateway.commit!
      assert response.success?
    end
    
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ruby_psigate-0.7.2 test/remote/remote_account_test.rb
ruby_psigate-0.7.1 test/remote/remote_account_test.rb
ruby_psigate-0.7 test/remote/remote_account_test.rb