| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package IO::EPP::CNic; |
|
2
|
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=encoding utf8 |
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=head1 NAME |
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
IO::EPP::CNic |
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
use IO::EPP::CNic; |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
# Parameters for IO::Socket::SSL |
|
14
|
|
|
|
|
|
|
my %sock_params = ( |
|
15
|
|
|
|
|
|
|
PeerHost => 'epp.centralnic.com', |
|
16
|
|
|
|
|
|
|
PeerPort => 700, |
|
17
|
|
|
|
|
|
|
SSL_key_file => 'key_file.pem', |
|
18
|
|
|
|
|
|
|
SSL_cert_file => 'cert_file.pem', |
|
19
|
|
|
|
|
|
|
Timeout => 30, |
|
20
|
|
|
|
|
|
|
); |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
# Create object, get greeting and call login() |
|
23
|
|
|
|
|
|
|
my $conn = IO::EPP::CNic->new( { |
|
24
|
|
|
|
|
|
|
user => 'H1234567', |
|
25
|
|
|
|
|
|
|
pass => 'XXXXXXXX', |
|
26
|
|
|
|
|
|
|
sock_params => \%sock_params, |
|
27
|
|
|
|
|
|
|
test_mode => 0, # real connect |
|
28
|
|
|
|
|
|
|
} ); |
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
# Check domain |
|
31
|
|
|
|
|
|
|
my ( $answ, $code, $msg ) = $conn->check_domains( { domains => [ 'xyz.xyz' ] } ); |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
# Call logout() and destroy object |
|
34
|
|
|
|
|
|
|
undef $conn; |
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
Work with CentralNic APP API, |
|
39
|
|
|
|
|
|
|
Overrides the IO::EPP::Base functions where the provider has supplemented the standard |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
The main documentation is in https://registrar-console.centralnic.com/doc/operations-manual-3.2.6.pdf |
|
42
|
|
|
|
|
|
|
Other see on https://registrar-console.centralnic.com/support/documentation |
|
43
|
|
|
|
|
|
|
(Authorization required) |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=cut |
|
46
|
|
|
|
|
|
|
|
|
47
|
1
|
|
|
1
|
|
148696
|
use IO::EPP::Base; |
|
|
1
|
|
|
|
|
5
|
|
|
|
1
|
|
|
|
|
60
|
|
|
48
|
1
|
|
|
1
|
|
8
|
use parent qw( IO::EPP::Base ); |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
10
|
|
|
49
|
|
|
|
|
|
|
|
|
50
|
1
|
|
|
1
|
|
67
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
20
|
|
|
51
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
1429
|
|
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
sub make_request { |
|
55
|
1
|
|
|
1
|
1
|
492
|
my ( $action, $params ) = @_; |
|
56
|
|
|
|
|
|
|
|
|
57
|
1
|
|
|
|
|
2
|
my ( $self, $code, $msg, $answ ); |
|
58
|
|
|
|
|
|
|
|
|
59
|
1
|
50
|
|
|
|
4
|
unless ( $params->{conn} ) { |
|
60
|
1
|
|
50
|
|
|
4
|
$params->{sock_params}{PeerHost} ||= 'epp.centralnic.com'; |
|
61
|
1
|
|
50
|
|
|
3
|
$params->{sock_params}{PeerPort} ||= 700; |
|
62
|
|
|
|
|
|
|
|
|
63
|
1
|
|
|
|
|
7
|
( $self, $code, $msg ) = __PACKAGE__->new( $params ); |
|
64
|
|
|
|
|
|
|
|
|
65
|
1
|
50
|
33
|
|
|
7
|
unless ( $code and $code == 1000 ) { |
|
66
|
0
|
|
|
|
|
0
|
goto END_MR; |
|
67
|
|
|
|
|
|
|
} |
|
68
|
|
|
|
|
|
|
} |
|
69
|
|
|
|
|
|
|
else { |
|
70
|
0
|
|
|
|
|
0
|
$self = $params->{conn}; |
|
71
|
|
|
|
|
|
|
} |
|
72
|
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
|
|
74
|
1
|
|
|
|
|
3
|
$self->{critical_error} = ''; |
|
75
|
|
|
|
|
|
|
|
|
76
|
1
|
50
|
|
|
|
11
|
if ( $self->can( $action ) ) { |
|
77
|
1
|
|
|
|
|
5
|
( $answ, $code, $msg ) = $self->$action( $params ); |
|
78
|
|
|
|
|
|
|
} |
|
79
|
|
|
|
|
|
|
else { |
|
80
|
0
|
|
|
|
|
0
|
$msg = "undefined command <$action>, request cancelled"; |
|
81
|
0
|
|
|
|
|
0
|
$code = 0; |
|
82
|
|
|
|
|
|
|
|
|
83
|
0
|
|
|
|
|
0
|
goto END_MR; |
|
84
|
|
|
|
|
|
|
} |
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
END_MR: |
|
87
|
|
|
|
|
|
|
|
|
88
|
1
|
50
|
|
|
|
5
|
$msg .= '; ' . $self->{critical_error} if $self->{critical_error}; |
|
89
|
|
|
|
|
|
|
|
|
90
|
1
|
|
|
|
|
5
|
my $full_answ = "code: $code\nmsg: $msg"; |
|
91
|
|
|
|
|
|
|
|
|
92
|
1
|
50
|
33
|
|
|
13
|
$answ = {} unless $answ && ref $answ; |
|
93
|
|
|
|
|
|
|
|
|
94
|
1
|
|
|
|
|
3
|
$answ->{code} = $code; |
|
95
|
1
|
|
|
|
|
51
|
$answ->{msg} = $msg; |
|
96
|
|
|
|
|
|
|
|
|
97
|
1
|
50
|
|
|
|
10
|
return wantarray ? ( $answ, $full_answ, $self ) : $answ; |
|
98
|
|
|
|
|
|
|
} |
|
99
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
sub req_test { |
|
102
|
8
|
|
|
8
|
1
|
15
|
my ( $self, $out_data, $info ) = @_; |
|
103
|
|
|
|
|
|
|
|
|
104
|
8
|
|
|
|
|
584
|
require IO::EPP::Test::CNic; |
|
105
|
|
|
|
|
|
|
|
|
106
|
8
|
100
|
|
|
|
51
|
$self->epp_log( "$info request:\n$out_data" ) if $out_data; |
|
107
|
|
|
|
|
|
|
|
|
108
|
8
|
|
|
|
|
14
|
my $answ; |
|
109
|
|
|
|
|
|
|
eval{ |
|
110
|
8
|
|
|
|
|
22
|
$answ = IO::EPP::Test::CNic::req( @_ ); |
|
111
|
8
|
|
|
|
|
22
|
1; |
|
112
|
|
|
|
|
|
|
} |
|
113
|
8
|
50
|
|
|
|
14
|
or do { |
|
114
|
0
|
|
|
|
|
0
|
$self->{critical_error} = "$info req error: $@"; |
|
115
|
0
|
|
|
|
|
0
|
return; |
|
116
|
|
|
|
|
|
|
}; |
|
117
|
|
|
|
|
|
|
|
|
118
|
8
|
|
|
|
|
49
|
$self->epp_log( "$info answer:\n$answ" ); |
|
119
|
|
|
|
|
|
|
|
|
120
|
8
|
|
|
|
|
24
|
return $answ; |
|
121
|
|
|
|
|
|
|
} |
|
122
|
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
=head1 METHODS |
|
124
|
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
Further overlap functions where the provider has features |
|
126
|
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
=head2 login |
|
128
|
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
Ext params for login, |
|
130
|
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
INPUT: new password for change |
|
132
|
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
=cut |
|
134
|
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
sub login { |
|
136
|
2
|
|
|
2
|
1
|
4
|
my ( $self, $pw ) = @_; |
|
137
|
|
|
|
|
|
|
|
|
138
|
2
|
|
|
|
|
5
|
my $svcs = ' |
|
139
|
|
|
|
|
|
|
urn:ietf:params:xml:ns:contact-1.0 |
|
140
|
|
|
|
|
|
|
urn:ietf:params:xml:ns:domain-1.0 |
|
141
|
|
|
|
|
|
|
urn:ietf:params:xml:ns:host-1.0'; |
|
142
|
|
|
|
|
|
|
|
|
143
|
2
|
|
|
|
|
4
|
my $extension = ' |
|
144
|
|
|
|
|
|
|
urn:ietf:params:xml:ns:rgp-1.0 |
|
145
|
|
|
|
|
|
|
urn:ietf:params:xml:ns:secDNS-1.1 |
|
146
|
|
|
|
|
|
|
urn:ietf:params:xml:ns:idn-1.0 |
|
147
|
|
|
|
|
|
|
urn:ietf:params:xml:ns:fee-0.5 |
|
148
|
|
|
|
|
|
|
urn:ietf:params:xml:ns:launch-1.0 |
|
149
|
|
|
|
|
|
|
urn:ietf:params:xml:ns:regtype-0.1 |
|
150
|
|
|
|
|
|
|
urn:ietf:params:xml:ns:auxcontact-0.1'; |
|
151
|
|
|
|
|
|
|
|
|
152
|
2
|
|
|
|
|
14
|
return $self->SUPER::login( $pw, $svcs, $extension ); |
|
153
|
|
|
|
|
|
|
} |
|
154
|
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
sub create_contact { |
|
156
|
0
|
|
|
0
|
1
|
|
my ( $self, $params ) = @_; |
|
157
|
|
|
|
|
|
|
|
|
158
|
0
|
|
|
|
|
|
$params->{company} =~ s/&/&/g; |
|
159
|
|
|
|
|
|
|
|
|
160
|
0
|
0
|
|
|
|
|
$params->{addr} = [ $params->{addr} ] unless ref $params->{addr}; |
|
161
|
0
|
|
|
|
|
|
s/&/&/g for @{$params->{addr}}; |
|
|
0
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
|
|
163
|
0
|
|
|
|
|
|
$params->{cont_id} = IO::EPP::Base::gen_id( 16 ); |
|
164
|
|
|
|
|
|
|
|
|
165
|
0
|
0
|
|
|
|
|
my $visible = $$params{pp_flag} ? 0 : 1; |
|
166
|
|
|
|
|
|
|
|
|
167
|
0
|
|
0
|
|
|
|
$params->{authinfo} ||= IO::EPP::Base::gen_pw( 16 ); |
|
168
|
|
|
|
|
|
|
|
|
169
|
0
|
|
|
|
|
|
$params->{pp_ext} = ' |
|
170
|
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
'; |
|
174
|
|
|
|
|
|
|
|
|
175
|
0
|
|
|
|
|
|
return $self->SUPER::create_contact( $params ); |
|
176
|
|
|
|
|
|
|
} |
|
177
|
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
sub update_contact { |
|
180
|
0
|
|
|
0
|
1
|
|
my ( $self, $params ) = @_; |
|
181
|
|
|
|
|
|
|
|
|
182
|
0
|
0
|
|
|
|
|
if ( ref $params->{chg} ) { |
|
183
|
0
|
0
|
|
|
|
|
$params->{chg}{company} =~ s/&/&/g if $params->{chg}{company}; |
|
184
|
|
|
|
|
|
|
|
|
185
|
0
|
0
|
|
|
|
|
$params->{chg}{addr} = [ $params->{chg}{addr} ] unless ref $params->{chg}{addr}; |
|
186
|
0
|
|
|
|
|
|
s/&/&/g for @{$params->{chg}{addr}}; |
|
|
0
|
|
|
|
|
|
|
|
187
|
|
|
|
|
|
|
|
|
188
|
0
|
|
0
|
|
|
|
$params->{chg}{authinfo} ||= IO::EPP::Base::gen_pw( 16 ); |
|
189
|
|
|
|
|
|
|
} |
|
190
|
|
|
|
|
|
|
|
|
191
|
0
|
0
|
|
|
|
|
my $visible = $$params{pp_flag} ? 0 : 1; |
|
192
|
|
|
|
|
|
|
|
|
193
|
0
|
|
|
|
|
|
$params->{pp_ext} = ' |
|
194
|
|
|
|
|
|
|
|
|
195
|
|
|
|
|
|
|
|
|
196
|
|
|
|
|
|
|
|
|
197
|
|
|
|
|
|
|
'; |
|
198
|
|
|
|
|
|
|
|
|
199
|
0
|
|
|
|
|
|
return $self->SUPER::update_contact( $params ); |
|
200
|
|
|
|
|
|
|
} |
|
201
|
|
|
|
|
|
|
|
|
202
|
|
|
|
|
|
|
|
|
203
|
|
|
|
|
|
|
sub update_ns { |
|
204
|
0
|
|
|
0
|
1
|
|
my ( $self, $params ) = @_; |
|
205
|
|
|
|
|
|
|
|
|
206
|
0
|
|
|
|
|
|
$params->{no_empty_chg} = 1; |
|
207
|
|
|
|
|
|
|
|
|
208
|
0
|
|
|
|
|
|
return $self->SUPER::update_ns( $params ); |
|
209
|
|
|
|
|
|
|
} |
|
210
|
|
|
|
|
|
|
|
|
211
|
|
|
|
|
|
|
=head2 check_premium |
|
212
|
|
|
|
|
|
|
|
|
213
|
|
|
|
|
|
|
Get prices for premium domains |
|
214
|
|
|
|
|
|
|
|
|
215
|
|
|
|
|
|
|
=cut |
|
216
|
|
|
|
|
|
|
|
|
217
|
|
|
|
|
|
|
sub check_premium { |
|
218
|
0
|
|
|
0
|
1
|
|
my ( $self, $params ) = @_; |
|
219
|
|
|
|
|
|
|
|
|
220
|
0
|
0
|
|
|
|
|
$params->{domains} = [ delete $params->{dname} ] if $params->{dname}; |
|
221
|
|
|
|
|
|
|
|
|
222
|
0
|
0
|
0
|
|
|
|
return ( 0, 0, 'no domains' ) unless $params->{domains} && scalar( @{$params->{domains}} ); |
|
|
0
|
|
|
|
|
|
|
|
223
|
|
|
|
|
|
|
|
|
224
|
0
|
|
|
|
|
|
my $dms = ''; |
|
225
|
0
|
|
|
|
|
|
foreach my $dm ( @{$params->{domains}} ) { |
|
|
0
|
|
|
|
|
|
|
|
226
|
0
|
|
|
|
|
|
$dms .= qq| |
|
227
|
|
|
|
|
|
|
$dm |
|
228
|
|
|
|
|
|
|
USD |
|
229
|
|
|
|
|
|
|
create |
|
230
|
|
|
|
|
|
|
1 |
|
231
|
|
|
|
|
|
|
\n|; |
|
232
|
|
|
|
|
|
|
} |
|
233
|
|
|
|
|
|
|
|
|
234
|
0
|
|
|
|
|
|
$params->{extension} = qq| \n$dms \n|; |
|
235
|
|
|
|
|
|
|
|
|
236
|
0
|
|
|
|
|
|
return $self->SUPER::check_domains( $params ); |
|
237
|
|
|
|
|
|
|
} |
|
238
|
|
|
|
|
|
|
|
|
239
|
|
|
|
|
|
|
|
|
240
|
|
|
|
|
|
|
# Get info on Claims Notice |
|
241
|
|
|
|
|
|
|
sub check_claims { |
|
242
|
0
|
|
|
0
|
0
|
|
my ( $self, $params ) = @_; |
|
243
|
|
|
|
|
|
|
|
|
244
|
0
|
0
|
|
|
|
|
$params->{domains} = [ delete $params->{dname} ] if $params->{dname}; |
|
245
|
|
|
|
|
|
|
|
|
246
|
|
|
|
|
|
|
$params->{extension} = |
|
247
|
0
|
|
|
|
|
|
' |
|
248
|
|
|
|
|
|
|
claims |
|
249
|
|
|
|
|
|
|
|
|
250
|
|
|
|
|
|
|
'; |
|
251
|
|
|
|
|
|
|
|
|
252
|
0
|
|
|
|
|
|
return $self->SUPER::check_domains( $params ); |
|
253
|
|
|
|
|
|
|
} |
|
254
|
|
|
|
|
|
|
|
|
255
|
|
|
|
|
|
|
=head1 create_domain |
|
256
|
|
|
|
|
|
|
|
|
257
|
|
|
|
|
|
|
CentralNic requires a domain price for each registration, need keys: |
|
258
|
|
|
|
|
|
|
C -- the price of a domain, if the domain is registered for several years, the first year is the price of registration, and the remaining year is the price of renewal; |
|
259
|
|
|
|
|
|
|
C -- price currency. |
|
260
|
|
|
|
|
|
|
|
|
261
|
|
|
|
|
|
|
For IDN domains you need to specify C -- the code page of the name and C -- the name itself in utf8 |
|
262
|
|
|
|
|
|
|
|
|
263
|
|
|
|
|
|
|
=cut |
|
264
|
|
|
|
|
|
|
|
|
265
|
|
|
|
|
|
|
sub create_domain { |
|
266
|
0
|
|
|
0
|
1
|
|
my ( $self, $params ) = @_; |
|
267
|
|
|
|
|
|
|
|
|
268
|
0
|
|
0
|
|
|
|
$params->{authinfo} ||= IO::EPP::Base::gen_pw( 16 ); |
|
269
|
|
|
|
|
|
|
|
|
270
|
0
|
|
|
|
|
|
my $extension = ''; |
|
271
|
|
|
|
|
|
|
|
|
272
|
0
|
0
|
|
|
|
|
if ( $params->{dname} =~ /\bfeedback$/ ) { |
|
273
|
0
|
|
|
|
|
|
$extension = ' |
|
274
|
|
|
|
|
|
|
|
|
275
|
|
|
|
|
|
|
hosted |
|
276
|
|
|
|
|
|
|
'; |
|
277
|
|
|
|
|
|
|
} |
|
278
|
|
|
|
|
|
|
|
|
279
|
0
|
0
|
|
|
|
|
if ( $params->{idn_lang} ) { |
|
280
|
|
|
|
|
|
|
# 100% remove utf8 flag |
|
281
|
0
|
|
|
|
|
|
utf8::decode( $params->{uname} ); |
|
282
|
0
|
|
|
|
|
|
utf8::encode( $params->{uname} ); |
|
283
|
|
|
|
|
|
|
|
|
284
|
|
|
|
|
|
|
$extension .= |
|
285
|
|
|
|
|
|
|
' |
|
286
|
|
|
|
|
|
|
' . $params->{idn_lang} . ' |
|
287
|
0
|
|
|
|
|
|
' . $params->{uname} . ' |
|
288
|
|
|
|
|
|
|
|
|
289
|
|
|
|
|
|
|
'; |
|
290
|
|
|
|
|
|
|
} |
|
291
|
|
|
|
|
|
|
|
|
292
|
|
|
|
|
|
|
$extension .= |
|
293
|
|
|
|
|
|
|
' |
|
294
|
|
|
|
|
|
|
'.$params->{currency}.' |
|
295
|
0
|
|
|
|
|
|
'. $params->{cost} .' |
|
296
|
|
|
|
|
|
|
|
|
297
|
|
|
|
|
|
|
'; |
|
298
|
|
|
|
|
|
|
|
|
299
|
0
|
0
|
|
|
|
|
if ( $params->{claims} ) { |
|
300
|
|
|
|
|
|
|
$extension .= |
|
301
|
|
|
|
|
|
|
' |
|
302
|
|
|
|
|
|
|
claims |
|
303
|
|
|
|
|
|
|
|
|
304
|
|
|
|
|
|
|
'. $params->{claims}->{noticeID} .' |
|
305
|
|
|
|
|
|
|
'. $params->{claims}->{notAfter} .' |
|
306
|
0
|
|
|
|
|
|
'.$params->{claims}->{acceptedDate}.' |
|
307
|
|
|
|
|
|
|
|
|
308
|
|
|
|
|
|
|
|
|
309
|
|
|
|
|
|
|
'; |
|
310
|
|
|
|
|
|
|
} |
|
311
|
|
|
|
|
|
|
|
|
312
|
0
|
0
|
|
|
|
|
$params->{extension} = $extension if $extension; |
|
313
|
|
|
|
|
|
|
|
|
314
|
0
|
|
|
|
|
|
return $self->SUPER::create_domain( $params ); |
|
315
|
|
|
|
|
|
|
} |
|
316
|
|
|
|
|
|
|
|
|
317
|
|
|
|
|
|
|
|
|
318
|
|
|
|
|
|
|
=head1 transfer |
|
319
|
|
|
|
|
|
|
|
|
320
|
|
|
|
|
|
|
CentralNic requires a domain price for each transfer, need keys: |
|
321
|
|
|
|
|
|
|
C -- domain renewal and transfer price; |
|
322
|
|
|
|
|
|
|
C -- price currency. |
|
323
|
|
|
|
|
|
|
|
|
324
|
|
|
|
|
|
|
=cut |
|
325
|
|
|
|
|
|
|
|
|
326
|
|
|
|
|
|
|
|
|
327
|
|
|
|
|
|
|
sub transfer { |
|
328
|
0
|
|
|
0
|
1
|
|
my ( $self, $params ) = @_; |
|
329
|
|
|
|
|
|
|
|
|
330
|
0
|
0
|
|
|
|
|
if ( defined $params->{authinfo} ) { |
|
331
|
0
|
|
|
|
|
|
$params->{authinfo} =~ s/&/&/g; |
|
332
|
0
|
|
|
|
|
|
$params->{authinfo} =~ s/</g; |
|
333
|
0
|
|
|
|
|
|
$params->{authinfo} =~ s/>/>/g; |
|
334
|
|
|
|
|
|
|
} |
|
335
|
|
|
|
|
|
|
|
|
336
|
0
|
0
|
|
|
|
|
if ( $params->{price} ) { |
|
337
|
|
|
|
|
|
|
$params->{extension} = |
|
338
|
|
|
|
|
|
|
' |
|
339
|
|
|
|
|
|
|
'.$params->{currency}.' |
|
340
|
0
|
|
|
|
|
|
'.$params->{price}.' |
|
341
|
|
|
|
|
|
|
|
|
342
|
|
|
|
|
|
|
'; |
|
343
|
|
|
|
|
|
|
} |
|
344
|
|
|
|
|
|
|
|
|
345
|
0
|
|
|
|
|
|
return $self->SUPER::transfer( $params ); |
|
346
|
|
|
|
|
|
|
} |
|
347
|
|
|
|
|
|
|
|
|
348
|
|
|
|
|
|
|
|
|
349
|
|
|
|
|
|
|
=head1 renew_domain |
|
350
|
|
|
|
|
|
|
|
|
351
|
|
|
|
|
|
|
CentralNic requires a domain price for each renew, need keys: |
|
352
|
|
|
|
|
|
|
C -- domain renewal and transfer price; |
|
353
|
|
|
|
|
|
|
C -- price currency. |
|
354
|
|
|
|
|
|
|
|
|
355
|
|
|
|
|
|
|
=cut |
|
356
|
|
|
|
|
|
|
|
|
357
|
|
|
|
|
|
|
sub renew_domain { |
|
358
|
0
|
|
|
0
|
1
|
|
my ( $self, $params ) = @_; |
|
359
|
|
|
|
|
|
|
|
|
360
|
0
|
0
|
|
|
|
|
if ( $params->{price} ) { |
|
361
|
|
|
|
|
|
|
$params->{extension} = |
|
362
|
|
|
|
|
|
|
' |
|
363
|
|
|
|
|
|
|
'.$params->{currency}.' |
|
364
|
0
|
|
|
|
|
|
'.$params->{price}.' |
|
365
|
|
|
|
|
|
|
|
|
366
|
|
|
|
|
|
|
'; |
|
367
|
|
|
|
|
|
|
} |
|
368
|
|
|
|
|
|
|
|
|
369
|
0
|
|
|
|
|
|
return $self->SUPER::renew_domain( $params ); |
|
370
|
|
|
|
|
|
|
} |
|
371
|
|
|
|
|
|
|
|
|
372
|
|
|
|
|
|
|
|
|
373
|
|
|
|
|
|
|
=head2 restore_domain |
|
374
|
|
|
|
|
|
|
|
|
375
|
|
|
|
|
|
|
Domain redemption after deletion |
|
376
|
|
|
|
|
|
|
|
|
377
|
|
|
|
|
|
|
=cut |
|
378
|
|
|
|
|
|
|
|
|
379
|
|
|
|
|
|
|
sub restore_domain { |
|
380
|
0
|
|
|
0
|
1
|
|
my ( $self, $params ) = @_; |
|
381
|
|
|
|
|
|
|
|
|
382
|
|
|
|
|
|
|
$params->{extension} = |
|
383
|
0
|
|
|
|
|
|
' |
|
384
|
|
|
|
|
|
|
|
|
385
|
|
|
|
|
|
|
|
|
386
|
|
|
|
|
|
|
'; |
|
387
|
|
|
|
|
|
|
|
|
388
|
0
|
|
|
|
|
|
return $self->SUPER::update_domain( $params ); |
|
389
|
|
|
|
|
|
|
} |
|
390
|
|
|
|
|
|
|
|
|
391
|
|
|
|
|
|
|
|
|
392
|
|
|
|
|
|
|
1; |
|
393
|
|
|
|
|
|
|
|
|
394
|
|
|
|
|
|
|
__END__ |