starkit_banking 0.1.12 → 0.1.14

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: 6542c489c18f375f166b513161a3b18533515071
4
- data.tar.gz: 920e0a36aff60bb5b2ed251492d33027bf2c1c5d
3
+ metadata.gz: bad7978f29ad34e75116767e3395c818e164b75c
4
+ data.tar.gz: 35dac7f83da39cb0f3b92fb8fb730647818949de
5
5
  SHA512:
6
- metadata.gz: 919a4a642514dbf1ec3f5e0c0719fe4988544e95015dc50de1f048fb0946689d0cb2bc570c42b4bf6af6a7c8e94eee9b72d3df24b3788430c3584947f04f9737
7
- data.tar.gz: 5d0a7b91b3221548dea493f4bf2b15edcab3b5006f76b1676c8d16fd8c6d7699535ab6725e9813bb550e4536c65bb6b76abbac2b37a1ffd061f87068b8bff897
6
+ metadata.gz: 794fafc62fc6e485418da0ede5ba9106f013e97bc63283b31856c816fc2a88e1423f6d35a6a9f4e97f0efe55b7e0abb77e51e479922fb93822ecd4601307bdf3
7
+ data.tar.gz: 125e7047057213148b3c487a495012a10848d72b5369d8f8c0a091ef711b4ad4b5c20e489f2dcd7842597ed838688f462647ab7c32a958944d7ca75889676e0d
data/Gemfile.lock CHANGED
@@ -1,10 +1,10 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- starkit_banking (0.1.11)
4
+ starkit_banking (0.1.12)
5
5
  activerecord (~> 4.2.7)
6
6
  activesupport (~> 4.2.7)
7
- api_banking (= 0.1.22)
7
+ api_banking (= 0.1.24)
8
8
  money (= 6.7.1)
9
9
  railties (~> 4.2.7)
10
10
 
@@ -38,7 +38,7 @@ GEM
38
38
  tzinfo (~> 1.1)
39
39
  addressable (2.5.0)
40
40
  public_suffix (~> 2.0, >= 2.0.2)
41
- api_banking (0.1.22)
41
+ api_banking (0.1.24)
42
42
  money (= 6.7.1)
43
43
  nokogiri (~> 1.6.8)
44
44
  typhoeus (~> 1.1.0)
@@ -15,7 +15,7 @@ module StarkitBanking
15
15
  credentials.password,
16
16
  credentials.decrypt_client_id,
17
17
  credentials.decrypt_client_secret,
18
- credentials.client_certificate.path,
18
+ 'Quantiguous',#credentials.client_certificate.path,
19
19
  credentials.client_private_key.path,
20
20
  credentials.decrypt_client_private_key_pwd
21
21
  )
