diff --git a/app/models/paypal_txn.rb b/app/models/paypal_txn.rb deleted file mode 100644 index 9e33bd6..0000000 --- a/app/models/paypal_txn.rb +++ /dev/null @@ -1,7 +0,0 @@ -class PaypalTxn < Transaction - enumerable_constant :txn_type, :constants => [:authorize, :capture, :purchase, :void, :credit, :denied, :unknown] - - def txn_type_name - TxnType.from_value(txn_type) - end -end diff --git a/db/migrate/20100224181116_make_paypal_txn_sti.rb b/db/migrate/20100224181116_make_paypal_txn_sti.rb deleted file mode 100644 index 929df28..0000000 --- a/db/migrate/20100224181116_make_paypal_txn_sti.rb +++ /dev/null @@ -1,26 +0,0 @@ -class MakePaypalTxnSti < ActiveRecord::Migration - def self.up - add_column :transactions, :payment_status, :string - add_column :transactions, :message, :string - add_column :transactions, :pending_reason, :string - add_column :transactions, :transaction_id, :string - add_column :transactions, :transaction_type, :string - add_column :transactions, :payment_type, :string - add_column :transactions, :token, :string - - #to-do migrate existing ppx_txns - - drop_table :paypal_txns - - end - - def self.down - remove_column :transactions, :payment_status - remove_column :transactions, :message - remove_column :transactions, :pending_reason - remove_column :transactions, :transaction_id - remove_column :transactions, :transaction_type - remove_column :transactions, :payment_type - remove_column :transactions, :token - end -end \ No newline at end of file diff --git a/lib/tasks/paypal_express_extension_tasks.rake b/lib/tasks/paypal_express_extension_tasks.rake deleted file mode 100644 index 28624e9..0000000 --- a/lib/tasks/paypal_express_extension_tasks.rake +++ /dev/null @@ -1,28 +0,0 @@ -namespace :db do - desc "Bootstrap your database for Spree." - task :bootstrap => :environment do - # load initial database fixtures (in db/sample/*.yml) into the current environment's database - ActiveRecord::Base.establish_connection(RAILS_ENV.to_sym) - Dir.glob(File.join(PaypalExpressExtension.root, "db", 'sample', '*.{yml,csv}')).each do |fixture_file| - Fixtures.create_fixtures("#{PaypalExpressExtension.root}/db/sample", File.basename(fixture_file, '.*')) - end - end -end - -namespace :spree do - namespace :extensions do - namespace :paypal_express do - desc "Copies public assets of the Paypal Express to the instance public/ directory." - task :update => :environment do - is_svn_git_or_dir = proc {|path| path =~ /\.svn/ || path =~ /\.git/ || File.directory?(path) } - Dir[PaypalExpressExtension.root + "/public/**/*"].reject(&is_svn_git_or_dir).each do |file| - path = file.sub(PaypalExpressExtension.root, '') - directory = File.dirname(path) - puts "Copying #{path}..." - mkdir_p RAILS_ROOT + directory - cp file, RAILS_ROOT + path - end - end - end - end -end \ No newline at end of file diff --git a/paypal_express_extension.rb b/paypal_express_extension.rb deleted file mode 100644 index 177c231..0000000 --- a/paypal_express_extension.rb +++ /dev/null @@ -1,24 +0,0 @@ -# Uncomment this if you reference any of your controllers in activate -# require_dependency 'application' - -class PaypalExpressExtension < Spree::Extension - version "1.0" - description "Describe your extension here" - url "http://yourwebsite.com/paypal_express" - - def activate - BillingIntegration::PaypalExpress.register - BillingIntegration::PaypalExpressUk.register - - # Load up over-rides for ActiveMerchant files - # these will be submitted to ActiveMerchant some time... - require File.join(PaypalExpressExtension.root, "lib", "active_merchant", "billing", "gateways", "paypal", "paypal_common_api.rb") - require File.join(PaypalExpressExtension.root, "lib", "active_merchant", "billing", "gateways", "paypal_express_uk.rb") - - # inject paypal code into orders controller - CheckoutsController.class_eval do - include Spree::PaypalExpress - end - - end -end