offsite_payments 2.6.2 → 2.6.3

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: 3b8d4512405d3d3fc5c7b8604888b8a40ee6f0fe
4
- data.tar.gz: a622aaa06cb673bcb061c038c0bef9c7480f18b3
3
+ metadata.gz: 87c7fc8d1a740a6e961414c6d7ff75aa9c329164
4
+ data.tar.gz: 02dadce5d17d6cd2b7805fc6e42ebe23fc7c2306
5
5
  SHA512:
6
- metadata.gz: 77fd2790f3827e15315dbdd4c9dc63e74b1a0371ebb14290c727add4d20da190f34dae4560090db451f991c86c12772fa4bd2da53d7a87f25d87ad4b71c3f445
7
- data.tar.gz: c08bdc48d71f10cf746875b50a25a2c277ab1da4e474c54055ad4e89bfa529abad1a935002d89458151f3df24690e2440211fad3e14c0f56c254b8b8c1b4e8b0
6
+ metadata.gz: f8cadc83a386bdd0b9851f373a0a743f73618180e944caeabfa6f39d518d2b992da8c40489a3ab0edb21e65bb1796b509f1d67d113988a56bbe17b22880bf35a
7
+ data.tar.gz: aae420cc67d1a0c7e943ccf989203b81423860b81e8f9d2d3209a4f7172d7c14b54ae6febfb50842fd3615054eb47a81dfa72a5d0d862b538294dd31e3c3dae0
@@ -117,7 +117,8 @@ module OffsitePayments #:nodoc:
117
117
 
118
118
  # Order amount should be equal to gross - discount
119
119
  def amount_ok?( order_amount, order_discount = BigDecimal.new( '0.0' ) )
120
- BigDecimal.new( original_gross ) == order_amount && discount.to_d == order_discount
120
+ parsed_discount = discount.nil? ? 0.to_d : discount.to_d
121
+ BigDecimal.new( original_gross ) == order_amount && parsed_discount == order_discount
121
122
  end
122
123
 
123
124
  # Status of transaction return from the PayU. List of possible values:
@@ -1,3 +1,3 @@
1
1
  module OffsitePayments
2
- VERSION = "2.6.2"
2
+ VERSION = "2.6.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: offsite_payments
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.2
4
+ version: 2.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Luetke
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-30 00:00:00.000000000 Z
11
+ date: 2017-11-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport