lolita-paypal 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +17 -0
- data/Rakefile +12 -0
- data/app/controllers/lolita_paypal/application_controller.rb +5 -0
- data/app/controllers/lolita_paypal/transactions_controller.rb +74 -0
- data/app/helpers/lolita_paypal/application_helper.rb +15 -0
- data/app/models/lolita_paypal/transaction.rb +49 -0
- data/app/views/lolita_paypal/payment_form.html.erb +16 -0
- data/config/locales/en.yml +3 -0
- data/config/locales/lv.yml +3 -0
- data/config/routes.rb +5 -0
- data/lib/generators/lolita_paypal/USAGE +4 -0
- data/lib/generators/lolita_paypal/lolita_paypal_generator.rb +12 -0
- data/lib/generators/lolita_paypal/templates/paypal_transactions.erb +17 -0
- data/lib/lolita-paypal/billing.rb +74 -0
- data/lib/lolita-paypal/custom_logger.rb +8 -0
- data/lib/lolita-paypal/engine.rb +9 -0
- data/lib/lolita-paypal/request.rb +42 -0
- data/lib/lolita-paypal/version.rb +3 -0
- data/lib/lolita-paypal.rb +47 -0
- metadata +195 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 09da372aaf3d0b64e4a10fd10afe861747fe7cdb
|
4
|
+
data.tar.gz: 8e41057f08152f4ca1b85027f1392ac97c46d26d
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 6f9fed96e82014183fca3425ad51dd5855d5991ec844081bb375832e2707545e9f0ef58b98ebcbbe6f244f42a9f6b5ab87fdb6ae1b73aa566f9b47d9e76fcd4a
|
7
|
+
data.tar.gz: cdfcfcb5b5e2a2afc027d19d832491e8fca3f742a82d2f7de480efa39549b744b7546dc89667bb43d2c79c73cfbd447fe08ad2655c5566730a73c9f789ef8701
|
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright 2014 YOURNAME
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
# LolitaPaypal
|
2
|
+
|
3
|
+
Paypal plugin for Lolita
|
4
|
+
|
5
|
+
## Usage
|
6
|
+
|
7
|
+
Add to your Gemfile `gem "lolita-paypal"`
|
8
|
+
|
9
|
+
Then run generator `rails g lolita_paypal`
|
10
|
+
|
11
|
+
To setup your paymentable object see `spec/dummy/app/models/reservation.rb`
|
12
|
+
|
13
|
+
## ENV variables
|
14
|
+
|
15
|
+
PAYPAL_CERT_PEM: ~/production/shared/config/paypal_cert.pem"
|
16
|
+
PAYPAL_APP_CERT_PEM: ~/production/shared/config/my-pubcert.pem"
|
17
|
+
PAYPAL_APP_KEY_PEM: ~/production/shared/config/my-key.pem
|
data/Rakefile
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
begin
|
3
|
+
require "bundler/setup"
|
4
|
+
rescue LoadError
|
5
|
+
puts "You must `gem install bundler` and `bundle install` to run rake tasks"
|
6
|
+
end
|
7
|
+
|
8
|
+
require "rspec/core/rake_task"
|
9
|
+
RSpec::Core::RakeTask.new(:spec)
|
10
|
+
|
11
|
+
task :default => :spec
|
12
|
+
Bundler::GemHelper.install_tasks
|
@@ -0,0 +1,74 @@
|
|
1
|
+
module LolitaPaypal
|
2
|
+
class TransactionsController < LolitaPaypal::ApplicationController
|
3
|
+
protect_from_forgery except: :answer
|
4
|
+
before_filter :is_ssl_required
|
5
|
+
before_filter :set_active_payment, :check_valid_payment, only: :checkout
|
6
|
+
|
7
|
+
include ActiveMerchant::Billing::Integrations
|
8
|
+
|
9
|
+
# renders form with encrypted data and redirects to Paypal web interface
|
10
|
+
def checkout
|
11
|
+
@payment_request = LolitaPaypal::Request.new(@payment)
|
12
|
+
render 'lolita_paypal/payment_form'
|
13
|
+
ensure
|
14
|
+
LolitaPaypal.logger.info("[#{session_id}][#{@payment.id}][checkout]")
|
15
|
+
end
|
16
|
+
|
17
|
+
# process ipn request
|
18
|
+
# POST is sent from paypal and will create transaction
|
19
|
+
# GET is a redirect from paypal and will redirect back to return_path
|
20
|
+
def answer
|
21
|
+
if request.post?
|
22
|
+
if ipn_notify.acknowledge
|
23
|
+
LolitaPaypal::Transaction.create_transaction(ipn_notify, payment_from_ipn, request)
|
24
|
+
end
|
25
|
+
render nothing: true
|
26
|
+
else
|
27
|
+
if payment_from_ipn
|
28
|
+
redirect_to payment_from_ipn.paypal_return_path
|
29
|
+
else
|
30
|
+
render text: I18n.t('lolita_paypal.wrong_request'), status: 400
|
31
|
+
end
|
32
|
+
end
|
33
|
+
ensure
|
34
|
+
LolitaPaypal.logger.info("[#{session_id}][#{payment_from_ipn && payment_from_ipn.id}][answer] #{params}")
|
35
|
+
end
|
36
|
+
|
37
|
+
private
|
38
|
+
|
39
|
+
def ipn_notify
|
40
|
+
@ipn_notify ||= Paypal::Notification.new(request.raw_post)
|
41
|
+
end
|
42
|
+
|
43
|
+
def payment_from_ipn
|
44
|
+
if subject = params['custom'] || params['cm']
|
45
|
+
klass, id = subject.split('___')
|
46
|
+
payment = klass.constantize.find(id)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
# returns current payment instance from session
|
51
|
+
def set_active_payment
|
52
|
+
@payment ||= session[:payment_data][:billing_class].constantize.find(session[:payment_data][:billing_id])
|
53
|
+
rescue
|
54
|
+
render text: I18n.t('lolita_paypal.wrong_request'), status: 400
|
55
|
+
end
|
56
|
+
|
57
|
+
# payment should not be paid
|
58
|
+
def check_valid_payment
|
59
|
+
if @payment.paid?
|
60
|
+
render text: I18n.t('lolita_paypal.wrong_request'), status: 400
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
# forces SSL in production mode if availab:le
|
65
|
+
def is_ssl_required
|
66
|
+
ssl_required(:answer, :checkout) if defined?(ssl_required)
|
67
|
+
end
|
68
|
+
|
69
|
+
|
70
|
+
def session_id
|
71
|
+
request.session_options[:id]
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module LolitaPaypal
|
2
|
+
module ApplicationHelper
|
3
|
+
include Rails.application.routes.url_helpers
|
4
|
+
|
5
|
+
# returns encrypted request variables
|
6
|
+
def encrypt_request(payment_request)
|
7
|
+
variables = payment_request.request_variables.reverse_merge({
|
8
|
+
'notify_url'=> answer_paypal_url(protocol: 'https')
|
9
|
+
})
|
10
|
+
LolitaPaypal::Request.encrypt_for_paypal variables
|
11
|
+
ensure
|
12
|
+
LolitaPaypal.logger.info "[#{payment_request.payment_id}] #{variables}"
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
require "ipaddr"
|
2
|
+
# Available statuses
|
3
|
+
# -----------------
|
4
|
+
# Canceled-Reversal
|
5
|
+
# Completed
|
6
|
+
# Denied
|
7
|
+
# Expired
|
8
|
+
# Failed
|
9
|
+
# In-Progress
|
10
|
+
# Partially-Refunded
|
11
|
+
# Pending
|
12
|
+
# Processed
|
13
|
+
# Refunded
|
14
|
+
# Reversed
|
15
|
+
# Voided
|
16
|
+
module LolitaPaypal
|
17
|
+
class Transaction < ActiveRecord::Base
|
18
|
+
self.table_name = "paypal_transactions"
|
19
|
+
belongs_to :paymentable, polymorphic: true
|
20
|
+
after_save :touch_paymentable
|
21
|
+
default_scope -> { order(:id) }
|
22
|
+
validates_associated :paymentable
|
23
|
+
|
24
|
+
def ip
|
25
|
+
IPAddr.new(self[:ip], Socket::AF_INET).to_s
|
26
|
+
end
|
27
|
+
|
28
|
+
def ip=(x)
|
29
|
+
self[:ip] = IPAddr.new(x).to_i
|
30
|
+
end
|
31
|
+
|
32
|
+
# add new transaction after IPN response
|
33
|
+
def self.create_transaction notify, payment, request
|
34
|
+
self.create!(
|
35
|
+
transaction_id: notify.transaction_id,
|
36
|
+
status: notify.status,
|
37
|
+
paymentable: payment,
|
38
|
+
ip: request.remote_ip
|
39
|
+
)
|
40
|
+
end
|
41
|
+
|
42
|
+
private
|
43
|
+
|
44
|
+
# trigger "paypal_trx_saved" on our paymentable model
|
45
|
+
def touch_paymentable
|
46
|
+
paymentable.paypal_trx_saved(self)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<title>Paypal payment</title>
|
5
|
+
</head>
|
6
|
+
<body>
|
7
|
+
<form method="POST" name="paypal_form" action="<%= ActiveMerchant::Billing::Integrations::Paypal.service_url %>">
|
8
|
+
<input type="hidden" name="cmd" value="_s-xclick" />
|
9
|
+
<input type="hidden" name="encrypted" value="<%= encrypt_request(@payment_request) %>" />
|
10
|
+
<button type="submit" id="submit_button" name="submit" style="display:none;"></button>
|
11
|
+
</form>
|
12
|
+
<script type="text/javascript">
|
13
|
+
document.getElementById("submit_button").click();
|
14
|
+
</script>
|
15
|
+
</body>
|
16
|
+
</html>
|
data/config/routes.rb
ADDED
@@ -0,0 +1,5 @@
|
|
1
|
+
Rails.application.routes.draw do
|
2
|
+
get "/paypal/checkout" => "lolita_paypal/transactions#checkout", as: "checkout_paypal"
|
3
|
+
get "/paypal/answer" => "lolita_paypal/transactions#answer", as: "answer_paypal"
|
4
|
+
post "/paypal/answer" => "lolita_paypal/transactions#answer"
|
5
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
class LolitaPaypalGenerator < Rails::Generator::Base
|
2
|
+
def initialize(runtime_args, runtime_options = {})
|
3
|
+
super
|
4
|
+
usage if @args.first == "help"
|
5
|
+
end
|
6
|
+
|
7
|
+
def manifest
|
8
|
+
record do |m|
|
9
|
+
m.migration_template "paypal_transactions.erb", "db/migrate", :migration_file_name => "create_paypal_transactions"
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
class CreatePaypalTransactions < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :paypal_transactions do |t|
|
4
|
+
t.string :transaction_id
|
5
|
+
t.string :status
|
6
|
+
t.references :paymentable, polymorphic: true
|
7
|
+
t.string :ip
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
add_index :paypal_transactions, :status
|
11
|
+
add_index :paypal_transactions, [:paymentable_type, :paymentable_id]
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.down
|
15
|
+
drop_table :paypal_transactions
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,74 @@
|
|
1
|
+
module LolitaPaypal
|
2
|
+
module Billing
|
3
|
+
def self.included(base)
|
4
|
+
base.has_many :paypal_transactions, as: :paymentable, class_name: 'LolitaPaypal::Transaction', dependent: :destroy
|
5
|
+
base.class_eval do
|
6
|
+
|
7
|
+
# Payment description
|
8
|
+
def description
|
9
|
+
raise 'Redefine this method in your billing model.'
|
10
|
+
end
|
11
|
+
|
12
|
+
# Price of payment in cents
|
13
|
+
def price
|
14
|
+
raise 'Redefine this method in your billing model.'
|
15
|
+
end
|
16
|
+
|
17
|
+
# Currency as 3 letter code as in ISO 4217
|
18
|
+
def currency
|
19
|
+
raise 'Redefine this method in your billing model.'
|
20
|
+
end
|
21
|
+
|
22
|
+
def paypal_trx_saved trx
|
23
|
+
raise 'Redefine this method in your billing model.'
|
24
|
+
end
|
25
|
+
|
26
|
+
# Paypal will redirect to this path after payment
|
27
|
+
def paypal_return_path
|
28
|
+
raise 'Redefine this method in your billing model.'
|
29
|
+
end
|
30
|
+
|
31
|
+
# To pass any extra parameter to paypal, redefine 'paypal_request_variables'
|
32
|
+
# with any of these keys. Keys business, item_name, amount, currency_code - already are added.
|
33
|
+
#+---------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
34
|
+
#| business | Email address on your PayPal account |
|
35
|
+
#| quantity | Number of items. This will multiply the amount if greater than one |
|
36
|
+
#| item_name | Name of the item (or a name for the shopping cart). Must be alpha-numeric, with a 127character limit |
|
37
|
+
#| item_number | Optional pass-through variable for you to track payments. Must be alpha-numeric, with a 127 character limit |
|
38
|
+
#| amount | Price of the item (the total price of all items in the shopping cart) |
|
39
|
+
#| shipping | The cost of shipping the item |
|
40
|
+
#| shipping2 | The cost of shipping each additional item |
|
41
|
+
#| handling | The cost of handling |
|
42
|
+
#| tax | Transaction-based tax value. If present, the value passed here will override any profile tax settings you may have (regardless of the buyer's location). |
|
43
|
+
#| no_shipping | Shipping address. If set to "1," your customer will not be asked for a shipping address. This is optional; if omitted or set to "0," your customer will be prompted to include a shipping address |
|
44
|
+
#| cn | Optional label that will appear above the note field (maximum 40 characters) |
|
45
|
+
#| no_note | Including a note with payment. If set to "1," your customer will not be prompted to include a note. This is optional; if omitted or set to "0," your customer will be prompted to include a note. |
|
46
|
+
#| on0 | First option field name. 64 character limit |
|
47
|
+
#| os0 | First set of option value(s). 200 character limit. "on0" must be defined for "os0" to be recognized. |
|
48
|
+
#| on1 | Second option field name. 64 character limit |
|
49
|
+
#| os1 | Second set of option value(s). 200 character limit. "on1" must be defined for "os1" to be recognized. |
|
50
|
+
#| custom | Optional pass-through variable that will never be presented to your customer. Can be used to track inventory |
|
51
|
+
#| invoice | Optional pass-through variable that will never be presented to your customer. Can be used to track invoice numbers |
|
52
|
+
#| notify_url | Only used with IPN. An internet URL where IPN form posts will be sent |
|
53
|
+
#| return | An internet URL where your customer will be returned after completing payment |
|
54
|
+
#| cancel_return | An internet URL where your customer will be returned after cancelling payment |
|
55
|
+
#| image_url | The internet URL of the 150 X 50 pixel image you would like to use as your logo |
|
56
|
+
#| cs | Sets the background color of your payment pages. If set to "1," the background color will be black. This is optional; if omitted or set to "0," the background color will be white |
|
57
|
+
#+---------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
58
|
+
# more info at https://www.paypal.com/cgi-bin/webscr?cmd=p/pdn/howto_checkout-outside
|
59
|
+
def paypal_request_variables
|
60
|
+
{}
|
61
|
+
end
|
62
|
+
|
63
|
+
# Add this to your paid? method along with other payment methods
|
64
|
+
# Example:
|
65
|
+
# def paid?
|
66
|
+
# paypal_paid? || first_data_paid?
|
67
|
+
# end
|
68
|
+
def paypal_paid?
|
69
|
+
self.paypal_transactions.where(status: 'Completed').count >= 1
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
module LolitaPaypal
|
2
|
+
|
3
|
+
class Request
|
4
|
+
attr_reader :payment
|
5
|
+
|
6
|
+
def initialize(payment = nil)
|
7
|
+
@payment = payment
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.encrypt_for_paypal(values)
|
11
|
+
signed = OpenSSL::PKCS7::sign(OpenSSL::X509::Certificate.new(LolitaPaypal.app_cert_pem), OpenSSL::PKey::RSA.new(LolitaPaypal.app_key_pem, ''), values.map { |k, v| "#{k}=#{v}" }.join("\n"), [], OpenSSL::PKCS7::BINARY)
|
12
|
+
OpenSSL::PKCS7::encrypt([OpenSSL::X509::Certificate.new(LolitaPaypal.paypal_cert_pem)], signed.to_der, OpenSSL::Cipher::Cipher::new('DES3'), OpenSSL::PKCS7::BINARY).to_s.gsub("\n", "")
|
13
|
+
end
|
14
|
+
|
15
|
+
def amount(money)
|
16
|
+
cents = money.respond_to?(:cents) ? money.cents : money
|
17
|
+
if money.nil? || cents.to_i <= 0
|
18
|
+
raise ArgumentError, 'money amount must be either a Money object or a positive integer in cents.'
|
19
|
+
end
|
20
|
+
sprintf("%.2f", cents.to_f / 100)
|
21
|
+
end
|
22
|
+
|
23
|
+
def payment_id
|
24
|
+
payment.id
|
25
|
+
end
|
26
|
+
|
27
|
+
def request_variables
|
28
|
+
{
|
29
|
+
'cert_id' => LolitaPaypal.cert_id,
|
30
|
+
'cmd' => '_xclick',
|
31
|
+
'business' => LolitaPaypal.account_name,
|
32
|
+
'item_name' => payment.description,
|
33
|
+
'custom' =>"#{payment.class}___#{payment_id}",
|
34
|
+
'amount' => amount(payment.price),
|
35
|
+
'currency_code' => payment.currency,
|
36
|
+
'no_note' => '1',
|
37
|
+
'no_shipping' => '1',
|
38
|
+
'return' => payment.paypal_return_path
|
39
|
+
}.merge(payment.paypal_request_variables)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
require 'digest/md5'
|
2
|
+
require 'openssl'
|
3
|
+
require 'activemerchant'
|
4
|
+
require 'lolita-paypal/custom_logger'
|
5
|
+
require 'lolita-paypal/request'
|
6
|
+
require 'lolita-paypal/engine'
|
7
|
+
require 'lolita-paypal/version'
|
8
|
+
require 'lolita-paypal/billing'
|
9
|
+
|
10
|
+
module LolitaPaypal
|
11
|
+
mattr_accessor :custom_logger
|
12
|
+
|
13
|
+
def self.cert_id
|
14
|
+
@cert_id ||= ENV['PAYPAL_CERT_ID']
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.account_name
|
18
|
+
@account_name ||= ENV['PAYPAL_ACCOUNT_NAME']
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.paypal_cert_pem
|
22
|
+
@paypal_cert_pem ||= File.read ENV['PAYPAL_CERT_PEM']
|
23
|
+
end
|
24
|
+
|
25
|
+
def self.app_cert_pem
|
26
|
+
@app_cert_pem ||= File.read ENV['PAYPAL_APP_CERT_PEM']
|
27
|
+
end
|
28
|
+
|
29
|
+
def self.app_key_pem
|
30
|
+
@app_key_pem ||= File.read ENV['PAYPAL_APP_KEY_PEM']
|
31
|
+
end
|
32
|
+
|
33
|
+
def self.logger
|
34
|
+
unless @logger
|
35
|
+
@logger = custom_logger ? custom_logger : default_logger
|
36
|
+
end
|
37
|
+
@logger
|
38
|
+
end
|
39
|
+
|
40
|
+
protected
|
41
|
+
|
42
|
+
def self.default_logger
|
43
|
+
logger = Logger.new(Rails.root.join('log', 'lolita_paypal.log'))
|
44
|
+
logger.formatter = LolitaPaypal::LogFormatter.new
|
45
|
+
logger
|
46
|
+
end
|
47
|
+
end
|
metadata
ADDED
@@ -0,0 +1,195 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: lolita-paypal
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- ITHouse
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-04-02 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rails
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 3.2.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 3.2.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: activemerchant
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.6'
|
34
|
+
- - "<"
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: '2.0'
|
37
|
+
type: :runtime
|
38
|
+
prerelease: false
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '1.6'
|
44
|
+
- - "<"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '2.0'
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: sqlite3
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - "~>"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '1.3'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - "~>"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '1.3'
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: rspec-rails
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - "~>"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: 2.14.0
|
68
|
+
type: :development
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - "~>"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: 2.14.0
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: webmock
|
77
|
+
requirement: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - "~>"
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '1'
|
82
|
+
type: :development
|
83
|
+
prerelease: false
|
84
|
+
version_requirements: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - "~>"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '1'
|
89
|
+
- !ruby/object:Gem::Dependency
|
90
|
+
name: fabrication
|
91
|
+
requirement: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - "~>"
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '2.1'
|
96
|
+
type: :development
|
97
|
+
prerelease: false
|
98
|
+
version_requirements: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - "~>"
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '2.1'
|
103
|
+
- !ruby/object:Gem::Dependency
|
104
|
+
name: database_cleaner
|
105
|
+
requirement: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - "~>"
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: 1.2.0
|
110
|
+
type: :development
|
111
|
+
prerelease: false
|
112
|
+
version_requirements: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - "~>"
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: 1.2.0
|
117
|
+
- !ruby/object:Gem::Dependency
|
118
|
+
name: simplecov
|
119
|
+
requirement: !ruby/object:Gem::Requirement
|
120
|
+
requirements:
|
121
|
+
- - "~>"
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: 0.8.2
|
124
|
+
type: :development
|
125
|
+
prerelease: false
|
126
|
+
version_requirements: !ruby/object:Gem::Requirement
|
127
|
+
requirements:
|
128
|
+
- - "~>"
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: 0.8.2
|
131
|
+
- !ruby/object:Gem::Dependency
|
132
|
+
name: pry-byebug
|
133
|
+
requirement: !ruby/object:Gem::Requirement
|
134
|
+
requirements:
|
135
|
+
- - "~>"
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
version: 1.3.1
|
138
|
+
type: :development
|
139
|
+
prerelease: false
|
140
|
+
version_requirements: !ruby/object:Gem::Requirement
|
141
|
+
requirements:
|
142
|
+
- - "~>"
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: 1.3.1
|
145
|
+
description: Paypal payment plugin using ActiveMerchant for use with Lolita CMS
|
146
|
+
email:
|
147
|
+
- info@ithouse.lv
|
148
|
+
executables: []
|
149
|
+
extensions: []
|
150
|
+
extra_rdoc_files: []
|
151
|
+
files:
|
152
|
+
- MIT-LICENSE
|
153
|
+
- README.md
|
154
|
+
- Rakefile
|
155
|
+
- app/controllers/lolita_paypal/application_controller.rb
|
156
|
+
- app/controllers/lolita_paypal/transactions_controller.rb
|
157
|
+
- app/helpers/lolita_paypal/application_helper.rb
|
158
|
+
- app/models/lolita_paypal/transaction.rb
|
159
|
+
- app/views/lolita_paypal/payment_form.html.erb
|
160
|
+
- config/locales/en.yml
|
161
|
+
- config/locales/lv.yml
|
162
|
+
- config/routes.rb
|
163
|
+
- lib/generators/lolita_paypal/USAGE
|
164
|
+
- lib/generators/lolita_paypal/lolita_paypal_generator.rb
|
165
|
+
- lib/generators/lolita_paypal/templates/paypal_transactions.erb
|
166
|
+
- lib/lolita-paypal.rb
|
167
|
+
- lib/lolita-paypal/billing.rb
|
168
|
+
- lib/lolita-paypal/custom_logger.rb
|
169
|
+
- lib/lolita-paypal/engine.rb
|
170
|
+
- lib/lolita-paypal/request.rb
|
171
|
+
- lib/lolita-paypal/version.rb
|
172
|
+
homepage: http://github.com/ithouse/lolita-paypal
|
173
|
+
licenses: []
|
174
|
+
metadata: {}
|
175
|
+
post_install_message:
|
176
|
+
rdoc_options: []
|
177
|
+
require_paths:
|
178
|
+
- lib
|
179
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
180
|
+
requirements:
|
181
|
+
- - ">="
|
182
|
+
- !ruby/object:Gem::Version
|
183
|
+
version: '0'
|
184
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
185
|
+
requirements:
|
186
|
+
- - ">="
|
187
|
+
- !ruby/object:Gem::Version
|
188
|
+
version: '0'
|
189
|
+
requirements: []
|
190
|
+
rubyforge_project:
|
191
|
+
rubygems_version: 2.2.0
|
192
|
+
signing_key:
|
193
|
+
specification_version: 4
|
194
|
+
summary: Paypal payment plugin for Lolita
|
195
|
+
test_files: []
|