killbill-stripe 4.0.0 → 4.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -27,16 +27,24 @@ get '/plugins/killbill-stripe' do
27
27
  kb_account_id = request.GET['kb_account_id']
28
28
  required_parameter! :kb_account_id, kb_account_id
29
29
 
30
- kb_tenant_id = request.GET['kb_tenant_id']
31
- kb_tenant = request.env['killbill_tenant']
32
- kb_tenant_id ||= kb_tenant.id.to_s unless kb_tenant.nil?
30
+ if development? or test?
31
+ # Just look at the global configuration
32
+ kb_tenant_id = nil
33
+ else
34
+ kb_tenant_id = request.GET['kb_tenant_id']
35
+ kb_tenant = request.env['killbill_tenant']
36
+ kb_tenant_id ||= kb_tenant.id.to_s unless kb_tenant.nil?
37
+ end
38
+
39
+ stripe_config = (config(kb_tenant_id) || {})[:stripe]
40
+ required_parameter! 'killbill-stripe', stripe_config, "is not configured for kb_tenant_id=#{kb_tenant_id}"
33
41
 
34
42
  # URL to Stripe.js
35
- stripejs_url = config(kb_tenant_id)[:stripe][:stripejs_url] || 'https://js.stripe.com/v2/'
43
+ stripejs_url = stripe_config[:stripejs_url] || 'https://js.stripe.com/v2/'
36
44
  required_parameter! :stripejs_url, stripejs_url, 'is not configured'
37
45
 
38
46
  # Public API key
39
- publishable_key = config(kb_tenant_id)[:stripe][:api_publishable_key]
47
+ publishable_key = stripe_config[:api_publishable_key]
40
48
  required_parameter! :publishable_key, publishable_key, 'is not configured'
41
49
 
42
50
  # Skip redirect? Useful for testing the flow with Kill Bill
@@ -55,7 +63,25 @@ end
55
63
  # This is mainly for testing. Your application should redirect from the Stripe.js checkout above
56
64
  # to a custom endpoint where you call the Kill Bill add payment method JAX-RS API.
57
65
  post '/plugins/killbill-stripe', :provides => 'json' do
58
- params.to_json
66
+ return params.to_json if development? or test?
67
+
68
+ kb_payment_method_id = plugin(session).add_payment_method(params)
69
+
70
+ response = params.dup
71
+ response['kb_payment_method_id'] = kb_payment_method_id
72
+ response.to_json
73
+ end
74
+
75
+ # Create managed account
76
+ post '/plugins/killbill-stripe/accounts', :provides => 'json' do
77
+ kb_account_id = params.delete('kb_account_id')
78
+ required_parameter! :kb_account_id, kb_account_id
79
+
80
+ kb_tenant_id = params.delete('kb_tenant_id')
81
+ kb_tenant = request.env['killbill_tenant']
82
+ kb_tenant_id ||= kb_tenant.id.to_s unless kb_tenant.nil?
83
+
84
+ plugin(session).create_managed_account(kb_account_id, kb_tenant_id, params).params.to_json
59
85
  end
60
86
 
61
87
  # curl -v http://127.0.0.1:9292/plugins/killbill-stripe/1.0/pms/1
@@ -0,0 +1,42 @@
1
+ module ActiveMerchant
2
+ module Billing
3
+
4
+ KB_PLUGIN_VERSION = Gem.loaded_specs['killbill-stripe'].version.version rescue nil
5
+
6
+ class StripeGateway
7
+
8
+ def get_balance(options = {})
9
+ commit(:get, 'balance', nil, options)
10
+ end
11
+
12
+ def create_managed_account(account = {}, options = {})
13
+ post = account.dup
14
+ post[:country] ||= 'US'
15
+ post[:managed] = true
16
+
17
+ commit(:post, 'accounts', post, options)
18
+ end
19
+
20
+ def user_agent
21
+ @@ua ||= JSON.dump({
22
+ :bindings_version => KB_PLUGIN_VERSION,
23
+ :lang => 'ruby',
24
+ :lang_version => "#{RUBY_VERSION} p#{RUBY_PATCHLEVEL} (#{RUBY_RELEASE_DATE})",
25
+ :platform => RUBY_PLATFORM,
26
+ :publisher => 'killbill'
27
+ })
28
+ end
29
+
30
+ alias_method :old_headers, :headers
31
+
32
+ def headers(options = {})
33
+ headers = old_headers(options)
34
+
35
+ stripe_account = options.delete(:stripe_account)
36
+ headers['Stripe-Account'] = stripe_account unless stripe_account.nil?
37
+
38
+ headers
39
+ end
40
+ end
41
+ end
42
+ end
@@ -75,6 +75,20 @@ module Killbill #:nodoc:
75
75
 
76
76
  super.or(where_clause)
77
77
  end
78
+
79
+ def self.managed_stripe_account_id_from_kb_account_id(kb_account_id, kb_tenant_id)
80
+ t = self.arel_table
81
+
82
+ query = t[:api_call].eq('create_managed_account')
83
+ .and(t[:kb_account_id].eq(kb_account_id))
84
+ .and(t[:kb_tenant_id].eq(kb_tenant_id))
85
+ query = t.where(query).order(t[:id].desc).take(1).project(t[:params_id])
86
+
87
+ responses = find_by_sql(query.to_sql)
88
+ return nil if responses.empty?
89
+
90
+ responses.last.params_id
91
+ end
78
92
  end
79
93
  end
80
94
  end
@@ -8,6 +8,62 @@ module Killbill #:nodoc:
8
8
  ::Killbill::Stripe::StripeResponse,
9
9
  session)
10
10
  end
11
+
12
+ def add_payment_method(params, options = {})
13
+ # We need to log-in manually because the call comes unauthenticated from the browser
14
+ # (the default credentials hardcoded: good enough since this should only be used for testing)
15
+ kb_apis.security_api.login('admin', 'password')
16
+
17
+ kb_account_id = params['kbAccountId']
18
+ kb_tenant_id = params['kbTenantId']
19
+
20
+ context = kb_apis.create_context(kb_tenant_id)
21
+ kb_account = kb_apis.account_user_api.get_account_by_id(kb_account_id, context)
22
+
23
+ payment_method_info = ::Killbill::Plugin::Model::PaymentMethodPlugin.new
24
+ payment_method_info.properties = []
25
+ payment_method_info.properties << build_property('cc_first_name', params['stripeCardName'])
26
+ payment_method_info.properties << build_property('address1', params['stripeCardAddressLine1'])
27
+ payment_method_info.properties << build_property('address2', params['stripeCardAddressLine2'])
28
+ payment_method_info.properties << build_property('city', params['stripeCardAddressCity'])
29
+ payment_method_info.properties << build_property('zip', params['stripeCardAddressZip'])
30
+ payment_method_info.properties << build_property('state', params['stripeCardAddressState'])
31
+ payment_method_info.properties << build_property('country', params['stripeCardAddressCountry'])
32
+ payment_method_info.properties << build_property('cc_expiration_month', params['stripeCardExpMonth'])
33
+ payment_method_info.properties << build_property('cc_expiration_year', params['stripeCardExpYear'])
34
+ payment_method_info.properties << build_property('token', params['stripeToken'])
35
+
36
+ kb_apis.payment_api.add_payment_method(kb_account, params['stripeToken'], 'killbill-stripe', true, payment_method_info, [], context)
37
+ end
38
+
39
+ def get_balance(kb_account_id = nil, kb_tenant_id = nil, options = {})
40
+ options[:stripe_account] ||= ::Killbill::Stripe::StripeResponse.managed_stripe_account_id_from_kb_account_id(kb_account_id, kb_tenant_id)
41
+
42
+ payment_processor_account_id = options[:payment_processor_account_id] || :default
43
+ gateway = gateway(payment_processor_account_id, kb_tenant_id)
44
+ stripe_response = gateway.get_balance(options)
45
+ save_response_and_transaction(stripe_response, :get_balance, kb_account_id, kb_tenant_id, payment_processor_account_id)
46
+
47
+ stripe_response
48
+ end
49
+
50
+ def create_managed_account(kb_account_id, kb_tenant_id, account = {}, options = {})
51
+ payment_processor_account_id = options[:payment_processor_account_id] || :default
52
+ gateway = gateway(payment_processor_account_id, kb_tenant_id)
53
+ stripe_response = gateway.create_managed_account(account, options)
54
+ save_response_and_transaction(stripe_response, :create_managed_account, kb_account_id, kb_tenant_id, payment_processor_account_id)
55
+
56
+ stripe_response
57
+ end
58
+
59
+ private
60
+
61
+ def build_property(key, value = nil)
62
+ prop = ::Killbill::Plugin::Model::PluginProperty.new
63
+ prop.key = key
64
+ prop.value = value
65
+ prop
66
+ end
11
67
  end
12
68
  end
13
69
  end
data/pom.xml CHANGED
@@ -25,7 +25,7 @@
25
25
  <groupId>org.kill-bill.billing.plugin.ruby</groupId>
26
26
  <artifactId>stripe-plugin</artifactId>
27
27
  <packaging>pom</packaging>
28
- <version>4.0.0</version>
28
+ <version>4.1.0</version>
29
29
  <name>stripe-plugin</name>
30
30
  <url>http://github.com/killbill/killbill-stripe-plugin</url>
31
31
  <description>Plugin for accessing Stripe as a payment gateway</description>
@@ -4,6 +4,18 @@ describe Killbill::Stripe::PaymentPlugin do
4
4
 
5
5
  include ::Killbill::Plugin::ActiveMerchant::RSpec
6
6
 
7
+ let(:kb_account_id) do
8
+ SecureRandom.uuid
9
+ end
10
+
11
+ let(:kb_tenant_id) do
12
+ SecureRandom.uuid
13
+ end
14
+
15
+ let(:context) do
16
+ build_call_context(kb_tenant_id)
17
+ end
18
+
7
19
  before(:each) do
8
20
  Dir.mktmpdir do |dir|
9
21
  file = File.new(File.join(dir, 'stripe.yml'), 'w+')
@@ -29,10 +41,6 @@ describe Killbill::Stripe::PaymentPlugin do
29
41
  end
30
42
 
31
43
  it 'should reset payment methods' do
32
- kb_account_id = '129384'
33
- kb_tenant_id = '092384'
34
- context = @plugin.kb_apis.create_context(kb_tenant_id)
35
-
36
44
  @plugin.get_payment_methods(kb_account_id, false, [], context).size.should == 0
37
45
  verify_pms kb_account_id, 0, context
38
46
 
@@ -70,6 +78,46 @@ describe Killbill::Stripe::PaymentPlugin do
70
78
  @plugin.stop_plugin
71
79
  end
72
80
 
81
+ it 'processes notifications' do
82
+ notification =<<EOF
83
+ {
84
+ "id": "evt_1234",
85
+ "user_id": "acct_12QkqYGSOD4VcegJ",
86
+ "type": "account.updated",
87
+ "data": {
88
+ "object": {
89
+ "legal_entity": {
90
+ "verification": {
91
+ "status": "unverified"
92
+ }
93
+ },
94
+ "verification": {
95
+ "fields_needed": ["legal_entity.personal_id_number"],
96
+ "due_by": null,
97
+ "contacted": false
98
+ }
99
+ },
100
+ "previous_attributes": {
101
+ "legal_entity": {
102
+ "verification": {
103
+ "status": "pending"
104
+ }
105
+ },
106
+ "verification": {
107
+ "fields_needed": []
108
+ }
109
+ }
110
+ }
111
+ }
112
+ EOF
113
+ gw_notification = @plugin.process_notification(notification, {}, context)
114
+ gw_notification.status.should == 200
115
+
116
+ response = ::Killbill::Stripe::StripeResponse.last
117
+ response.params_id.should == 'evt_1234'
118
+ response.api_call.should == 'webhook.account.updated'
119
+ end
120
+
73
121
  private
74
122
 
75
123
  def verify_pms(kb_account_id, size, context)
@@ -0,0 +1,133 @@
1
+ require 'spec_helper'
2
+
3
+ ActiveMerchant::Billing::Base.mode = :test
4
+
5
+ describe Killbill::Stripe::PaymentPlugin do
6
+
7
+ include ::Killbill::Plugin::ActiveMerchant::RSpec
8
+
9
+ let(:kb_account_id_for_contractor) do
10
+ kb_account_id = SecureRandom.uuid
11
+ create_kb_account(kb_account_id, plugin.kb_apis.proxied_services[:account_user_api])
12
+ kb_account_id
13
+ end
14
+
15
+ let(:kb_account_id_for_customer) do
16
+ kb_account_id = SecureRandom.uuid
17
+ create_kb_account(kb_account_id, plugin.kb_apis.proxied_services[:account_user_api])
18
+ kb_account_id
19
+ end
20
+
21
+ let(:kb_payment) do
22
+ payment = nil
23
+ kb_payment_id = SecureRandom.uuid
24
+ 1.upto(2) do
25
+ payment = plugin.kb_apis.proxied_services[:payment_api].add_payment(kb_payment_id)
26
+ end
27
+ payment
28
+ end
29
+
30
+ let(:kb_tenant_id) do
31
+ SecureRandom.uuid
32
+ end
33
+
34
+ let(:call_context) do
35
+ build_call_context(kb_tenant_id)
36
+ end
37
+
38
+ let(:plugin) do
39
+ plugin = build_plugin(::Killbill::Stripe::PaymentPlugin, 'stripe')
40
+ plugin.start_plugin
41
+ plugin
42
+ end
43
+
44
+ let(:private_plugin) do
45
+ ::Killbill::Stripe::PrivatePaymentPlugin.new
46
+ end
47
+
48
+ before(:all) do
49
+ # Start the plugin to initialize caches, etc.
50
+ plugin.should_not be_nil
51
+ end
52
+
53
+ it 'creates a managed account and transfers money' do
54
+ init_balance = get_balance
55
+
56
+ #
57
+ # Create managed Stripe account for contractor Jane Doe
58
+ #
59
+
60
+ account = {}
61
+ account[:legal_entity] = {}
62
+ account[:legal_entity][:type] = 'individual'
63
+ account[:legal_entity][:first_name] = 'Jane'
64
+ account[:legal_entity][:last_name] = 'Doe'
65
+ account[:legal_entity][:address] = {}
66
+ account[:legal_entity][:address][:city] = 'San Francisco'
67
+ account[:legal_entity][:dob] = {}
68
+ account[:legal_entity][:dob][:day] = 31
69
+ account[:legal_entity][:dob][:month] = 12
70
+ account[:legal_entity][:dob][:year] = 1969
71
+ account[:legal_entity][:ssn_last_4] = 1234
72
+ account[:tos_acceptance] = {}
73
+ account[:tos_acceptance][:date] = 1468778430
74
+ account[:tos_acceptance][:ip] = '8.8.8.8'
75
+
76
+ stripe_account = private_plugin.create_managed_account(kb_account_id_for_contractor, kb_tenant_id, account, {}).params
77
+ stripe_account['id'].should_not be_nil
78
+ stripe_account['keys'].should_not be_nil
79
+ stripe_account['managed'].should be_true
80
+
81
+ ::Killbill::Stripe::StripeResponse.managed_stripe_account_id_from_kb_account_id(SecureRandom.uuid, kb_tenant_id).should be_nil
82
+ ::Killbill::Stripe::StripeResponse.managed_stripe_account_id_from_kb_account_id(kb_account_id_for_contractor, nil).should be_nil
83
+ ::Killbill::Stripe::StripeResponse.managed_stripe_account_id_from_kb_account_id(kb_account_id_for_contractor, kb_tenant_id).should == stripe_account['id']
84
+
85
+ check_balance(kb_account_id_for_contractor)
86
+
87
+ #
88
+ # Tokenize card and charge customer John Doe
89
+ #
90
+
91
+ pm = create_payment_method(::Killbill::Stripe::StripePaymentMethod, kb_account_id_for_customer, kb_tenant_id, [], {}, true, plugin)
92
+
93
+ props = []
94
+ props << build_property(:destination, kb_account_id_for_contractor)
95
+ props << build_property(:fees_amount, 200)
96
+ payment_response = plugin.purchase_payment(kb_account_id_for_customer, kb_payment.id, kb_payment.transactions[0].id, pm.kb_payment_method_id, 10, :USD, props, call_context)
97
+
98
+ plugin.logger.info "Useful links:
99
+ Contractor dashboard: https://dashboard.stripe.com/#{stripe_account['id']}/test/dashboard
100
+ Customer dashboard: https://dashboard.stripe.com/test/customers/#{::Killbill::Stripe::StripePaymentMethod.stripe_customer_id_from_kb_account_id(kb_account_id_for_customer, kb_tenant_id)}
101
+ Collected fees: https://dashboard.stripe.com/test/applications/fees"
102
+
103
+ payment_response.status.should eq(:PROCESSED), payment_response.gateway_error
104
+ payment_response.amount.should == 10
105
+ payment_response.transaction_type.should == :PURCHASE
106
+
107
+ check_balance(nil, init_balance + 141)
108
+ check_balance(kb_account_id_for_contractor, 800)
109
+
110
+ props = []
111
+ props << build_property(:reverse_transfer, 'true')
112
+ props << build_property(:refund_application_fee, 'true')
113
+ refund_response = plugin.refund_payment(kb_account_id_for_customer, payment_response.kb_payment_id, kb_payment.transactions[1].id, pm.kb_payment_method_id, 10, :USD, props, call_context)
114
+ refund_response.status.should eq(:PROCESSED), refund_response.gateway_error
115
+ refund_response.amount.should == 10
116
+ refund_response.transaction_type.should == :REFUND
117
+
118
+ check_balance(nil, init_balance)
119
+ check_balance(kb_account_id_for_contractor, 0)
120
+ end
121
+
122
+ private
123
+
124
+ def check_balance(kb_account_id = nil, amount = 0)
125
+ balance = private_plugin.get_balance(kb_account_id, kb_tenant_id)
126
+ balance.params['pending'].first['currency'].should == 'usd'
127
+ balance.params['pending'].first['amount'].should == amount
128
+ end
129
+
130
+ def get_balance
131
+ private_plugin.get_balance(nil, kb_tenant_id).params['pending'].first['amount']
132
+ end
133
+ end
@@ -118,6 +118,22 @@ describe Killbill::Stripe::PaymentPlugin do
118
118
  refund_response.transaction_type.should == :REFUND
