killbill-paypal-express 1.0.15 → 1.0.16
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/db/ddl.sql +6 -2
- data/db/schema.rb +8 -1
- data/lib/paypal_express/models/paypal_express_payment_method.rb +17 -0
- data/pom.xml +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.16
|
data/db/ddl.sql
CHANGED
@@ -8,7 +8,9 @@ CREATE TABLE `paypal_express_payment_methods` (
|
|
8
8
|
`is_deleted` tinyint(1) NOT NULL DEFAULT '0',
|
9
9
|
`created_at` datetime NOT NULL,
|
10
10
|
`updated_at` datetime NOT NULL,
|
11
|
-
PRIMARY KEY (`id`)
|
11
|
+
PRIMARY KEY (`id`),
|
12
|
+
KEY `index_paypal_express_payment_methods_on_kb_account_id` (`kb_account_id`),
|
13
|
+
KEY `index_paypal_express_payment_methods_on_kb_payment_method_id` (`kb_payment_method_id`)
|
12
14
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
13
15
|
|
14
16
|
CREATE TABLE `paypal_express_transactions` (
|
@@ -20,7 +22,8 @@ CREATE TABLE `paypal_express_transactions` (
|
|
20
22
|
`amount_in_cents` int(11) NOT NULL,
|
21
23
|
`created_at` datetime NOT NULL,
|
22
24
|
`updated_at` datetime NOT NULL,
|
23
|
-
PRIMARY KEY (`id`)
|
25
|
+
PRIMARY KEY (`id`),
|
26
|
+
KEY `index_paypal_express_transactions_on_kb_payment_id` (`kb_payment_id`)
|
24
27
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
25
28
|
|
26
29
|
CREATE TABLE `paypal_express_responses` (
|
@@ -80,4 +83,5 @@ CREATE TABLE `paypal_express_responses` (
|
|
80
83
|
`created_at` datetime NOT NULL,
|
81
84
|
`updated_at` datetime NOT NULL,
|
82
85
|
PRIMARY KEY (`id`)
|
86
|
+
KEY `index_paypal_express_responses_on_token_and_api_call` (`token`, `api_call`)
|
83
87
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
data/db/schema.rb
CHANGED
@@ -12,6 +12,9 @@ ActiveRecord::Schema.define(:version => 20130311153635) do
|
|
12
12
|
t.datetime "updated_at", :null => false
|
13
13
|
end
|
14
14
|
|
15
|
+
add_index(:paypal_express_payment_methods, :kb_account_id)
|
16
|
+
add_index(:paypal_express_payment_methods, :kb_payment_method_id)
|
17
|
+
|
15
18
|
create_table "paypal_express_transactions", :force => true do |t|
|
16
19
|
t.integer "paypal_express_response_id", :null => false
|
17
20
|
t.string "api_call", :null => false
|
@@ -22,6 +25,8 @@ ActiveRecord::Schema.define(:version => 20130311153635) do
|
|
22
25
|
t.datetime "updated_at", :null => false
|
23
26
|
end
|
24
27
|
|
28
|
+
add_index(:paypal_express_transactions, :kb_payment_id)
|
29
|
+
|
25
30
|
create_table "paypal_express_responses", :force => true do |t|
|
26
31
|
t.string "api_call", :null => false
|
27
32
|
t.string "kb_payment_id"
|
@@ -78,4 +83,6 @@ ActiveRecord::Schema.define(:version => 20130311153635) do
|
|
78
83
|
t.datetime "created_at", :null => false
|
79
84
|
t.datetime "updated_at", :null => false
|
80
85
|
end
|
81
|
-
|
86
|
+
|
87
|
+
add_index(:paypal_express_responses, [:token, :api_call])
|
88
|
+
end
|
@@ -39,6 +39,23 @@ module Killbill::PaypalExpress
|
|
39
39
|
properties << Killbill::Plugin::Model::PaymentMethodKVInfo.new(false, 'baid', paypal_express_baid)
|
40
40
|
properties << Killbill::Plugin::Model::PaymentMethodKVInfo.new(false, 'token', paypal_express_token)
|
41
41
|
|
42
|
+
# We're pretty much guaranteed to have a (single) entry for details_for, since it was called during add_payment_method
|
43
|
+
details_for = PaypalExpressResponse.find_all_by_api_call_and_token('details_for', paypal_express_token).last
|
44
|
+
unless details_for.nil?
|
45
|
+
properties << Killbill::Plugin::Model::PaymentMethodKVInfo.new(false, 'payerName', details_for.payer_name)
|
46
|
+
properties << Killbill::Plugin::Model::PaymentMethodKVInfo.new(false, 'payerEmail', details_for.payer_email)
|
47
|
+
properties << Killbill::Plugin::Model::PaymentMethodKVInfo.new(false, 'payerCountry', details_for.payer_country)
|
48
|
+
properties << Killbill::Plugin::Model::PaymentMethodKVInfo.new(false, 'contactPhone', details_for.contact_phone)
|
49
|
+
properties << Killbill::Plugin::Model::PaymentMethodKVInfo.new(false, 'shipToAddressName', details_for.ship_to_address_name)
|
50
|
+
properties << Killbill::Plugin::Model::PaymentMethodKVInfo.new(false, 'shipToAddressCompany', details_for.ship_to_address_company)
|
51
|
+
properties << Killbill::Plugin::Model::PaymentMethodKVInfo.new(false, 'shipToAddressAddress1', details_for.ship_to_address_address1)
|
52
|
+
properties << Killbill::Plugin::Model::PaymentMethodKVInfo.new(false, 'shipToAddressAddress2', details_for.ship_to_address_address2)
|
53
|
+
properties << Killbill::Plugin::Model::PaymentMethodKVInfo.new(false, 'shipToAddressCity', details_for.ship_to_address_city)
|
54
|
+
properties << Killbill::Plugin::Model::PaymentMethodKVInfo.new(false, 'shipToAddressState', details_for.ship_to_address_state)
|
55
|
+
properties << Killbill::Plugin::Model::PaymentMethodKVInfo.new(false, 'shipToAddressCountry', details_for.ship_to_address_country)
|
56
|
+
properties << Killbill::Plugin::Model::PaymentMethodKVInfo.new(false, 'shipToAddressZip', details_for.ship_to_address_zip)
|
57
|
+
end
|
58
|
+
|
42
59
|
Killbill::Plugin::Model::PaymentMethodPlugin.new(external_payment_method_id,
|
43
60
|
is_default,
|
44
61
|
properties,
|
data/pom.xml
CHANGED
@@ -25,7 +25,7 @@
|
|
25
25
|
<groupId>com.ning.killbill.ruby</groupId>
|
26
26
|
<artifactId>paypal-express-plugin</artifactId>
|
27
27
|
<packaging>pom</packaging>
|
28
|
-
<version>1.0.
|
28
|
+
<version>1.0.16</version>
|
29
29
|
<name>paypal-express-plugin</name>
|
30
30
|
<url>http://github.com/killbill/killbill-paypal-express-plugin</url>
|
31
31
|
<description>Plugin for accessing paypal as a payment gateway</description>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: killbill-paypal-express
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.16
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-06-
|
12
|
+
date: 2013-06-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: killbill
|