-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathcallback_flow.drt
212 lines (212 loc) · 12.2 KB
/
callback_flow.drt
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
ÈÑ Äðàêîí © Òûøîâ Ã.Í. A
1,,,,,22.7.2016,"Tahoma,1,10,0,0",10,,,,,A
0,1,209,,,,,
4,2,154,99,-66,-11,66,11,,1,,,"""Callback received""",,,,,0,
8,9,154,151,-66,-19,66,19,14,2,,,"""Coming from a whitelisted IP?""",,,,,0,D
6,10,154,203,-66,-11,66,11,,3,,,"""Ignore the payload""",,,,,0,
6,108,154,255,-88,-19,88,19,,4,,,"""Respond with HTTP 200"",""and empty body""",,,,,0,
36,166,154,1446,,,,,22,5,,,,,,,,0,
8,194,154,1495,-66,-27,66,27,11,6,,,"""Was there run-time PHP exception?""",,,,,0,
6,117,154,1571,-110,-27,110,27,,7,,,"""response body will be"",""{code: 5, message: """"...original exception message...""""}""",,,,,0,
8,196,154,1647,-66,-27,66,27,12,8,,,"""Config flag ENABLE_NOTIFY_EXCEPTION""",,,,,0,
6,195,154,1707,-88,-11,88,11,,9,,,"""Send email to Admin""",,,,,0,
36,199,154,1740,,,,,13,10,,,,,,,,0,
5,3,154,1773,-44,-11,44,11,,,,,End,,,,,0,
36,197,286,1495,,,,,,12,,,,,,,,0,
36,201,286,1647,,,,,,13,,,,,,,,0,
36,200,286,1740,,,,,,,,,,,,,,0,
36,12,352,151,,,,,,15,,,,,,,,0,
8,4,352,211,-66,-19,66,19,201,16,,,"""Valid, non-empty JSON object ?""",,,,,0,
8,13,352,271,-88,-19,88,19,127,17,,,"""Payload[template] == REQUEST_UPDATE ?""",,,,,0,
8,44,352,331,-88,-19,88,19,25,18,,,"""Payload[objectname] is empty ?""",,,,,0,
8,179,352,399,-66,-27,66,27,23,19,,,"""Config flag ENABLE_NOTIFY_NO_OBJ_NAME""",,,,,0,
6,180,352,459,-88,-11,88,11,,20,,,"""Send email to admin""",,,,,0,
36,184,352,492,,,,,24,21,,,,,,,,0,
6,74,352,557,-88,-43,88,43,,22,,,"""Ignore the payload and respond with HTTP 200"",""and body {code: 2, message: """"Missing object name""""}""",,,,,0,
36,112,352,1446,,,,,37,,,,,,,,,0,
36,182,462,399,,,,,,24,,,,,,,,0,
36,185,462,492,,,,,,,,,,,,,,0,
36,126,594,331,,,,,,26,,,,,,,,0,
6,17,594,391,-110,-19,110,19,,27,,,"""Search for Payload[reqid] in DB table """"tblnamesrsjobs""""""",,,,,0,
8,18,594,443,-66,-11,66,11,119,28,,,"""Match was found?""",,,,,0,
9,15,594,495,-66,-19,66,19,,29,,,"""Check the type of our API request""",,,,,0,
36,21,594,536,,,,,43,30,,,,,,,,0,
10,22,594,575,-66,-17,66,17,,31,,,"""Domain renewal""",,,,,0,
8,19,594,625,-66,-11,66,11,38,32,,,"""Status == 2000 ?""",,,,,0,
8,37,594,721,-66,-19,66,19,40,33,,,"""Substatus == 2001 ?""",,,,,0,
6,7,594,805,-88,-43,88,43,,34,,,"""Call API """"DomainDetails"""" - the function will, by the way, update ExpiryDate, NextDueDate and RegistrationDate""",,,,,0,
6,47,594,889,-66,-19,66,19,,35,,,"""Set domain to ACTIVE""",,,,,0,
36,23,594,1058,,,,,42,36,,,,,,,,0,
6,50,594,1099,-88,-19,88,19,,37,,,"""Respond with HTTP 200"",""and empty body""",,,,,0,
36,116,594,1446,,,,,116,,,,,,,,,0,
36,35,770,625,,,,,,39,,,,,,,,0,
6,36,770,669,-66,-11,66,11,,40,,,"""Ignore the payload""",,,,,0,
36,40,770,721,,,,,,41,,,,,,,,0,
6,34,770,781,-66,-19,66,19,,42,,,"""Send email to Admin""",,,,,0,
36,98,770,1058,,,,,49,,,,,,,,,0,
36,26,946,536,,,,,63,44,,,,,,,,0,
10,25,946,575,-66,-17,66,17,,45,,,"""Domain transfer""",,,,,0,
8,51,946,625,-66,-11,66,11,54,46,,,"""Status == 2000 ?""",,,,,0,
8,55,946,677,-66,-19,66,19,50,47,,,"""Substatus == 2001 ?""",,,,,0,
6,39,946,761,-88,-43,88,43,,48,,,"""Call API """"DomainDetails"""" - the function will, by the way, update ExpiryDate, NextDueDate and RegistrationDate""",,,,,0,
6,64,946,845,-66,-19,66,19,,49,,,"""Set domain to ACTIVE""",,,,,0,
36,106,946,1058,,,,,53,,,,,,,,,0,
36,57,1122,677,,,,,,51,,,,,,,,0,
8,67,1122,765,-66,-19,66,19,57,52,,,"""Substatus in (2004, 4998) ?""",,,,,0,
6,71,1122,825,-66,-19,66,19,,53,,,"""Set domain to CANCELLED""",,,,,0,
36,92,1122,1058,,,,,59,,,,,,,,,0,
36,53,1276,625,,,,,,55,,,,,,,,0,
8,24,1276,669,-66,-11,66,11,60,56,,,"""Status == 300 ?""",,,,,0,D
6,52,1276,713,-66,-11,66,11,,57,,,"""Ignore the payload""",,,,,0,
36,70,1276,765,,,,,,58,,,,,,,,0,
6,68,1276,825,-66,-19,66,19,,59,,,"""Send email to Admin""",,,,,0,
36,95,1276,1058,,,,,62,,,,,,,,,0,
36,49,1430,669,,,,,,61,,,,,,,,0,
6,109,1430,729,-66,-27,66,27,,62,,,"""Set domain to TRANSFERRED AWAY""",,,,,0,
36,41,1430,1058,,,,,68,,,,,,,,,0,
36,27,1584,536,,,,,110,64,,,,,,,,0,
10,28,1584,575,-66,-17,66,17,,65,,,"""Domain registration""",,,,,0,
8,77,1584,625,-66,-11,66,11,69,66,,,"""Status == 200 ?""",,,,,0,
36,79,1584,718,,,,,71,67,,,,,,,,0,
6,78,1584,759,-66,-19,66,19,,68,,,"""Set domain to ACTIVE""",,,,,0,
36,91,1584,1058,,,,,77,,,,,,,,,0,
36,80,1694,625,,,,,,70,,,,,,,,0,
8,83,1694,677,-88,-19,88,19,72,71,,,"""Status == 2000 and substatus == 2001 ?""",,,,,0,
36,90,1694,718,,,,,,,,,,,,,,0,
36,86,1815,677,,,,,,73,,,,,,,,0,
9,81,1815,737,-66,-19,66,19,,74,,,"""Check Payload[status]""",,,,,0,
36,100,1815,778,,,,,78,75,,,,,,,,0,
10,144,1815,817,-66,-17,66,17,,76,,,"""2,10,11,4000""",,,,,0,
6,87,1815,883,-66,-27,66,27,,77,,,"""Set domain to PENDING REGISTRATION""",,,,,0,
36,72,1815,1058,,,,,81,,,,,,,,,0,
36,148,1969,778,,,,,82,79,,,,,,,,0,
10,147,1969,817,-66,-17,66,17,,80,,,500,,,,,0,
6,32,1969,875,-66,-19,66,19,,81,,,"""Set status to EXPIRED""",,,,,0,
36,93,1969,1058,,,,,85,,,,,,,,,0,
36,89,2123,778,,,,,86,83,,,,,,,,0,
10,145,2123,817,-66,-17,66,17,,84,,,503,,,,,0,
6,59,2123,875,-66,-19,66,19,,85,,,"""Set domain to REDEMPTION""",,,,,0,
36,65,2123,1058,,,,,89,,,,,,,,,0,
36,150,2277,778,,,,,90,87,,,,,,,,0,
10,151,2277,817,-66,-17,66,17,,88,,,504,,,,,0,
6,54,2277,875,-66,-19,66,19,,89,,,"""Set domain to GRACE""",,,,,0,
36,63,2277,1058,,,,,93,,,,,,,,,0,
36,33,2431,778,,,,,94,91,,,,,,,,0,
10,42,2431,817,-66,-17,66,17,,92,,,300,,,,,0,
6,73,2431,883,-66,-27,66,27,,93,,,"""Set domain to TRANSFERRED AWAY""",,,,,0,
36,97,2431,1058,,,,,100,,,,,,,,,0,
36,48,2585,778,,,,,103,95,,,,,,,,0,
10,60,2585,817,-66,-17,66,17,,96,,,2000,,,,,0,
8,82,2585,875,-66,-19,66,19,101,97,,,"""Substatus in (4998,4999) ?""",,,,,0,
6,85,2585,935,-66,-19,66,19,,98,,,"""Set domain to CANCELLED""",,,,,0,
36,88,2585,976,,,,,102,99,,,,,,,,0,
6,96,2585,1017,-66,-19,66,19,,100,,,"""Send email to Admin""",,,,,0,
36,107,2585,1058,,,,,,,,,,,,,,0,
36,94,2684,875,,,,,,102,,,,,,,,0,
36,152,2684,976,,,,,105,,,,,,,,,0,
36,76,2739,778,,,,,106,104,,,,,,,,0,
10,84,2739,817,-66,-17,66,17,,105,,,OTHER,,,,,0,
36,14,2739,976,,,,,109,,,,,,,,,0,
36,66,2893,778,,,,,,107,,,,,,,,0,
10,69,2893,817,-66,-17,66,17,,108,,,"""0,400,4006""",,,,,0,
6,99,2893,883,-66,-27,66,27,,109,,,"""Set domain to PENDING REGISTRATION""",,,,,0,
36,111,2893,976,,,,,,,,,,,,,,0,
36,30,3069,536,,,,,,111,,,,,,,,0,
10,31,3069,575,-66,-17,66,17,,112,,,UNKNOWN,,,,,0,
8,168,3069,633,-110,-19,110,19,117,113,,,"""Config flag ENABLE_NOTIFY_UNK_REQ_TYPE""",,,,,0,
6,173,3069,685,-88,-11,88,11,,114,,,"""Send email to Admin""",,,,,0,
36,169,3069,718,,,,,118,115,,,,,,,,0,
6,6,3069,791,-88,-51,88,51,,116,,,"""Ignore the payload and"",""respond with HTTP 200"",""and body"",""{code: 6, message: """"Unknown request type in WHMCS queue""""}""",,,,,0,
36,113,3069,1446,,,,,124,,,,,,,,,0,
36,172,3212,633,,,,,,118,,,,,,,,0,
36,171,3212,718,,,,,,,,,,,,,,0,
36,20,3322,443,,,,,,120,,,,,,,,0,
8,174,3322,503,-66,-27,66,27,125,121,,,"""Config flag ENABLE_NOTIFY_MISSING_REQID""",,,,,0,
6,178,3322,563,-88,-11,88,11,,122,,,"""Send email to Admin""",,,,,0,
36,175,3322,596,,,,,126,123,,,,,,,,0,
6,140,3322,661,-88,-43,88,43,,124,,,"""Respond with HTTP 200"",""and body"",""{code: 7, message: """"Request ID was not found in WHMCS queue""""}""",,,,,0,
36,124,3322,1446,,,,,133,,,,,,,,,0,
36,177,3432,503,,,,,,126,,,,,,,,0,
36,176,3432,596,,,,,,,,,,,,,,0,
36,16,3542,271,,,,,,128,,,,,,,,0,
8,43,3542,339,-88,-27,88,27,136,129,,,"""Payload[template] == ITEM_UPDATE or ITEM_CREATED ?""",,,,,0,D
8,189,3542,415,-66,-27,66,27,134,130,,,"""Config flag ENABLE_NOTIFY_UNK_TEMPLATE""",,,,,0,
6,193,3542,475,-88,-11,88,11,,131,,,"""Send email to Admin""",,,,,0,
36,190,3542,508,,,,,135,132,,,,,,,,0,
6,142,3542,573,-88,-43,88,43,,133,,,"""Ignore the payload and respond with HTTP 200"",""and body {code: 4, message: """"Unknown template""""}""",,,,,0,
36,29,3542,1446,,,,,154,,,,,,,,,0,
36,192,3652,415,,,,,,135,,,,,,,,0,
36,191,3652,508,,,,,,,,,,,,,,0,
36,46,3762,339,,,,,,137,,,,,,,,0,
8,58,3762,407,-88,-19,88,19,163,138,,,"""Payload[itemdetails][custom_field] != 0 ?""",,,,,0,
6,122,3762,475,-88,-27,88,27,,139,,,"""Use the value of """"custom_field"""" as """"domainid"""" in WHMCS""",,,,,0,
36,130,3762,676,,,,,167,140,,,,,,,,0,
8,56,3762,725,-66,-27,66,27,157,141,,,"""Was there RenewalDate in the payload ?""",,,,,0,
6,101,3762,793,-66,-19,66,19,,142,,,"""Set ExpiryDate := RenewalDate""",,,,,0,
6,127,3762,861,-110,-27,110,27,,143,,,"""Get the value of """"DomainSyncNextDueDateDays"""" from DB table """"tblconfiguration""""""",,,,,0,
6,102,3762,929,-110,-19,110,19,,144,,,"""Set NextDueDate := RenewalDate - DomainSyncNextDueDateDays""",,,,,0,
36,61,3762,970,,,,,158,145,,,,,,,,0,
8,131,3762,1019,-66,-27,66,27,155,146,,,"""Was there Created in the payload ?""",,,,,0,
6,135,3762,1087,-88,-19,88,19,,147,,,"""Set RegistrationDate := Created""",,,,,0,
36,132,3762,1128,,,,,156,148,,,,,,,,0,
9,75,3762,1169,-66,-19,66,19,,149,,,"""Check Payload[status]""",,,,,0,
36,125,3762,1210,,,,,159,150,,,,,,,,0,
10,128,3762,1249,-66,-17,66,17,,151,,,"""200,201,202""",,,,,0,
6,45,3762,1307,-66,-19,66,19,,152,,,"""Set domain to ACTIVE""",,,,,0,
36,103,3762,1364,,,,,162,153,,,,,,,,0,
6,149,3762,1405,-88,-19,88,19,,154,,,"""Respond with HTTP 200"",""and empty body""",,,,,0,
36,146,3762,1446,,,,,191,,,,,,,,,0,
36,134,3872,1019,,,,,,156,,,,,,,,0,
36,133,3872,1128,,,,,,,,,,,,,,0,
36,62,3894,725,,,,,,158,,,,,,,,0,
36,104,3894,970,,,,,,,,,,,,,,0,
36,154,3916,1210,,,,,168,160,,,,,,,,0,
10,153,3916,1249,-66,-17,66,17,,161,,,300,,,,,0,
6,114,3916,1315,-66,-27,66,27,,162,,,"""Set domain to TRANSFERRED AWAY""",,,,,0,
36,110,3916,1364,,,,,171,,,,,,,,,0,
36,38,3960,407,,,,,,164,,,,,,,,0,
6,121,3960,491,-88,-43,88,43,,165,,,"""Search table TBLDOMAINS for the most recent record with this domain name and status != [Fraud, Cancelled]""",,,,,0,
8,118,3960,575,-66,-19,66,19,183,166,,,"""Such domain was found ?""",,,,,0,
6,123,3960,635,-66,-19,66,19,,167,,,"""Use its record ID as """"domainid""""""",,,,,0,
36,170,3960,676,,,,,,,,,,,,,,0,
36,156,4070,1210,,,,,172,169,,,,,,,,0,
10,157,4070,1249,-66,-17,66,17,,170,,,503,,,,,0,
6,119,4070,1307,-66,-19,66,19,,171,,,"""Set domain to REDEMPTION""",,,,,0,
36,115,4070,1364,,,,,175,,,,,,,,,0,
36,159,4224,1210,,,,,176,173,,,,,,,,0,
10,160,4224,1249,-66,-17,66,17,,174,,,504,,,,,0,
6,137,4224,1307,-66,-19,66,19,,175,,,"""Set domain to GRACE""",,,,,0,
36,120,4224,1364,,,,,179,,,,,,,,,0,
36,162,4378,1210,,,,,180,177,,,,,,,,0,
10,163,4378,1249,-66,-17,66,17,,178,,,500,,,,,0,
6,141,4378,1307,-66,-19,66,19,,179,,,"""Set domain to EXPIRED""",,,,,0,
36,138,4378,1364,,,,,182,,,,,,,,,0,
36,164,4532,1210,,,,,,181,,,,,,,,0,
10,165,4532,1249,-66,-17,66,17,,182,,,OTHER,,,,,0,
36,105,4532,1364,,,,,,,,,,,,,,0,
36,129,4620,575,,,,,,184,,,,,,,,0,
9,198,4620,627,-110,-11,110,11,,185,,,"""Was domain name found at all?""",,,,,0,
36,202,4620,660,,,,,194,186,,,,,,,,0,
10,203,4620,723,-66,-41,66,41,,187,,,"""WHMCS has domain name but status is either CANCELLED or FRAUD""",,,,,0,
8,181,4620,821,-66,-35,66,35,192,188,,,"""Config flag ENABLE_NOTIFY_NO_CUSTOM_FIELD""",,,,,0,
6,188,4620,889,-88,-11,88,11,,189,,,"""Send email to Admin""",,,,,0,
36,183,4620,922,,,,,193,190,,,,,,,,0,
6,11,4620,987,-88,-43,88,43,,191,,,"""Ignore the payload and "",""respond with HTTP 200"",""and body"",""{code: 3, message: """"Missing custom_field""""}""",,,,,0,
36,5,4620,1446,,,,,206,,,,,,,,,0,
36,187,4730,821,,,,,,193,,,,,,,,0,
36,186,4730,922,,,,,198,,,,,,,,,0,
36,207,4840,660,,,,,,195,,,,,,,,0,
10,206,4840,723,-66,-41,66,41,,196,,,"""Domain name not present in TBLDOMAINS""",,,,,0,
8,208,4840,813,-88,-27,88,27,199,197,,,"""Config flag ENABLE_NOTIFY_DOMAIN_NOT_FOUND""",,,,,0,
6,209,4840,881,-66,-19,66,19,,198,,,"""Send email to Admin""",,,,,0,
36,204,4840,922,,,,,200,,,,,,,,,0,
36,211,4961,813,,,,,,200,,,,,,,,0,
36,210,4961,922,,,,,,,,,,,,,,0,
36,8,4983,211,,,,,,202,,,,,,,,0,
8,143,4983,279,-88,-27,88,27,207,203,,,"""Config flag ENABLE_NOTIFY_EMPTY_CALLBACK""",,,,,0,
6,167,4983,339,-88,-11,88,11,,204,,,"""Send email to Admin""",,,,,0,
36,155,4983,372,,,,,208,205,,,,,,,,0,
6,136,4983,429,-88,-35,88,35,,206,,,"""Respond with HTTP 200"",""and body"",""{code: 1, message: """"Empty payload""""}""",,,,,0,
36,139,4983,1446,,,,,,,,,,,,,,0,
36,161,5104,279,,,,,,208,,,,,,,,0,
36,158,5104,372,,,,,,,,,,,,,,0,