@@ -0,0 +1,50 @@
1
+ module StarkitBanking
2
+ module RBL
3
+ module Account
4
+ class GetBalance
5
+ include ApiClient
6
+
7
+ private
8
+
9
+ def service_name
10
+ 'BALANCE ENQUIRY'
11
+ end
12
+
13
+ def invoke(env, req, callbacks)
14
+ ApiBanking::GetAccountBalance.get_account_balance(env, req, callbacks)
15
+ end
16
+
17
+ def response(rep)
18
+ rep.balanceAmount
19
+ end
20
+
21
+ def credentials(payment_account)
22
+ payment_account.credentials
23
+ end
24
+
25
+ def request(subscription, payment_account)
26
+
27
+ header = ApiBanking::GetAccountBalance::ReqHeader.new()
28
+ reqBody = ApiBanking::GetAccountBalance::ReqBody.new()
29
+ request = ApiBanking::GetAccountBalance::Request.new()
30
+
31
+ header.corpID = subscription.app_id
32
+ header.approverID = payment_account.created_by
33
+
34
+ reqBody.accountNo = payment_account.account_number
35
+
36
+ request.header = header
37
+ request.body = reqBody
38
+
39
+ request
40
+ end
41
+
42
+ def subscription(payment_account)
43
+ payment_account.service_subscriptions.find_by(service_name: service_name)
44
+ end
45
+
46
+ end
47
+ end
48
+ end
49
+ end
50
+
@@ -0,0 +1,78 @@
1
+ module StarkitBanking
2
+ module RBL
3
+ module Payment
4
+ class ByFT2
5
+ include ApiClient
6
+
7
+ private
8
+
9
+ def service_name
10
+ 'FUNDS TRANSFER'
11
+ end
12
+
13
+ def invoke(env, req, callbacks)
14
+ ApiBanking::SinglePayment.transfer(env, req, callbacks)
15
+ end
16
+
17
+ def response(res)
18
+ Transfer::Status.new(res.statusCode, res.bankReferenceNo, res.transferType)
19
+ end
20
+
21
+ def credentials(payment)
22
+ payment.payment_account.credentials
23
+ end
24
+
25
+ def request(subscription, payment)
26
+
27
+ remitter = ApiBanking::SinglePayment::Remitter.new()
28
+ beneficiary = ApiBanking::SinglePayment::Beneficiary.new()
29
+ header = ApiBanking::SinglePayment::ReqHeader.new()
30
+ reqBody = ApiBanking::SinglePayment::ReqBody.new()
31
+ request = ApiBanking::SinglePayment::Request.new()
32
+
33
+ header.tranID = payment.id.to_s
34
+ header.corpID = subscription.app_id
35
+
36
+ reqBody.amount = payment.transfer_amount.to_s
37
+ reqBody.modeOfPay = payment.transfer_type
38
+ reqBody.remarks = payment.transfer_description
39
+
40
+ remitter.accountNo = payment.payment_account.account_number
41
+ remitter.accountName = payment.payment_account.bank_name
42
+
43
+ beneficiary.accountIFSC = payment.beneficiary_ifsc
44
+ beneficiary.accountNo = payment.beneficiary_account_number
45
+ beneficiary.fullName = payment.beneficiary_name
46
+ beneficiary.address = payment.beneficiary_address_line1
47
+ beneficiary.email = payment.beneficiary_email_id
48
+ beneficiary.mobileNo = payment.beneficiary_mobile_no
49
+
50
+ reqBody.remitter = remitter
51
+ reqBody.beneficiary = beneficiary
52
+
53
+ request.header = header
54
+ request.body = reqBody
55
+
56
+ request
57
+ end
58
+
59
+ def subscription(payment)
60
+ payment.payment_account.service_subscriptions.find_by(service_name: service_name)
61
+ end
62
+
63
+ def translate(element, value)
64
+ case element
65
+ when :bene_name
66
+ value.slice(0,34)
67
+ when :address_line1
68
+ value.slice(0,49)
69
+ when :transfer_description
70
+ value.slice(0,49)
71
+ end
72
+ end
73
+
74
+ end
75
+ end
76
+ end
77
+ end
78
+
@@ -0,0 +1,50 @@
1
+ module StarkitBanking
2
+ module RBL
3
+ module Payment
4
+ class GetStatus
5
+ include ApiClient
6
+
7
+ private
8
+
9
+ def service_name
10
+ 'STATUS ENQUIRY'
11
+ end
12
+
13
+ def invoke(env, req, callbacks)
14
+ ApiBanking::GetPaymentStatus.get_status(env, req, callbacks)
15
+ end
16
+
17
+ def response(res)
18
+ Transfer::Status.new(res.statusCode, res.bankReferenceNo, '')
19
+ end
20
+
21
+ def credentials(payment)
22
+ payment.payment_account.credentials
23
+ end
24
+
25
+ def request(subscription, payment)
26
+
27
+ header = ApiBanking::GetPaymentStatus::ReqHeader.new()
28
+ reqBody = ApiBanking::GetPaymentStatus::ReqBody.new()
29
+ request = ApiBanking::GetPaymentStatus::Request.new()
30
+
31
+ header.corpID = subscription.app_id
32
+ header.approverID = payment.created_by
33
+
34
+ reqBody.referenceNo = payment.id.to_s
35
+
36
+ request.header = header
37
+ request.body = reqBody
38
+
39
+ request
40
+ end
41
+
42
+ def subscription(payment)
43
+ payment.payment_account.service_subscriptions.find_by(service_name: service_name)
44
+ end
45
+
46
+ end
47
+ end
48
+ end
49
+ end
50
+
@@ -1,3 +1,3 @@
1
1
  module StarkitBanking
2
- VERSION = '0.1.12'
2
+ VERSION = '0.1.14'
3
3
  end
@@ -25,6 +25,9 @@ require_relative "starkit_banking/concerns/bank_account"
25
25
  require_relative "starkit_banking/concerns/payment"
26
26
 
27
27
  require_relative "starkit_banking/api/rbl/account/mini_statement"
28
+ require_relative "starkit_banking/api/rbl/account/balance"
29
+ require_relative "starkit_banking/api/rbl/payment/ft2"
30
+ require_relative "starkit_banking/api/rbl/payment/get_status"
28
31
 
29
32
  module StarkitBanking
30
33
  # Your code goes here...
@@ -29,5 +29,5 @@ Gem::Specification.new do |spec|
29
29
  spec.add_dependency "activesupport", "~> 4.2.7"
30
30
  spec.add_dependency "activerecord", "~> 4.2.7"
31
31
  spec.add_dependency "railties", "~> 4.2.7"
32
- spec.add_dependency "api_banking", "0.1.22"
32
+ spec.add_dependency "api_banking", "0.1.24"
33
33
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: starkit_banking
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.12
4
+ version: 0.1.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - akil
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-03-23 00:00:00.000000000 Z
11
+ date: 2017-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -156,14 +156,14 @@ dependencies:
156
156
  requirements:
157
157
  - - '='
158
158
  - !ruby/object:Gem::Version
159
- version: 0.1.22
159
+ version: 0.1.24
160
160
  type: :runtime
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - '='
165
165
  - !ruby/object:Gem::Version
166
- version: 0.1.22
166
+ version: 0.1.24
167
167
  description:
168
168
  email:
169
169
  - hello@quantiguous.com
@@ -188,7 +188,10 @@ files:
188
188
  - lib/starkit_banking/api/environment.rb
189
189
  - lib/starkit_banking/api/factory.rb
190
190
  - lib/starkit_banking/api/fault.rb
191
+ - lib/starkit_banking/api/rbl/account/balance.rb
191
192
  - lib/starkit_banking/api/rbl/account/mini_statement.rb
193
+ - lib/starkit_banking/api/rbl/payment/ft2.rb
194
+ - lib/starkit_banking/api/rbl/payment/get_status.rb
192
195
  - lib/starkit_banking/api/response.rb
193
196
  - lib/starkit_banking/api/ybl/account/balance.rb
194
197
  - lib/starkit_banking/api/ybl/account/mini_statement.rb