killbill-stripe 3.0.0 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6e2834af7f42bb34c10f9c1d0e3adfd948340bf8
4
- data.tar.gz: 4ee66a577a143ee7a6b97951dbe30d1a21e0cf35
3
+ metadata.gz: e7b3e433a4c8292863ff8d22d67b0ee7dedb3364
4
+ data.tar.gz: 91ada66fc3af004fb638736047ca8eef6a25a078
5
5
  SHA512:
6
- metadata.gz: bf3a9b76a59a1f1a83a6829b4a5e4f739ab49f2e464ae76dfcc3caff0f0e407ea6bae5be2e9e54d94bebdc0d31af8d263b3aa982c3feb0af84ff425e946d66f6
7
- data.tar.gz: 3b61e5c496f8018323696a24464b8190ed3fd47e72494c4dee63ba84775a38da4c5d72d1d811006d619d8e70907127e036a75ce67a8012b0dbdefa35e4e7d930
6
+ metadata.gz: fb6d0f472ba839f29033eb2f0b3bb83743c8328d6ec10664bd2f7c8a6681228e7e9239f86ba8e02449b735907c8d0f6db834662e9fe5db19a6922a0d9ccaec9a
7
+ data.tar.gz: 38b36d5dd96703bc00928f6a5ccb79f9a91ac9a25fe6bd9308bb244676eb2940d21e1f1cc10964c3a134cb26d9b6cf1daba98b4f52197bd475c9d79f3e4d3416
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- killbill-stripe (3.0.0)
4
+ killbill-stripe (3.0.1)
5
5
  actionpack (~> 4.1.0)
6
6
  actionview (~> 4.1.0)
7
7
  activemerchant (~> 1.48.0)
data/NEWS CHANGED
@@ -1,3 +1,6 @@
1
+ 3.0.1
2
+ https://github.com/killbill/killbill-stripe-plugin/issues/8
3
+
1
4
  3.0.0
2
5
  Initial release for Kill Bill 0.16.x
3
6
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.0.0
1
+ 3.0.1
@@ -38,7 +38,7 @@ module Killbill #:nodoc:
38
38
  :state => card_response['address_state'],
39
39
  :zip => card_response['address_zip'],
40
40
  :country => card_response['address_country']
41
- }.merge!(extra_params),
41
+ }.merge!(extra_params.compact), # Don't override with nil values
42
42
  model)
43
43
  end
44
44
 
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>3.0.0</version>
28
+ <version>3.0.1</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>
@@ -32,12 +32,28 @@ describe Killbill::Stripe::PaymentPlugin do
32
32
  end
33
33
 
34
34
  it 'should be able to create and retrieve payment methods' do
35
- pm = create_payment_method(::Killbill::Stripe::StripePaymentMethod, nil, @call_context.tenant_id)
35
+ # Override default payment method params to make sure we store the data returned by Stripe (see https://github.com/killbill/killbill-stripe-plugin/issues/8)
36
+ pm = create_payment_method(::Killbill::Stripe::StripePaymentMethod, nil, @call_context.tenant_id, [], { :cc_type => '', :cc_last_4 => '' })
36
37
 
37
38
  pms = @plugin.get_payment_methods(pm.kb_account_id, false, [], @call_context)
38
39
  pms.size.should == 1
39
40
  pms.first.external_payment_method_id.should == pm.token
40
41
 
42
+ pm_details = @plugin.get_payment_method_detail(pm.kb_account_id, pms.first.payment_method_id, [], @call_context)
43
+ pm_props = properties_to_hash(pm_details.properties)
44
+ pm_props[:ccFirstName].should == 'John'
45
+ pm_props[:ccLastName].should == 'Doe'
46
+ pm_props[:ccType].should == 'Visa'
47
+ pm_props[:ccExpirationMonth].should == '12'
48
+ pm_props[:ccExpirationYear].should == '2017'
49
+ pm_props[:ccLast4].should == '4242'
50
+ pm_props[:address1].should == '5, oakriu road'
51
+ pm_props[:address2].should == 'apt. 298'
52
+ pm_props[:city].should == 'Gdio Foia'
53
+ pm_props[:state].should == 'FL'
54
+ pm_props[:zip].should == '49302'
55
+ pm_props[:country].should == 'US'
56
+
41
57
  pm_details = @plugin.get_payment_method_detail(pm.kb_account_id, pm.kb_payment_method_id, [], @call_context)
42
58
  pm_details.external_payment_method_id.should == pm.token
43
59
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: killbill-stripe
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
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: 2015-12-18 00:00:00.000000000 Z
11
+ date: 2016-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: killbill