diff options
Diffstat (limited to 'fs_selfservice/perl/xmlrpc_local-order_pkg.pl')
-rwxr-xr-x | fs_selfservice/perl/xmlrpc_local-order_pkg.pl | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/fs_selfservice/perl/xmlrpc_local-order_pkg.pl b/fs_selfservice/perl/xmlrpc_local-order_pkg.pl new file mode 100755 index 000000000..94498d95d --- /dev/null +++ b/fs_selfservice/perl/xmlrpc_local-order_pkg.pl @@ -0,0 +1,36 @@ +#!/usr/bin/perl + +use strict; +use Frontier::Client; +use Data::Dumper; +use Data::Faker; + +my $server = new Frontier::Client ( + url => 'http://localhost:8080/selfservice/xmlrpc.cgi', +); + +my $login = $server->call('FS.ClientAPI_XMLRPC.login', { + 'username' => 'yokn', + 'domain' => 'example1.com', + 'password' => 'RUPUQC8H', +} ); + +die $login->{'error'} if $login->{'error'}; + +my $session_id = $login->{'session_id'}; + +my $faker = new Data::Faker; + +my $result = $server->call('FS.ClientAPI_XMLRPC.order_pkg', { + 'session_id' => $session_id, + 'pkgpart' => 3, + 'username' => $faker->username, + 'password' => '123456', +}); + +#print Dumper($result); +die $result->{'error'} if $result->{'error'}; + +warn Dumper($result); + +1; |