api_banking 0.1.23 → 0.1.24
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/api_banking/json/singlePayment.rb +34 -42
- data/lib/api_banking/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 33dc926a549996c98287b0b11a178135aac9f574
|
4
|
+
data.tar.gz: b04f18b0e3c3d09cc9eb0c90c67d866d6676d622
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 344f7a5c359dcde366e9f6b75629aafe54f2581b22ad7aea10d2ab9258eef935e8fbac6ceac81842f73939f494b4c8ee0975361a3b36209c72b9b7c8e017cd92
|
7
|
+
data.tar.gz: b61a4bc8737d5eee16244f329957be2300f892d827e72e3fc87e3000d3d8f2ff44d5ce40125e9b301c521d2469c275a6cb146224151f57b8c8e59604fc6410e0
|
@@ -5,12 +5,13 @@ module ApiBanking
|
|
5
5
|
|
6
6
|
attr_accessor :request, :result
|
7
7
|
|
8
|
-
|
9
|
-
Remitter = Struct.new(:accountNo, :accountName
|
10
|
-
Beneficiary = Struct.new(:
|
11
|
-
|
8
|
+
ReqHeader = Struct.new(:tranID, :corpID, :approverID)
|
9
|
+
Remitter = Struct.new(:accountNo, :accountName)
|
10
|
+
Beneficiary = Struct.new(:accountIFSC, :accountNo, :fullName, :address, :email, :mobileNo)
|
11
|
+
ReqBody = Struct.new(:amount, :remitter, :beneficiary, :modeOfPay, :remarks)
|
12
|
+
Request = Struct.new(:header, :body)
|
12
13
|
|
13
|
-
Result = Struct.new(:
|
14
|
+
Result = Struct.new(:statusCode, :bankReferenceNo, :transferType)
|
14
15
|
|
15
16
|
class << self
|
16
17
|
attr_accessor :configuration
|
@@ -31,53 +32,44 @@ module ApiBanking
|
|
31
32
|
dataHash[:Single_Payment_Corp_Req][:Header] = {}
|
32
33
|
dataHash[:Single_Payment_Corp_Req][:Body] = {}
|
33
34
|
|
34
|
-
dataHash[:Single_Payment_Corp_Req][:Header][:TranID] = request.
|
35
|
-
dataHash[:Single_Payment_Corp_Req][:Header][:Corp_ID] = request.corpID
|
36
|
-
dataHash[:Single_Payment_Corp_Req][:Header][:Maker_ID] =
|
37
|
-
dataHash[:Single_Payment_Corp_Req][:Header][:Checker_ID] =
|
38
|
-
dataHash[:Single_Payment_Corp_Req][:Header][:Approver_ID] =
|
39
|
-
|
40
|
-
dataHash[:Single_Payment_Corp_Req][:Body][:Amount] = request.amount
|
41
|
-
dataHash[:Single_Payment_Corp_Req][:Body][:Debit_Acct_No] = request.remitter.accountNo
|
42
|
-
dataHash[:Single_Payment_Corp_Req][:Body][:Debit_Acct_Name] = request.remitter.accountName
|
43
|
-
|
44
|
-
dataHash[:Single_Payment_Corp_Req][:Body][:
|
45
|
-
dataHash[:Single_Payment_Corp_Req][:Body][:
|
46
|
-
dataHash[:Single_Payment_Corp_Req][:Body][:
|
47
|
-
|
48
|
-
dataHash[:Single_Payment_Corp_Req][:Body][:
|
49
|
-
dataHash[:Single_Payment_Corp_Req][:Body][:
|
50
|
-
dataHash[:Single_Payment_Corp_Req][:Body][:
|
51
|
-
dataHash[:Single_Payment_Corp_Req][:Body][:
|
52
|
-
|
53
|
-
dataHash
|
54
|
-
dataHash[:Single_Payment_Corp_Req][:Body][:Ben_BranchCd] = request.beneficiary.branchCode
|
55
|
-
dataHash[:Single_Payment_Corp_Req][:Body][:Ben_Email] = request.beneficiary.email
|
56
|
-
dataHash[:Single_Payment_Corp_Req][:Body][:Ben_Mobile] = request.beneficiary.mobileNo
|
57
|
-
dataHash[:Single_Payment_Corp_Req][:Body][:Ben_TrnParticulars] = request.beneficiary.tranParticulars
|
58
|
-
dataHash[:Single_Payment_Corp_Req][:Body][:Ben_PartTrnRmks] = request.beneficiary.partTranRemarks
|
59
|
-
dataHash[:Single_Payment_Corp_Req][:Body][:Issue_BranchCd] = request.issueBranchCode
|
60
|
-
dataHash[:Single_Payment_Corp_Req][:Body][:Mode_of_Pay] = request.modeOfPay
|
61
|
-
dataHash[:Single_Payment_Corp_Req][:Body][:Remarks] = request.remarks
|
62
|
-
dataHash[:Single_Payment_Corp_Req][:Body][:RptCode] = request.rptCode
|
63
|
-
|
35
|
+
dataHash[:Single_Payment_Corp_Req][:Header][:TranID] = request.header.tranID
|
36
|
+
dataHash[:Single_Payment_Corp_Req][:Header][:Corp_ID] = request.header.corpID
|
37
|
+
dataHash[:Single_Payment_Corp_Req][:Header][:Maker_ID] = ''
|
38
|
+
dataHash[:Single_Payment_Corp_Req][:Header][:Checker_ID] = ''
|
39
|
+
dataHash[:Single_Payment_Corp_Req][:Header][:Approver_ID] = ''
|
40
|
+
|
41
|
+
dataHash[:Single_Payment_Corp_Req][:Body][:Amount] = request.body.amount
|
42
|
+
dataHash[:Single_Payment_Corp_Req][:Body][:Debit_Acct_No] = request.body.remitter.accountNo
|
43
|
+
dataHash[:Single_Payment_Corp_Req][:Body][:Debit_Acct_Name] = request.body.remitter.accountName
|
44
|
+
|
45
|
+
dataHash[:Single_Payment_Corp_Req][:Body][:Ben_IFSC] = request.body.beneficiary.accountIFSC
|
46
|
+
dataHash[:Single_Payment_Corp_Req][:Body][:Ben_Acct_No] = request.body.beneficiary.accountNo
|
47
|
+
dataHash[:Single_Payment_Corp_Req][:Body][:Ben_Name] = request.body.beneficiary.fullName
|
48
|
+
dataHash[:Single_Payment_Corp_Req][:Body][:Ben_Address] = request.body.beneficiary.address
|
49
|
+
dataHash[:Single_Payment_Corp_Req][:Body][:Ben_Email] = request.body.beneficiary.email
|
50
|
+
dataHash[:Single_Payment_Corp_Req][:Body][:Ben_Mobile] = request.body.beneficiary.mobileNo
|
51
|
+
dataHash[:Single_Payment_Corp_Req][:Body][:Mode_of_Pay] = request.body.modeOfPay
|
52
|
+
dataHash[:Single_Payment_Corp_Req][:Body][:Remarks] = request.body.remarks
|
53
|
+
|
54
|
+
puts dataHash
|
64
55
|
|
65
56
|
reply = do_remote_call(env, dataHash, callbacks)
|
66
57
|
|
67
|
-
parse_reply(
|
58
|
+
parse_reply(reply, request.body.modeOfPay)
|
68
59
|
end
|
69
60
|
|
70
61
|
|
71
62
|
private
|
72
63
|
|
73
|
-
def self.parse_reply(
|
64
|
+
def self.parse_reply(reply, transferType)
|
74
65
|
if reply.kind_of?Fault
|
75
|
-
|
66
|
+
reply
|
76
67
|
else
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
68
|
+
SinglePayment::Result.new(
|
69
|
+
reply['Single_Payment_Corp_Resp']['Header']['Status'],
|
70
|
+
reply['Single_Payment_Corp_Resp']['Body']['UTRNo'],
|
71
|
+
transferType
|
72
|
+
)
|
81
73
|
end
|
82
74
|
end
|
83
75
|
|
data/lib/api_banking/version.rb
CHANGED