Open ivan1986 opened 4 years ago
## Domain Registry Interface, CentralNic EPP Fee extension
##
## Copyright (c) 2020 Ivan Borzenkov <ivan.borenkov@gmail.com>. All rights reserved.
##
## This file is part of Net::DRI
##
## Net::DRI is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
## (at your option) any later version.
##
## See the LICENSE file that comes with this distribution for more details.
####################################################################################################
package Net::DRI::Protocol::EPP::Extensions::CentralNic::TradeDomain;
use strict;
use warnings;
use Net::DRI::Util;
use Net::DRI::Exception;
use Net::DRI::Protocol::EPP::Util;
use DateTime::Duration;
use DateTime::Format::ISO8601;
=pod
=head1 NAME
Net::DRI::Protocol::EPP::Extensions::CentralNic::TradeDomain - CentralNic EPP TradeDomain extension commands for Net::DRI (draft-brown-epp-fees-01, 02, 03, 04, 05, and 06)
=head1 DESCRIPTION
=cut
####################################################################################################
sub register_commands
{
my %tmp=(
update => [ \&update, undef ],
);
return { 'domain' => \%tmp };
}
sub setup
{
return;
}
sub update
{
my ($epp, $domain, $rd) = @_;
if (!Net::DRI::Util::check_isa($rd,'Net::DRI::Data::Changes') || !$rd->{'registrant'}) {
return
}
my $mes = $epp->message();
my $eid=$mes->command_extension_register('keysys:update','xmlns:keysys="http://www.key-systems.net/epp/keysys-1.0"', 'keysys');
my @kv = ();
push @kv, ['keysys:domain', ['keysys:accept-trade', 1]];
$mes->command_extension($eid,\@kv);
return;
}
####################################################################################################
1;
i write prototype and it works in our system, i don't know where also test it.
Thanks @ivan1986. I have no experience with RRPProxy. I see you have cloned a CentralNIC extension to write this. Is RRPProxy related to CentralNIC, or was this just for convenience? I can then think where this may be better suited and add it with a internal test...
I just get centralnic extension for copy rrpproxy proxy use centralnic provider
@ivan1986 I started this https://github.com/thedarkwinter/Net-DRI/pull/436/files as just a test based on your suggestion. The KeySys extension currently only implements the Domain:Trade operation as you proposed, so its still missing quite a lot. I will ask @paullojorgge if he has time to have a look at it, but please feel free to add any feedback.
Personally I am unlikely to be able to spend time on this, and would rather not merge a partially implemented extension, so if you or Paulo are able to add to it, that would be appreciated.
https://wiki.rrpproxy.net/api/epp-command/Domain:Trade
on .at domains
Response: