/
pg-service-persister.yml
147 lines (90 loc) · 4.23 KB
/
pg-service-persister.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
serviceMaps:
serviceName: PaymentGateway
mappings:
- version: 1.0
name: pg-service
description: Persists transactions
fromTopic: save-pg-txns
isTransaction: true
queryMaps:
- query: INSERT INTO eg_pg_transactions (txn_id, txn_amount, txn_status, txn_status_msg, gateway, consumer_code, bill_id, product_info, user_uuid, user_name, mobile_number, email_id, name, user_tenant_id, tenant_id, gateway_txn_id, gateway_payment_mode, gateway_status_code, gateway_status_msg, receipt, additional_details, created_by, created_time, last_modified_by, last_modified_time) VALUES (?, ?::numeric, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);
basePath: Transaction
jsonMaps:
- jsonPath: $.Transaction.txnId
- jsonPath: $.Transaction.txnAmount
- jsonPath: $.Transaction.txnStatus
- jsonPath: $.Transaction.txnStatusMsg
- jsonPath: $.Transaction.gateway
- jsonPath: $.Transaction.consumerCode
- jsonPath: $.Transaction.billId
- jsonPath: $.Transaction.productInfo
- jsonPath: $.Transaction.user.uuid
- jsonPath: $.Transaction.user.userName
- jsonPath: $.Transaction.user.mobileNumber
- jsonPath: $.Transaction.user.emailId
- jsonPath: $.Transaction.user.name
- jsonPath: $.Transaction.user.tenantId
- jsonPath: $.Transaction.tenantId
- jsonPath: $.Transaction.gatewayTxnId
- jsonPath: $.Transaction.gatewayPaymentMode
- jsonPath: $.Transaction.gatewayStatusCode
- jsonPath: $.Transaction.gatewayStatusMsg
- jsonPath: $.Transaction.receipt
- jsonPath: $.Transaction.additionalDetails
type: JSON
dbType: JSONB
- jsonPath: $.Transaction.auditDetails.createdBy
- jsonPath: $.Transaction.auditDetails.createdTime
- jsonPath: $.Transaction.auditDetails.lastModifiedBy
- jsonPath: $.Transaction.auditDetails.lastModifiedTime
- version: 1.0
name: pg-service
description: Persists transaction requests / response to and from gateways
fromTopic: save-pg-txns-dump
isTransaction: true
queryMaps:
- query: INSERT INTO eg_pg_transactions_dump (txn_id, txn_request, txn_response, created_by, created_time, last_modified_by, last_modified_time) VALUES (?, ?, ?, ?, ?, ?, ?);
basePath: TransactionDump
jsonMaps:
- jsonPath: $.TransactionDump.txnId
- jsonPath: $.TransactionDump.txnRequest
- jsonPath: $.TransactionDump.txnResponse
type: JSON
dbType: JSONB
- jsonPath: $.TransactionDump.auditDetails.createdBy
- jsonPath: $.TransactionDump.auditDetails.createdTime
- jsonPath: $.TransactionDump.auditDetails.lastModifiedBy
- jsonPath: $.TransactionDump.auditDetails.lastModifiedTime
- version: 1.0
description: Update transaction
fromTopic: update-pg-txns
isTransaction: true
queryMaps:
- query: UPDATE eg_pg_transactions SET txn_status=?, txn_status_msg=?, gateway_txn_id=?,gateway_payment_mode=?,gateway_status_code=?, gateway_status_msg=?, receipt=?, last_modified_by=?, last_modified_time=? where txn_id=? AND tenant_id=?;
basePath: Transaction
jsonMaps:
- jsonPath: $.Transaction.txnStatus
- jsonPath: $.Transaction.txnStatusMsg
- jsonPath: $.Transaction.gatewayTxnId
- jsonPath: $.Transaction.gatewayPaymentMode
- jsonPath: $.Transaction.gatewayStatusCode
- jsonPath: $.Transaction.gatewayStatusMsg
- jsonPath: $.Transaction.receipt
- jsonPath: $.Transaction.auditDetails.lastModifiedBy
- jsonPath: $.Transaction.auditDetails.lastModifiedTime
- jsonPath: $.Transaction.txnId
- jsonPath: $.Transaction.tenantId
- version: 1.0
description: Update transaction dump
fromTopic: update-pg-txns-dump
isTransaction: true
queryMaps:
- query: UPDATE eg_pg_transactions_dump SET txn_response=?, last_modified_by=?, last_modified_time=? where txn_id=? ;
basePath: TransactionDump
jsonMaps:
- jsonPath: $.TransactionDump.txnResponse
type: JSON
dbType: JSONB
- jsonPath: $.TransactionDump.auditDetails.lastModifiedBy
- jsonPath: $.TransactionDump.auditDetails.lastModifiedTime
- jsonPath: $.TransactionDump.txnId