119
119
  end
120
120
 
121
+ it 'prevents double payments' do
122
+ payment_response = @plugin.purchase_payment(@pm.kb_account_id, @kb_payment.id, @kb_payment.transactions[0].id, @pm.kb_payment_method_id, @amount, @currency, @properties, @call_context)
123
+ payment_response.status.should eq(:PROCESSED), payment_response.gateway_error
124
+ payment_response.amount.should == @amount
125
+ payment_response.transaction_type.should == :PURCHASE
126
+
127
+ payment_response = @plugin.purchase_payment(@pm.kb_account_id, @kb_payment.id, @kb_payment.transactions[0].id, @pm.kb_payment_method_id, @amount, @currency, @properties, @call_context)
128
+ payment_response.status.should eq(:PROCESSED), payment_response.gateway_error
129
+ payment_response.amount.should == @amount
130
+ payment_response.transaction_type.should == :PURCHASE
131
+
132
+ responses = Killbill::Stripe::StripeResponse.all
133
+ responses.size.should == 2 + 1
134
+ responses[1].params_id.should == responses[2].params_id
135
+ end
136
+
121
137
  # It doesn't look like Stripe supports multiple partial captures
122
138
  #it 'should be able to auth, capture and refund' do
123
139
  # payment_response = @plugin.authorize_payment(@pm.kb_account_id, @kb_payment.id, @kb_payment.transactions[0].id, @pm.kb_payment_method_id, @amount, @currency, @properties, @call_context)
metadata CHANGED
@@ -1,86 +1,95 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: killbill-stripe
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 4.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kill Bill core team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-15 00:00:00.000000000 Z
11
+ date: 2016-11-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
+ name: killbill
15
+ version_requirements: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '8.0'
14
20
  requirement: !ruby/object:Gem::Requirement
15
21
  requirements:
16
22
  - - ~>
17
23
  - !ruby/object:Gem::Version
18
24
  version: '8.0'
19
- name: killbill
20
25
  prerelease: false
21
26
  type: :runtime
27
+ - !ruby/object:Gem::Dependency
28
+ name: sinatra
22
29
  version_requirements: !ruby/object:Gem::Requirement
23
30
  requirements:
24
31
  - - ~>
25
32
  - !ruby/object:Gem::Version
26
- version: '8.0'
27
- - !ruby/object:Gem::Dependency
33
+ version: 1.3.4
28
34
  requirement: !ruby/object:Gem::Requirement
29
35
  requirements:
30
36
  - - ~>
31
37
  - !ruby/object:Gem::Version
32
38
  version: 1.3.4
33
- name: sinatra
34
39
  prerelease: false
35
40
  type: :runtime
