forked from namesrs/whmcs2api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcallback_flow.drt
165 lines (165 loc) · 9.64 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
ÈÑ Äðàêîí © Òûøîâ Ã.Í. A
1,,,,,22.7.2016,"Tahoma,1,10,0,0",10,,,,,A
0,1,162,,,,,
4,2,154,99,-66,-11,66,11,,1,,,"""Callback received""",,,,,0,
8,9,154,151,-66,-19,66,19,7,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,1445,,,,,12,5,,,,,,,,0,
6,117,154,1502,-110,-35,110,35,,6,,,"""If there was PHP exception,"",""response body will be"",""{code: 5, message: """"...original exception message...""""}""",,,,,0,
5,3,154,1570,-44,-11,44,11,,,,,End,,,,,0,
36,12,352,151,,,,,,8,,,,,,,,0,
8,4,352,211,-66,-19,66,19,159,9,,,"""Valid, non-empty JSON object ?""",,,,,0,
8,13,352,271,-88,-19,88,19,105,10,,,"""Payload[template] == REQUEST_UPDATE ?""",,,,,0,
8,44,352,331,-88,-19,88,19,13,11,,,"""Payload[objectname] is empty ?""",,,,,0,
6,74,352,415,-88,-43,88,43,,12,,,"""Ignore the payload and respond with HTTP 200"",""and body {code: 2, message: """"Missing object name""""}""",,,,,0,
36,112,352,1445,,,,,25,,,,,,,,,0,
36,126,572,331,,,,,,14,,,,,,,,0,
6,17,572,391,-110,-19,110,19,,15,,,"""Search for Payload[reqid] in DB table """"tblnamesrsjobs""""""",,,,,0,
8,18,572,443,-66,-11,66,11,102,16,,,"""Match was found?""",,,,,0,
9,15,572,495,-66,-19,66,19,,17,,,"""Check the type of our API request""",,,,,0,
36,21,572,536,,,,,31,18,,,,,,,,0,
10,22,572,574,-66,-16,66,17,,19,,,"""Domain renewal""",,,,,0,
8,19,572,624,-66,-11,66,11,26,20,,,"""Status == 2000 ?""",,,,,0,
8,37,572,720,-66,-19,66,19,28,21,,,"""Substatus == 2001 ?""",,,,,0,
6,7,572,804,-88,-43,88,43,,22,,,"""Call API """"DomainDetails"""" - the function will, by the way, update ExpiryDate, NextDueDate and RegistrationDate""",,,,,0,
6,47,572,888,-66,-19,66,19,,23,,,"""Set domain to ACTIVE""",,,,,0,
36,23,572,1056,,,,,30,24,,,,,,,,0,
6,50,572,1097,-88,-19,88,19,,25,,,"""Respond with HTTP 200"",""and empty body""",,,,,0,
36,116,572,1445,,,,,101,,,,,,,,,0,
36,35,748,624,,,,,,27,,,,,,,,0,
6,36,748,668,-66,-11,66,11,,28,,,"""Ignore the payload""",,,,,0,
36,40,748,720,,,,,,29,,,,,,,,0,
6,34,748,780,-66,-19,66,19,,30,,,"""Send email to Admin""",,,,,0,
36,98,748,1056,,,,,37,,,,,,,,,0,
36,26,924,536,,,,,51,32,,,,,,,,0,
10,25,924,574,-66,-16,66,17,,33,,,"""Domain transfer""",,,,,0,
8,51,924,624,-66,-11,66,11,42,34,,,"""Status == 2000 ?""",,,,,0,
8,55,924,676,-66,-19,66,19,38,35,,,"""Substatus == 2001 ?""",,,,,0,
6,39,924,760,-88,-43,88,43,,36,,,"""Call API """"DomainDetails"""" - the function will, by the way, update ExpiryDate, NextDueDate and RegistrationDate""",,,,,0,
6,64,924,844,-66,-19,66,19,,37,,,"""Set domain to ACTIVE""",,,,,0,
36,106,924,1056,,,,,41,,,,,,,,,0,
36,57,1100,676,,,,,,39,,,,,,,,0,
8,67,1100,764,-66,-19,66,19,45,40,,,"""Substatus in (2004, 4998) ?""",,,,,0,
6,71,1100,824,-66,-19,66,19,,41,,,"""Set domain to CANCELLED""",,,,,0,
36,92,1100,1056,,,,,47,,,,,,,,,0,
36,53,1254,624,,,,,,43,,,,,,,,0,
8,24,1254,668,-66,-11,66,11,48,44,,,"""Status == 300 ?""",,,,,0,D
6,52,1254,712,-66,-11,66,11,,45,,,"""Ignore the payload""",,,,,0,
36,70,1254,764,,,,,,46,,,,,,,,0,
6,68,1254,824,-66,-19,66,19,,47,,,"""Send email to Admin""",,,,,0,
36,95,1254,1056,,,,,50,,,,,,,,,0,
36,49,1408,668,,,,,,49,,,,,,,,0,
6,109,1408,728,-66,-27,66,27,,50,,,"""Set domain to TRANSFERRED AWAY""",,,,,0,
36,41,1408,1056,,,,,56,,,,,,,,,0,
36,27,1562,536,,,,,98,52,,,,,,,,0,
10,28,1562,574,-66,-16,66,17,,53,,,"""Domain registration""",,,,,0,
8,77,1562,624,-66,-11,66,11,57,54,,,"""Status == 200 ?""",,,,,0,
36,79,1562,717,,,,,59,55,,,,,,,,0,
6,78,1562,758,-66,-19,66,19,,56,,,"""Set domain to ACTIVE""",,,,,0,
36,91,1562,1056,,,,,65,,,,,,,,,0,
36,80,1672,624,,,,,,58,,,,,,,,0,
8,83,1672,676,-88,-19,88,19,60,59,,,"""Status == 2000 and substatus == 2001 ?""",,,,,0,
36,90,1672,717,,,,,,,,,,,,,,0,
36,86,1793,676,,,,,,61,,,,,,,,0,
9,81,1793,736,-66,-19,66,19,,62,,,"""Check Payload[status]""",,,,,0,
36,100,1793,777,,,,,66,63,,,,,,,,0,
10,144,1793,815,-66,-16,66,17,,64,,,"""2,10,11,4000""",,,,,0,
6,87,1793,881,-66,-27,66,27,,65,,,"""Set domain to PENDING REGISTRATION""",,,,,0,
36,72,1793,1056,,,,,69,,,,,,,,,0,
36,148,1947,777,,,,,70,67,,,,,,,,0,
10,147,1947,815,-66,-16,66,17,,68,,,500,,,,,0,
6,32,1947,873,-66,-19,66,19,,69,,,"""Set status to EXPIRED""",,,,,0,
36,93,1947,1056,,,,,73,,,,,,,,,0,
36,89,2101,777,,,,,74,71,,,,,,,,0,
10,145,2101,815,-66,-16,66,17,,72,,,503,,,,,0,
6,59,2101,873,-66,-19,66,19,,73,,,"""Set domain to REDEMPTION""",,,,,0,
36,65,2101,1056,,,,,77,,,,,,,,,0,
36,150,2255,777,,,,,78,75,,,,,,,,0,
10,151,2255,815,-66,-16,66,17,,76,,,504,,,,,0,
6,54,2255,873,-66,-19,66,19,,77,,,"""Set domain to GRACE""",,,,,0,
36,63,2255,1056,,,,,81,,,,,,,,,0,
36,33,2409,777,,,,,82,79,,,,,,,,0,
10,42,2409,815,-66,-16,66,17,,80,,,300,,,,,0,
6,73,2409,881,-66,-27,66,27,,81,,,"""Set domain to TRANSFERRED AWAY""",,,,,0,
36,97,2409,1056,,,,,88,,,,,,,,,0,
36,48,2563,777,,,,,91,83,,,,,,,,0,
10,60,2563,815,-66,-16,66,17,,84,,,2000,,,,,0,
8,82,2563,873,-66,-19,66,19,89,85,,,"""Substatus in (4998,4999) ?""",,,,,0,
6,85,2563,933,-66,-19,66,19,,86,,,"""Set domain to CANCELLED""",,,,,0,
36,88,2563,974,,,,,90,87,,,,,,,,0,
6,96,2563,1015,-66,-19,66,19,,88,,,"""Send email to Admin""",,,,,0,
36,107,2563,1056,,,,,,,,,,,,,,0,
36,94,2662,873,,,,,,90,,,,,,,,0,
36,152,2662,974,,,,,93,,,,,,,,,0,
36,76,2717,777,,,,,94,92,,,,,,,,0,
10,84,2717,815,-66,-16,66,17,,93,,,OTHER,,,,,0,
36,14,2717,974,,,,,97,,,,,,,,,0,
36,66,2871,777,,,,,,95,,,,,,,,0,
10,69,2871,815,-66,-16,66,17,,96,,,"""0,400,4006""",,,,,0,
6,99,2871,881,-66,-27,66,27,,97,,,"""Set domain to PENDING REGISTRATION""",,,,,0,
36,111,2871,974,,,,,,,,,,,,,,0,
36,30,2959,536,,,,,,99,,,,,,,,0,
10,31,2959,574,-66,-16,66,17,,100,,,UNKNOWN,,,,,0,
6,6,2959,664,-88,-51,88,51,,101,,,"""Ignore the payload and"",""respond with HTTP 200"",""and body"",""{code: 6, message: """"Unknown request type in WHMCS queue""""}""",,,,,0,
36,113,2959,1445,,,,,104,,,,,,,,,0,
36,20,3135,443,,,,,,103,,,,,,,,0,
6,140,3135,535,-66,-59,66,59,,104,,,"""Respond with HTTP 200"",""and body"",""{code: 7, message: """"Request ID was not found in WHMCS queue""""}""",,,,,0,
36,124,3135,1445,,,,,108,,,,,,,,,0,
36,16,3311,271,,,,,,106,,,,,,,,0,
8,43,3311,339,-88,-27,88,27,109,107,,,"""Payload[template] == ITEM_UPDATE or ITEM_CREATED ?""",,,,,0,D
6,142,3311,431,-88,-43,88,43,,108,,,"""Ignore the payload and respond with HTTP 200"",""and body {code: 4, message: """"Unknown template""""}""",,,,,0,
36,29,3311,1445,,,,,127,,,,,,,,,0,
36,46,3509,339,,,,,,110,,,,,,,,0,
8,58,3509,407,-88,-19,88,19,136,111,,,"""Payload[itemdetails][custom_field] != 0 ?""",,,,,0,
6,122,3509,475,-88,-27,88,27,,112,,,"""Use the value of """"custom_field"""" as """"domainid"""" in WHMCS""",,,,,0,
36,130,3509,676,,,,,140,113,,,,,,,,0,
8,56,3509,725,-66,-27,66,27,130,114,,,"""Was there RenewalDate in the payload ?""",,,,,0,
6,101,3509,793,-66,-19,66,19,,115,,,"""Set ExpiryDate := RenewalDate""",,,,,0,
6,127,3509,861,-110,-27,110,27,,116,,,"""Get the value of """"DomainSyncNextDueDateDays"""" from DB table """"tblconfiguration""""""",,,,,0,
6,102,3509,929,-110,-19,110,19,,117,,,"""Set NextDueDate := RenewalDate - DomainSyncNextDueDateDays""",,,,,0,
36,61,3509,970,,,,,131,118,,,,,,,,0,
8,131,3509,1019,-66,-27,66,27,128,119,,,"""Was there Created in the payload ?""",,,,,0,
6,135,3509,1087,-88,-19,88,19,,120,,,"""Set RegistrationDate := Created""",,,,,0,
36,132,3509,1128,,,,,129,121,,,,,,,,0,
9,75,3509,1169,-66,-19,66,19,,122,,,"""Check Payload[status]""",,,,,0,
36,125,3509,1210,,,,,132,123,,,,,,,,0,
10,128,3509,1248,-66,-16,66,17,,124,,,"""200,201,202""",,,,,0,
6,45,3509,1306,-66,-19,66,19,,125,,,"""Set domain to ACTIVE""",,,,,0,
36,103,3509,1363,,,,,135,126,,,,,,,,0,
6,149,3509,1404,-88,-19,88,19,,127,,,"""Respond with HTTP 200"",""and empty body""",,,,,0,
36,146,3509,1445,,,,,158,,,,,,,,,0,
36,134,3619,1019,,,,,,129,,,,,,,,0,
36,133,3619,1128,,,,,,,,,,,,,,0,
36,62,3641,725,,,,,,131,,,,,,,,0,
36,104,3641,970,,,,,,,,,,,,,,0,
36,154,3663,1210,,,,,141,133,,,,,,,,0,
10,153,3663,1248,-66,-16,66,17,,134,,,300,,,,,0,
6,114,3663,1314,-66,-27,66,27,,135,,,"""Set domain to TRANSFERRED AWAY""",,,,,0,
36,110,3663,1363,,,,,144,,,,,,,,,0,
36,38,3707,407,,,,,,137,,,,,,,,0,
6,121,3707,491,-88,-43,88,43,,138,,,"""Search table TBLDOMAINS for the most recent record with this domain name and status != [Fraud, Cancelled]""",,,,,0,
8,118,3707,575,-66,-19,66,19,156,139,,,"""Such domain was found ?""",,,,,0,
6,123,3707,635,-66,-19,66,19,,140,,,"""Use its record ID as """"domainid""""""",,,,,0,
36,170,3707,676,,,,,,,,,,,,,,0,
36,156,3817,1210,,,,,145,142,,,,,,,,0,
10,157,3817,1248,-66,-16,66,17,,143,,,503,,,,,0,
6,119,3817,1306,-66,-19,66,19,,144,,,"""Set domain to REDEMPTION""",,,,,0,
36,115,3817,1363,,,,,148,,,,,,,,,0,
36,159,3971,1210,,,,,149,146,,,,,,,,0,
10,160,3971,1248,-66,-16,66,17,,147,,,504,,,,,0,
6,137,3971,1306,-66,-19,66,19,,148,,,"""Set domain to GRACE""",,,,,0,
36,120,3971,1363,,,,,152,,,,,,,,,0,
36,162,4125,1210,,,,,153,150,,,,,,,,0,
10,163,4125,1248,-66,-16,66,17,,151,,,500,,,,,0,
6,141,4125,1306,-66,-19,66,19,,152,,,"""Set domain to EXPIRED""",,,,,0,
36,138,4125,1363,,,,,155,,,,,,,,,0,
36,164,4279,1210,,,,,,154,,,,,,,,0,
10,165,4279,1248,-66,-16,66,17,,155,,,OTHER,,,,,0,
36,105,4279,1363,,,,,,,,,,,,,,0,
36,129,4367,575,,,,,,157,,,,,,,,0,
6,11,4367,659,-88,-43,88,43,,158,,,"""Ignore the payload and "",""respond with HTTP 200"",""and body"",""{code: 3, message: """"Missing custom_field""""}""",,,,,0,
36,5,4367,1445,,,,,161,,,,,,,,,0,
36,8,4477,211,,,,,,160,,,,,,,,0,
6,136,4477,287,-88,-35,88,35,,161,,,"""Respond with HTTP 200"",""and body"",""{code: 1, message: """"Empty payload""""}""",,,,,0,
36,139,4477,1445,,,,,,,,,,,,,,0,