killbill-paypal-express 4.0.0 → 4.1.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 +4 -4
- data/Gemfile.lock +28 -19
- data/Jarfile.lock +48 -48
- data/NEWS +3 -0
- data/README.md +123 -0
- data/VERSION +1 -1
- data/db/ddl.sql +1 -1
- data/db/schema.rb +2 -2
- data/killbill-paypal-express.gemspec +3 -3
- data/lib/paypal_express.rb +3 -0
- data/lib/paypal_express/api.rb +177 -49
- data/lib/paypal_express/application.rb +1 -0
- data/lib/paypal_express/ext/active_merchant/active_merchant.rb +18 -0
- data/lib/paypal_express/models/response.rb +8 -0
- data/lib/paypal_express/private_api.rb +9 -9
- data/pom.xml +1 -1
- data/release.sh +0 -0
- data/spec/paypal_express/base_plugin_spec.rb +0 -17
- data/spec/paypal_express/remote/baid_spec.rb +287 -0
- data/spec/paypal_express/remote/hpp_spec.rb +256 -0
- data/spec/spec_helper.rb +20 -0
- metadata +27 -5
- data/spec/paypal_express/remote/integration_spec.rb +0 -135
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc4531efe4c6f7825ed1d9a3dd3fd2b8e9f2ccb6
|
4
|
+
data.tar.gz: 1a3dab60dedf1ca4f9c8e17beb1f3be748cc71f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: adb0c1956db0e87054266415ae29824e70f88d442769fc6b7c30c8e6a037b570f4fa51c0fad29db8bdcb346fd5b1f17dc8541d6a2aa5c7b8184c5f665ca1b469
|
7
|
+
data.tar.gz: 4d77f05cc11ade49b059c96ecd0479eccc5c36d26d9b93113fe0935a1639e9ce95b6805e0ede6bafc443cbed73dcac1a3144c3fb2dda4b974eb0ae15c9ce0288
|
data/Gemfile.lock
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
killbill-paypal-express (4.
|
4
|
+
killbill-paypal-express (4.1.0)
|
5
5
|
actionpack (~> 4.1.0)
|
6
6
|
actionview (~> 4.1.0)
|
7
7
|
activemerchant (~> 1.53.0)
|
8
8
|
activerecord (~> 4.1.0)
|
9
9
|
activerecord-bogacs (~> 0.3)
|
10
|
-
activerecord-jdbc-adapter (~> 1.3)
|
11
|
-
jruby-openssl (~> 0.9.
|
10
|
+
activerecord-jdbc-adapter (~> 1.3, < 1.5)
|
11
|
+
jruby-openssl (~> 0.9.11)
|
12
12
|
killbill (~> 7.0)
|
13
13
|
monetize (~> 1.1.0)
|
14
14
|
money (~> 6.5.1)
|
@@ -19,13 +19,13 @@ PATH
|
|
19
19
|
GEM
|
20
20
|
remote: https://rubygems.org/
|
21
21
|
specs:
|
22
|
-
actionpack (4.1.14)
|
23
|
-
actionview (= 4.1.14)
|
24
|
-
activesupport (= 4.1.14)
|
22
|
+
actionpack (4.1.14.1)
|
23
|
+
actionview (= 4.1.14.1)
|
24
|
+
activesupport (= 4.1.14.1)
|
25
25
|
rack (~> 1.5.2)
|
26
26
|
rack-test (~> 0.6.2)
|
27
|
-
actionview (4.1.14)
|
28
|
-
activesupport (= 4.1.14)
|
27
|
+
actionview (4.1.14.1)
|
28
|
+
activesupport (= 4.1.14.1)
|
29
29
|
builder (~> 3.1)
|
30
30
|
erubis (~> 2.7.0)
|
31
31
|
active_utils (3.0.0)
|
@@ -36,17 +36,17 @@ GEM
|
|
36
36
|
builder (>= 2.1.2, < 4.0.0)
|
37
37
|
i18n (>= 0.6.9)
|
38
38
|
nokogiri (~> 1.4)
|
39
|
-
activemodel (4.1.14)
|
40
|
-
activesupport (= 4.1.14)
|
39
|
+
activemodel (4.1.14.1)
|
40
|
+
activesupport (= 4.1.14.1)
|
41
41
|
builder (~> 3.1)
|
42
|
-
activerecord (4.1.14)
|
43
|
-
activemodel (= 4.1.14)
|
44
|
-
activesupport (= 4.1.14)
|
42
|
+
activerecord (4.1.14.1)
|
43
|
+
activemodel (= 4.1.14.1)
|
44
|
+
activesupport (= 4.1.14.1)
|
45
45
|
arel (~> 5.0.0)
|
46
46
|
activerecord-bogacs (0.4.1)
|
47
47
|
activerecord-jdbc-adapter (1.3.19)
|
48
48
|
activerecord (>= 2.2)
|
49
|
-
activesupport (4.1.14)
|
49
|
+
activesupport (4.1.14.1)
|
50
50
|
i18n (~> 0.6, >= 0.6.9)
|
51
51
|
json (~> 1.7, >= 1.7.7)
|
52
52
|
minitest (~> 5.1)
|
@@ -65,8 +65,9 @@ GEM
|
|
65
65
|
diff-lcs (1.1.3)
|
66
66
|
equalizer (0.0.11)
|
67
67
|
erubis (2.7.0)
|
68
|
-
ethon (0.8.
|
68
|
+
ethon (0.8.1)
|
69
69
|
ffi (>= 1.3.0)
|
70
|
+
ffi (1.9.10)
|
70
71
|
ffi (1.9.10-java)
|
71
72
|
i18n (0.7.0)
|
72
73
|
ice_nine (0.11.1)
|
@@ -77,22 +78,27 @@ GEM
|
|
77
78
|
maven-tools (~> 1.0.10)
|
78
79
|
ruby-maven (~> 3.3, >= 3.3.3)
|
79
80
|
jdbc-mariadb (1.2.3)
|
81
|
+
jdbc-postgres (9.4.1206)
|
80
82
|
jdbc-sqlite3 (3.8.11.2)
|
81
|
-
jruby-openssl (0.9.
|
83
|
+
jruby-openssl (0.9.15-java)
|
84
|
+
json (1.8.3)
|
82
85
|
json (1.8.3-java)
|
83
|
-
killbill (7.0.
|
86
|
+
killbill (7.0.2)
|
84
87
|
rack (>= 1.5.2)
|
85
88
|
sinatra (~> 1.3.4)
|
86
89
|
typhoeus (~> 0.6.9)
|
87
90
|
tzinfo (~> 1.2.0)
|
88
91
|
maven-tools (1.0.13)
|
89
92
|
virtus (~> 1.0)
|
90
|
-
|
93
|
+
mini_portile2 (2.0.0)
|
94
|
+
minitest (5.8.4)
|
91
95
|
monetize (1.1.0)
|
92
96
|
money (~> 6.5.0)
|
93
97
|
money (6.5.1)
|
94
98
|
i18n (>= 0.6.4, <= 0.7.0)
|
95
|
-
nokogiri (1.6.7.
|
99
|
+
nokogiri (1.6.7.2)
|
100
|
+
mini_portile2 (~> 2.0.0.rc2)
|
101
|
+
nokogiri (1.6.7.2-java)
|
96
102
|
offsite_payments (2.1.0)
|
97
103
|
actionpack (>= 3.2.20, < 5.0.0)
|
98
104
|
active_utils (~> 3.0.0)
|
@@ -122,6 +128,7 @@ GEM
|
|
122
128
|
rack (~> 1.4)
|
123
129
|
rack-protection (~> 1.3)
|
124
130
|
tilt (~> 1.3, >= 1.3.3)
|
131
|
+
thread_safe (0.3.5)
|
125
132
|
thread_safe (0.3.5-java)
|
126
133
|
tilt (1.4.1)
|
127
134
|
typhoeus (0.6.9)
|
@@ -136,10 +143,12 @@ GEM
|
|
136
143
|
|
137
144
|
PLATFORMS
|
138
145
|
java
|
146
|
+
ruby
|
139
147
|
|
140
148
|
DEPENDENCIES
|
141
149
|
jbundler (~> 0.9.2)
|
142
150
|
jdbc-mariadb (~> 1.1)
|
151
|
+
jdbc-postgres (~> 9.4)
|
143
152
|
jdbc-sqlite3 (~> 3.7)
|
144
153
|
killbill-paypal-express!
|
145
154
|
rake (>= 10.0.0)
|
data/Jarfile.lock
CHANGED
@@ -1,63 +1,63 @@
|
|
1
1
|
---
|
2
2
|
:runtime:
|
3
|
-
-
|
4
|
-
- org.
|
5
|
-
-
|
3
|
+
- org.bouncycastle:bcprov-jdk15on:jar:1.50
|
4
|
+
- org.bouncycastle:bcpkix-jdk15on:jar:1.50
|
5
|
+
- org.apache.shiro:shiro-core:jar:1.2.3
|
6
6
|
- joda-time:joda-time:jar:2.3
|
7
|
-
-
|
8
|
-
-
|
9
|
-
-
|
10
|
-
- org.kill-bill.billing:killbill-internal-api:jar:0.15.10
|
11
|
-
- org.kill-bill.commons:killbill-xmlloader:jar:0.11
|
12
|
-
- org.kill-bill.billing.plugin:killbill-plugin-api-entitlement:jar:0.18
|
13
|
-
- com.google.inject:guice:jar:3.0
|
7
|
+
- net.sf.ehcache:ehcache:jar:2.9.1
|
8
|
+
- aopalliance:aopalliance:jar:1.0
|
9
|
+
- com.google.code.findbugs:annotations:jar:3.0.0
|
14
10
|
- org.osgi:org.osgi.core:jar:5.0.0
|
11
|
+
- org.kill-bill.commons:killbill-concurrent:jar:0.11
|
15
12
|
- org.slf4j:slf4j-api:jar:1.7.12
|
16
|
-
-
|
17
|
-
- org.
|
18
|
-
- org.
|
19
|
-
- org.
|
20
|
-
- com.h2database:h2:jar:1.4.186
|
21
|
-
- javax.activation:activation:jar:1.1
|
22
|
-
- org.skife.config:config-magic:jar:0.14
|
23
|
-
- com.fasterxml.jackson.dataformat:jackson-dataformat-csv:jar:2.4.3
|
24
|
-
- org.kill-bill.billing.plugin:killbill-plugin-api-control:jar:0.18
|
13
|
+
- org.kill-bill.commons:killbill-xmlloader:jar:0.11
|
14
|
+
- org.apache.shiro:shiro-guice:jar:1.2.3
|
15
|
+
- org.slf4j:jcl-over-slf4j:jar:1.7.12
|
16
|
+
- org.kill-bill.billing.plugin:killbill-plugin-api-invoice:jar:0.18
|
25
17
|
- org.apache.commons:commons-email:jar:1.2
|
26
|
-
- org.
|
18
|
+
- org.skife.config:config-magic:jar:0.14
|
27
19
|
- antlr:antlr:jar:2.7.7
|
28
|
-
- aopalliance:aopalliance:jar:1.0
|
29
|
-
- com.fasterxml.jackson.core:jackson-annotations:jar:2.4.3
|
30
20
|
- org.antlr:stringtemplate:jar:3.2.1
|
21
|
+
- org.apache.shiro:shiro-ehcache:jar:1.2.3
|
22
|
+
- org.joda:joda-money:jar:0.9
|
23
|
+
- org.jdbi:jdbi:jar:2.62
|
24
|
+
- com.fasterxml.jackson.core:jackson-annotations:jar:2.4.3
|
25
|
+
- com.fasterxml.jackson.dataformat:jackson-dataformat-csv:jar:2.4.3
|
26
|
+
- com.google.inject:guice:jar:3.0
|
27
|
+
- org.kill-bill.billing.plugin:killbill-plugin-api-currency:jar:0.18
|
28
|
+
- com.fasterxml.jackson.core:jackson-databind:jar:2.4.3
|
29
|
+
- org.apache.felix:org.apache.felix.framework:jar:4.4.1
|
30
|
+
- org.kill-bill.billing:killbill-platform-osgi:jar:0.15
|
31
|
+
- com.samskivert:jmustache:jar:1.5
|
32
|
+
- org.kill-bill.billing.plugin:killbill-plugin-api-notification:jar:0.18
|
33
|
+
- com.h2database:h2:jar:1.4.186
|
31
34
|
- org.kill-bill.commons:killbill-clock:jar:0.11
|
32
|
-
-
|
35
|
+
- org.kill-bill.billing:killbill-internal-api:jar:0.15.10
|
36
|
+
- org.bgee.log4jdbc-log4j2:log4jdbc-log4j2-jdbc4:jar:1.16
|
37
|
+
- com.fasterxml.jackson.datatype:jackson-datatype-joda:jar:2.4.3
|
33
38
|
- org.kill-bill.billing:killbill-platform-base:jar:0.15
|
34
|
-
-
|
35
|
-
-
|
36
|
-
- org.
|
39
|
+
- com.fasterxml.jackson.core:jackson-core:jar:2.4.3
|
40
|
+
- com.google.guava:guava:jar:r09
|
41
|
+
- org.kill-bill.billing.plugin:killbill-plugin-api-entitlement:jar:0.18
|
37
42
|
- org.kill-bill.billing:killbill-platform-api:jar:0.15
|
38
|
-
-
|
39
|
-
-
|
40
|
-
- org.apache.felix:org.apache.felix.framework:jar:4.4.1
|
41
|
-
- org.joda:joda-money:jar:0.9
|
42
|
-
- org.kill-bill.commons:killbill-jdbi:jar:0.11
|
43
|
-
- org.kill-bill.commons:killbill-embeddeddb-common:jar:0.11
|
44
|
-
- org.apache.shiro:shiro-core:jar:1.2.3
|
45
|
-
- org.bouncycastle:bcpkix-jdk15on:jar:1.50
|
46
|
-
- org.kill-bill.billing:killbill-platform-osgi-api:jar:0.15
|
43
|
+
- javax.mail:mail:jar:1.4.1
|
44
|
+
- javax.activation:activation:jar:1.1
|
47
45
|
- org.kill-bill.billing.plugin:killbill-plugin-api-payment:jar:0.18
|
48
|
-
- com.fasterxml.jackson.core:jackson-databind:jar:2.4.3
|
49
|
-
- com.google.guava:guava:jar:r09
|
50
46
|
- org.kill-bill.commons:killbill-locker:jar:0.11
|
51
|
-
-
|
52
|
-
- org.kill-bill.
|
53
|
-
- org.
|
54
|
-
- javax.servlet:javax.servlet-api:jar:3.1.0
|
55
|
-
- org.apache.shiro:shiro-ehcache:jar:1.2.3
|
56
|
-
- javax.inject:javax.inject:jar:1
|
57
|
-
- com.fasterxml.jackson.datatype:jackson-datatype-joda:jar:2.4.3
|
47
|
+
- io.dropwizard.metrics:metrics-core:jar:3.1.1
|
48
|
+
- org.kill-bill.billing:killbill-platform-osgi-api:jar:0.15
|
49
|
+
- org.weakref:jmxutils:jar:1.18
|
58
50
|
- com.google.inject.extensions:guice-multibindings:jar:3.0
|
59
|
-
-
|
60
|
-
-
|
51
|
+
- org.kill-bill.billing:killbill-util:jar:tests:0.15.10
|
52
|
+
- javax.inject:javax.inject:jar:1
|
53
|
+
- commons-beanutils:commons-beanutils:jar:1.8.3
|
54
|
+
- org.kill-bill.billing.plugin:killbill-plugin-api-catalog:jar:0.18
|
55
|
+
- javax.servlet:javax.servlet-api:jar:3.1.0
|
61
56
|
- org.kill-bill.billing:killbill-api:jar:0.32
|
62
|
-
-
|
63
|
-
-
|
57
|
+
- io.dropwizard.metrics:metrics-ehcache:jar:3.1.1
|
58
|
+
- org.kill-bill.billing.plugin:killbill-plugin-api-control:jar:0.18
|
59
|
+
- org.kill-bill.commons:killbill-jdbi:jar:0.11
|
60
|
+
- org.kill-bill.commons:killbill-embeddeddb-common:jar:0.11
|
61
|
+
- org.mockito:mockito-all:jar:1.10.19
|
62
|
+
- org.osgi:org.osgi.compendium:jar:5.0.0
|
63
|
+
- org.kill-bill.commons:killbill-queue:jar:0.11
|
data/NEWS
CHANGED
data/README.md
CHANGED
@@ -47,6 +47,110 @@ To go to production, create a `paypal_express.yml` configuration file under `/va
|
|
47
47
|
Usage
|
48
48
|
-----
|
49
49
|
|
50
|
+
### One-off payments
|
51
|
+
|
52
|
+
Create a payment method for the account:
|
53
|
+
|
54
|
+
```
|
55
|
+
curl -v \
|
56
|
+
-X POST \
|
57
|
+
-u admin:password \
|
58
|
+
-H 'X-Killbill-ApiKey: bob' \
|
59
|
+
-H 'X-Killbill-ApiSecret: lazar' \
|
60
|
+
-H 'X-Killbill-CreatedBy: admin' \
|
61
|
+
-H 'Content-Type: application/json' \
|
62
|
+
-d '{
|
63
|
+
"pluginName": "killbill-paypal-express",
|
64
|
+
"pluginInfo": {}
|
65
|
+
}' \
|
66
|
+
"http://127.0.0.1:8080/1.0/kb/accounts/<ACCOUNT_ID>/paymentMethods?isDefault=true"
|
67
|
+
```
|
68
|
+
|
69
|
+
#### Without a pending payment
|
70
|
+
|
71
|
+
Generate the redirect URL using buildFormDescriptor (this will invoke `SetExpressCheckout`):
|
72
|
+
|
73
|
+
```
|
74
|
+
curl -v \
|
75
|
+
-X POST \
|
76
|
+
-u admin:password \
|
77
|
+
-H 'X-Killbill-ApiKey: bob' \
|
78
|
+
-H 'X-Killbill-ApiSecret: lazar' \
|
79
|
+
-H 'X-Killbill-CreatedBy: admin' \
|
80
|
+
-H 'Content-Type: application/json' \
|
81
|
+
-d '{
|
82
|
+
"formFields": [{
|
83
|
+
"key": "amount",
|
84
|
+
"value": 10
|
85
|
+
},{
|
86
|
+
"key": "currency",
|
87
|
+
"value": "USD"
|
88
|
+
}]
|
89
|
+
}' \
|
90
|
+
"http://127.0.0.1:8080/1.0/kb/paymentGateways/hosted/form/<ACCOUNT_ID>"
|
91
|
+
```
|
92
|
+
|
93
|
+
The customer should be redirected to the url specified in the `formUrl` entry of the response, e.g. https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-20G53990M6953444J.
|
94
|
+
|
95
|
+
Once the customer comes back from the PayPal flow, trigger the payment:
|
96
|
+
|
97
|
+
```
|
98
|
+
curl -v \
|
99
|
+
-X POST \
|
100
|
+
-u admin:password \
|
101
|
+
-H 'X-Killbill-ApiKey: bob' \
|
102
|
+
-H 'X-Killbill-ApiSecret: lazar' \
|
103
|
+
-H 'X-Killbill-CreatedBy: admin' \
|
104
|
+
-H 'Content-Type: application/json' \
|
105
|
+
-d '{
|
106
|
+
"transactionType": "PURCHASE",
|
107
|
+
"amount": "10",
|
108
|
+
"currency": "USD"
|
109
|
+
}' \
|
110
|
+
"http://127.0.0.1:8080/1.0/kb/accounts/<ACCOUNT_ID>/payments"
|
111
|
+
```
|
112
|
+
|
113
|
+
#### With a pending payment
|
114
|
+
|
115
|
+
Generate the redirect URL using buildFormDescriptor (this will invoke `SetExpressCheckout`):
|
116
|
+
|
117
|
+
```
|
118
|
+
curl -v \
|
119
|
+
-X POST \
|
120
|
+
-u admin:password \
|
121
|
+
-H 'X-Killbill-ApiKey: bob' \
|
122
|
+
-H 'X-Killbill-ApiSecret: lazar' \
|
123
|
+
-H 'X-Killbill-CreatedBy: admin' \
|
124
|
+
-H 'Content-Type: application/json' \
|
125
|
+
-d '{
|
126
|
+
"formFields": [{
|
127
|
+
"key": "amount",
|
128
|
+
"value": 10
|
129
|
+
},{
|
130
|
+
"key": "currency",
|
131
|
+
"value": "USD"
|
132
|
+
}]
|
133
|
+
}' \
|
134
|
+
"http://127.0.0.1:8080/1.0/kb/paymentGateways/hosted/form/<ACCOUNT_ID>?pluginProperty=create_pending_payment=true"
|
135
|
+
```
|
136
|
+
|
137
|
+
The customer should be redirected to the url specified in the `formUrl` entry of the response, e.g. https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-20G53990M6953444J.
|
138
|
+
|
139
|
+
Once the customer comes back from the PayPal flow, complete the payment (the payment id and external key are returned as part of the buildFormDescriptor call):
|
140
|
+
|
141
|
+
```
|
142
|
+
curl -v \
|
143
|
+
-X PUT \
|
144
|
+
-u admin:password \
|
145
|
+
-H 'X-Killbill-ApiKey: bob' \
|
146
|
+
-H 'X-Killbill-ApiSecret: lazar' \
|
147
|
+
-H 'X-Killbill-CreatedBy: admin' \
|
148
|
+
-H 'Content-Type: application/json' \
|
149
|
+
"http://127.0.0.1:8080/1.0/kb/payments/<PAYMENT_ID>"
|
150
|
+
```
|
151
|
+
|
152
|
+
### Recurring payments via a billing agreement ID (BAID)
|
153
|
+
|
50
154
|
Issue the following call to generate a Paypal token:
|
51
155
|
|
52
156
|
```
|
@@ -94,3 +198,22 @@ curl -v \
|
|
94
198
|
}' \
|
95
199
|
"http://127.0.0.1:8080/1.0/kb/accounts/13d26090-b8d7-11e2-9e96-0800200c9a66/paymentMethods?isDefault=true"
|
96
200
|
```
|
201
|
+
|
202
|
+
Plugin properties
|
203
|
+
-----------------
|
204
|
+
|
205
|
+
| Key | Description |
|
206
|
+
| ---------------------------: | ----------------------------------------------------------------- |
|
207
|
+
| skip_gw | If true, skip the call to PayPal |
|
208
|
+
| token | PayPal token to use |
|
209
|
+
| payer_id | PayPal Payer id to use |
|
210
|
+
| create_pending_payment | Create pending payment during buildFormDescriptor call |
|
211
|
+
| payment_processor_account_id | Config entry name of the merchant account to use |
|
212
|
+
| external_key_as_order_id | If true, set the payment external key as the PayPal order id |
|
213
|
+
| email | Purchaser email |
|
214
|
+
| address1 | Billing address first line |
|
215
|
+
| address2 | Billing address second line |
|
216
|
+
| city | Billing address city |
|
217
|
+
| zip | Billing address zip code |
|
218
|
+
| state | Billing address state |
|
219
|
+
| country | Billing address country |
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
4.
|
1
|
+
4.1.0
|
data/db/ddl.sql
CHANGED
@@ -2,7 +2,7 @@ CREATE TABLE `paypal_express_payment_methods` (
|
|
2
2
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
3
3
|
`kb_payment_method_id` varchar(255) DEFAULT NULL,
|
4
4
|
`paypal_express_payer_id` varchar(255) DEFAULT NULL,
|
5
|
-
`paypal_express_token` varchar(255)
|
5
|
+
`paypal_express_token` varchar(255) DEFAULT NULL,
|
6
6
|
`token` varchar(255) DEFAULT NULL,
|
7
7
|
`cc_first_name` varchar(255) DEFAULT NULL,
|
8
8
|
`cc_last_name` varchar(255) DEFAULT NULL,
|
data/db/schema.rb
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
require 'active_record'
|
2
2
|
|
3
|
-
ActiveRecord::Schema.define(:version =>
|
3
|
+
ActiveRecord::Schema.define(:version => 20151008153635) do
|
4
4
|
create_table "paypal_express_payment_methods", :force => true do |t|
|
5
5
|
t.string "kb_payment_method_id" # NULL before Kill Bill knows about it
|
6
6
|
t.string "paypal_express_payer_id" # NULL before the express checkout is completed
|
7
|
-
t.string "paypal_express_token"
|
7
|
+
t.string "paypal_express_token"
|
8
8
|
t.string "token" # paypal-express baid, NULL before the express checkout is completed
|
9
9
|
t.string "cc_first_name"
|
10
10
|
t.string "cc_last_name"
|
@@ -29,9 +29,8 @@ Gem::Specification.new do |s|
|
|
29
29
|
s.add_dependency 'activerecord', '~> 4.1.0'
|
30
30
|
if defined?(JRUBY_VERSION)
|
31
31
|
s.add_dependency 'activerecord-bogacs', '~> 0.3'
|
32
|
-
s.add_dependency 'activerecord-jdbc-adapter', '~> 1.3'
|
33
|
-
|
34
|
-
s.add_dependency 'jruby-openssl', '~> 0.9.6'
|
32
|
+
s.add_dependency 'activerecord-jdbc-adapter', '~> 1.3', '< 1.5'
|
33
|
+
s.add_dependency 'jruby-openssl', '~> 0.9.11'
|
35
34
|
end
|
36
35
|
s.add_dependency 'actionpack', '~> 4.1.0'
|
37
36
|
s.add_dependency 'actionview', '~> 4.1.0'
|
@@ -46,6 +45,7 @@ Gem::Specification.new do |s|
|
|
46
45
|
if defined?(JRUBY_VERSION)
|
47
46
|
s.add_development_dependency 'jdbc-sqlite3', '~> 3.7'
|
48
47
|
s.add_development_dependency 'jdbc-mariadb', '~> 1.1'
|
48
|
+
s.add_development_dependency 'jdbc-postgres', '~> 9.4'
|
49
49
|
else
|
50
50
|
s.add_development_dependency 'sqlite3', '~> 1.3.7'
|
51
51
|
end
|
data/lib/paypal_express.rb
CHANGED
@@ -3,6 +3,7 @@ require 'action_controller'
|
|
3
3
|
require 'active_record'
|
4
4
|
require 'action_view'
|
5
5
|
require 'active_merchant'
|
6
|
+
require 'active_merchant/billing/gateways/paypal/paypal_common_api'
|
6
7
|
require 'active_support'
|
7
8
|
require 'bigdecimal'
|
8
9
|
require 'money'
|
@@ -16,6 +17,8 @@ require 'yaml'
|
|
16
17
|
require 'killbill'
|
17
18
|
require 'killbill/helpers/active_merchant'
|
18
19
|
|
20
|
+
require 'paypal_express/ext/active_merchant/active_merchant.rb'
|
21
|
+
|
19
22
|
require 'paypal_express/api'
|
20
23
|
require 'paypal_express/private_api'
|
21
24
|
|