bankserv 0.6.8 → 0.6.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -42,6 +42,11 @@ module Bankserv
42
42
  status == "completed"
43
43
  end
44
44
 
45
+ def complete!
46
+ self.status = "completed"
47
+ save!
48
+ end
49
+
45
50
  def rejected?
46
51
  status == "rejected"
47
52
  end
@@ -14,10 +14,11 @@ module Bankserv
14
14
 
15
15
  credits = Bankserv::Credit.where(record_type: 'standard', action_date: trans.data[:transmission_date].to_date,
16
16
  amount: trans.data[:amount].to_i).where('lower(user_ref) = ?', ref.downcase).select do |credit|
17
-
18
- # account_number = trans.data[:homing_account_number] ?
17
+
18
+ branch_code = if trans.data[:homing_branch_code] == "0" then "" else trans.data[:branch_code] end
19
19
 
20
20
  credit.bank_account.account_number == trans.data[:homing_account_number] &&
21
+ credit.bank_account.branch_code == branch_code &&
21
22
  credit.bank_account.account_name.downcase == trans.data[:homing_account_name].downcase
22
23
  end
23
24
 
@@ -1,3 +1,3 @@
1
1
  module Bankserv
2
- VERSION = "0.6.8"
2
+ VERSION = "0.6.9"
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 6
8
- - 8
9
- version: 0.6.8
8
+ - 9
9
+ version: 0.6.9
10
10
  platform: ruby
11
11
  authors:
12
12
  - Jeffrey van Aswegen