41
+ - !ruby/object:Gem::Dependency
42
+ name: thread_safe
36
43
  version_requirements: !ruby/object:Gem::Requirement
37
44
  requirements:
38
45
  - - ~>
39
46
  - !ruby/object:Gem::Version
40
- version: 1.3.4
41
- - !ruby/object:Gem::Dependency
47
+ version: 0.3.4
42
48
  requirement: !ruby/object:Gem::Requirement
43
49
  requirements:
44
50
  - - ~>
45
51
  - !ruby/object:Gem::Version
46
52
  version: 0.3.4
47
- name: thread_safe
48
53
  prerelease: false
49
54
  type: :runtime
55
+ - !ruby/object:Gem::Dependency
56
+ name: activerecord
50
57
  version_requirements: !ruby/object:Gem::Requirement
51
58
  requirements:
52
59
  - - ~>
53
60
  - !ruby/object:Gem::Version
54
- version: 0.3.4
55
- - !ruby/object:Gem::Dependency
61
+ version: 4.1.0
56
62
  requirement: !ruby/object:Gem::Requirement
57
63
  requirements:
58
64
  - - ~>
59
65
  - !ruby/object:Gem::Version
60
66
  version: 4.1.0
61
- name: activerecord
62
67
  prerelease: false
63
68
  type: :runtime
69
+ - !ruby/object:Gem::Dependency
70
+ name: activerecord-bogacs
64
71
  version_requirements: !ruby/object:Gem::Requirement
65
72
  requirements:
66
73
  - - ~>
67
74
  - !ruby/object:Gem::Version
68
- version: 4.1.0
69
- - !ruby/object:Gem::Dependency
75
+ version: '0.3'
70
76
  requirement: !ruby/object:Gem::Requirement
71
77
  requirements:
72
78
  - - ~>
73
79
  - !ruby/object:Gem::Version
74
80
  version: '0.3'
75
- name: activerecord-bogacs
76
81
  prerelease: false
77
82
  type: :runtime
83
+ - !ruby/object:Gem::Dependency
84
+ name: activerecord-jdbc-adapter
78
85
  version_requirements: !ruby/object:Gem::Requirement
79
86
  requirements:
80
87
  - - ~>
81
88
  - !ruby/object:Gem::Version
82
- version: '0.3'
83
- - !ruby/object:Gem::Dependency
89
+ version: '1.3'
90
+ - - <
91
+ - !ruby/object:Gem::Version
92
+ version: '1.5'
84
93
  requirement: !ruby/object:Gem::Requirement
85
94
  requirements:
86
95
  - - ~>
@@ -89,199 +98,190 @@ dependencies:
89
98
  - - <
90
99
  - !ruby/object:Gem::Version
91
100
  version: '1.5'
92
- name: activerecord-jdbc-adapter
93
101
  prerelease: false
94
102
  type: :runtime
103
+ - !ruby/object:Gem::Dependency
104
+ name: jruby-openssl
95
105
  version_requirements: !ruby/object:Gem::Requirement
96
106
  requirements:
97
107
  - - ~>
98
108
  - !ruby/object:Gem::Version
99
- version: '1.3'
100
- - - <
101
- - !ruby/object:Gem::Version
102
- version: '1.5'
103
- - !ruby/object:Gem::Dependency
109
+ version: 0.9.7
104
110
  requirement: !ruby/object:Gem::Requirement
105
111
  requirements:
106
112
  - - ~>
107
113
  - !ruby/object:Gem::Version
108
114
  version: 0.9.7
109
- name: jruby-openssl
110
115
  prerelease: false
111
116
  type: :runtime
117
+ - !ruby/object:Gem::Dependency
118
+ name: actionpack
112
119
  version_requirements: !ruby/object:Gem::Requirement
113
120
  requirements:
114
121
  - - ~>
115
122
  - !ruby/object:Gem::Version
116
- version: 0.9.7
117
- - !ruby/object:Gem::Dependency
123
+ version: 4.1.0
118
124
  requirement: !ruby/object:Gem::Requirement
119
125
  requirements:
120
126
  - - ~>
121
127
  - !ruby/object:Gem::Version
122
128
  version: 4.1.0
123
- name: actionpack
124
129
  prerelease: false
125
130
  type: :runtime
131
+ - !ruby/object:Gem::Dependency
132
+ name: actionview
126
133
  version_requirements: !ruby/object:Gem::Requirement
127
134
  requirements:
128
135
  - - ~>
129
136
  - !ruby/object:Gem::Version
130
137
  version: 4.1.0
131
- - !ruby/object:Gem::Dependency
132
138
  requirement: !ruby/object:Gem::Requirement
133
139
  requirements:
134
140
  - - ~>
135
141
  - !ruby/object:Gem::Version
136
142
  version: 4.1.0
137
- name: actionview
138
143
  prerelease: false
139
144
  type: :runtime
145
+ - !ruby/object:Gem::Dependency
146
+ name: activemerchant
140
147
  version_requirements: !ruby/object:Gem::Requirement
141
148
  requirements:
142
149
  - - ~>
143
150
  - !ruby/object:Gem::Version
144
- version: 4.1.0
145
- - !ruby/object:Gem::Dependency
151
+ version: 1.55.0
146
152
  requirement: !ruby/object:Gem::Requirement
147
153
  requirements:
148
154
  - - ~>
149
155
  - !ruby/object:Gem::Version
150
- version: 1.48.0
151
- name: activemerchant
156
+ version: 1.55.0
152
157
  prerelease: false
153
158
  type: :runtime
159
+ - !ruby/object:Gem::Dependency
160
+ name: offsite_payments
154
161
  version_requirements: !ruby/object:Gem::Requirement
155
162
  requirements:
156
163
  - - ~>
157
164
  - !ruby/object:Gem::Version
158
- version: 1.48.0
159
- - !ruby/object:Gem::Dependency
165
+ version: 2.1.0
160
166
  requirement: !ruby/object:Gem::Requirement
161
167
  requirements:
162
168
  - - ~>
163
169
  - !ruby/object:Gem::Version
164
170
  version: 2.1.0
165
- name: offsite_payments
166
171
  prerelease: false
167
172
  type: :runtime
173
+ - !ruby/object:Gem::Dependency
174
+ name: monetize
168
175
  version_requirements: !ruby/object:Gem::Requirement
169
176
  requirements:
170
177
  - - ~>
171
178
  - !ruby/object:Gem::Version
172
- version: 2.1.0
173
- - !ruby/object:Gem::Dependency
179
+ version: 1.1.0
174
180
  requirement: !ruby/object:Gem::Requirement
175
181
  requirements:
176
182
  - - ~>
177
183
  - !ruby/object:Gem::Version
178
184
  version: 1.1.0
179
- name: monetize
180
185
  prerelease: false
181
186
  type: :runtime
187
+ - !ruby/object:Gem::Dependency
188
+ name: money
182
189
  version_requirements: !ruby/object:Gem::Requirement
183
190
  requirements:
184
191
  - - ~>
185
192
  - !ruby/object:Gem::Version
186
- version: 1.1.0
187
- - !ruby/object:Gem::Dependency
193
+ version: 6.5.1
188
194
  requirement: !ruby/object:Gem::Requirement
189
195
  requirements:
190
196
  - - ~>
191
197
  - !ruby/object:Gem::Version
192
198
  version: 6.5.1
193
- name: money
194
199
  prerelease: false
195
200
  type: :runtime
201
+ - !ruby/object:Gem::Dependency
202
+ name: jbundler
196
203
  version_requirements: !ruby/object:Gem::Requirement
197
204
  requirements:
198
205
  - - ~>
199
206
  - !ruby/object:Gem::Version
200
- version: 6.5.1
201
- - !ruby/object:Gem::Dependency
207
+ version: 0.9.2
202
208
  requirement: !ruby/object:Gem::Requirement
203
209
  requirements:
204
210
  - - ~>
205
211
  - !ruby/object:Gem::Version
206
212
  version: 0.9.2
207
- name: jbundler
208
213
  prerelease: false
209
214
  type: :development
215
+ - !ruby/object:Gem::Dependency
216
+ name: rake
210
217
  version_requirements: !ruby/object:Gem::Requirement
211
218
  requirements:
212
- - - ~>
219
+ - - '>='
213
220
  - !ruby/object:Gem::Version
214
- version: 0.9.2
215
- - !ruby/object:Gem::Dependency
221
+ version: 10.0.0
216
222
  requirement: !ruby/object:Gem::Requirement
217
223
  requirements:
218
224
  - - '>='
219
225
  - !ruby/object:Gem::Version
