op_cart 0.5.0 → 0.5.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: b2e3218ad0131f81758ccc3f33a8cc3800bb8c68
4
- data.tar.gz: 83a9efdfe925a67a27221b7f2f006191c54ef928
3
+ metadata.gz: 4ca5434d3f5d606baa79c1522cc15790b35956f7
4
+ data.tar.gz: 364fe087027256ebb9a3a0adb5e13d402f211cbd
5
5
  SHA512:
6
- metadata.gz: d77f1f76b0edf91a31c891498ffe2434e151967e3105c37153d3bd37794ceff3904b76a97a096112996143eb7890fbf1a5aceaeaf5cd268d2c7f655f57ed6a49
7
- data.tar.gz: db45bf60426be0d7669cbd356ed671e19b06678186dd7036c86d7780c67891721f837f38399b723f80be1fe456fc2f79ac3eeee8289a9b41c82cd29bce3aecb6
6
+ metadata.gz: 0348f0513e4ff0b5c6ef740a383efdddbec84dddca1bd7973e1357b390535879aa0a3ee223ee51ea3f8fc1175778202bdb3bca2e11d5533bab4973d34dcba92b
7
+ data.tar.gz: f2437c3c71122d9ed9b0a6493c427231305f34d8ead0f496685422200136870ef226abcb0eabfd1337ec8758bbc6a172306292b120239242ead93baeac4cfcf9
@@ -41,6 +41,12 @@ module OpCart
41
41
  end
42
42
  end
43
43
 
44
+ def charge_description
45
+ line_items.select {|li| li.sellable_type == "OpCart::Product" }
46
+ .map{|li| "#{li.quantity} x #{li.sellable.name}" }
47
+ .to_sentence
48
+ end
49
+
44
50
  def charge_customer
45
51
  if processor_token.present?
46
52
  customer.update_card processor_token
@@ -49,6 +55,7 @@ module OpCart
49
55
 
50
56
  self.processor_response = Stripe::Charge.create(
51
57
  amount: total,
58
+ description: charge_description,
52
59
  currency: "usd",
53
60
  customer: customer.processor_token
54
61
  ).to_hash
@@ -1,3 +1,3 @@
1
1
  module OpCart
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: op_cart
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Boehs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-10 00:00:00.000000000 Z
11
+ date: 2015-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails