Removed unecessary files.
This commit is contained in:
parent
b79fb41c4d
commit
5a03bf228e
|
@ -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
|
|
|
@ -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
|
|
|
@ -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
|
|
|
@ -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
|
|
Loading…
Reference in New Issue