220
226
  version: 10.0.0
221
- name: rake
222
227
  prerelease: false
223
228
  type: :development
229
+ - !ruby/object:Gem::Dependency
230
+ name: rspec
224
231
  version_requirements: !ruby/object:Gem::Requirement
225
232
  requirements:
226
- - - '>='
233
+ - - ~>
227
234
  - !ruby/object:Gem::Version
228
- version: 10.0.0
229
- - !ruby/object:Gem::Dependency
235
+ version: 2.12.0
230
236
  requirement: !ruby/object:Gem::Requirement
231
237
  requirements:
232
238
  - - ~>
233
239
  - !ruby/object:Gem::Version
234
240
  version: 2.12.0
235
- name: rspec
236
241
  prerelease: false
237
242
  type: :development
243
+ - !ruby/object:Gem::Dependency
244
+ name: jdbc-sqlite3
238
245
  version_requirements: !ruby/object:Gem::Requirement
239
246
  requirements:
240
247
  - - ~>
241
248
  - !ruby/object:Gem::Version
242
- version: 2.12.0
243
- - !ruby/object:Gem::Dependency
249
+ version: '3.7'
244
250
  requirement: !ruby/object:Gem::Requirement
245
251
  requirements:
246
252
  - - ~>
247
253
  - !ruby/object:Gem::Version
248
254
  version: '3.7'
249
- name: jdbc-sqlite3
250
255
  prerelease: false
251
256
  type: :development
257
+ - !ruby/object:Gem::Dependency
258
+ name: jdbc-mariadb
252
259
  version_requirements: !ruby/object:Gem::Requirement
253
260
  requirements:
254
261
  - - ~>
255
262
  - !ruby/object:Gem::Version
256
- version: '3.7'
257
- - !ruby/object:Gem::Dependency
263
+ version: '1.1'
258
264
  requirement: !ruby/object:Gem::Requirement
259
265
  requirements:
260
266
  - - ~>
261
267
  - !ruby/object:Gem::Version
262
268
  version: '1.1'
263
- name: jdbc-mariadb
264
269
  prerelease: false
265
270
  type: :development
271
+ - !ruby/object:Gem::Dependency
272
+ name: jdbc-postgres
266
273
  version_requirements: !ruby/object:Gem::Requirement
267
274
  requirements:
268
275
  - - ~>
269
276
  - !ruby/object:Gem::Version
270
- version: '1.1'
271
- - !ruby/object:Gem::Dependency
277
+ version: '9.4'
272
278
  requirement: !ruby/object:Gem::Requirement
273
279
  requirements:
274
280
  - - ~>
275
281
  - !ruby/object:Gem::Version
276
282
  version: '9.4'
277
- name: jdbc-postgres
278
283
  prerelease: false
279
284
  type: :development
280
- version_requirements: !ruby/object:Gem::Requirement
281
- requirements:
282
- - - ~>
283
- - !ruby/object:Gem::Version
284
- version: '9.4'
285
285
  description: Kill Bill payment plugin for Stripe.
286
286
  email: killbilling-users@googlegroups.com
287
287
  executables: []
@@ -308,6 +308,7 @@ files:
308
308
  - lib/stripe.rb
309
309
  - lib/stripe/api.rb
310
310
  - lib/stripe/application.rb
311
+ - lib/stripe/ext/active_merchant/active_merchant.rb
311
312
  - lib/stripe/models/payment_method.rb
312
313
  - lib/stripe/models/response.rb
313
314
  - lib/stripe/models/transaction.rb
@@ -317,6 +318,7 @@ files:
317
318
  - release.sh
318
319
  - spec/spec_helper.rb
319
320
  - spec/stripe/base_plugin_spec.rb
321
+ - spec/stripe/remote/connect_spec.rb
320
322
  - spec/stripe/remote/integration_spec.rb
321
323
  - stripe.yml
322
324
  homepage: http://killbill.io
@@ -345,7 +347,4 @@ rubygems_version: 2.4.6
345
347
  signing_key:
346
348
  specification_version: 4
347
349
  summary: Plugin to use Stripe as a gateway.
348
- test_files:
349
- - spec/spec_helper.rb
350
- - spec/stripe/base_plugin_spec.rb
351
- - spec/stripe/remote/integration_spec.rb
350
+ test_files: []