ntService.RPC' => 'https://api.ewaypayments.com/json-rpc',
'PaymentService.JSONPScript' =>
'https://api.ewaypayments.com/JSONP/v1/js',
};
}
else {
re
'https://api.sandbox.ewaypayments.com/json-rpc',
'PaymentService.JSONPScript' =>
'https://api.sandbox.ewaypayments.com/JSONP/v1/js',
};
}
}
has 'username'
ult => sub { 'REST' } );
has 'Request_Format' =>
( is => 'rw', required => 1, default => sub { 'JSON' } );
has 'ua' => ( is => 'lazy' );
sub _build_ua {
my $self = shift;
return WWW::Mecha
Moo::Role;
use JSON::MaybeXS;
use XML::Simple;
sub Obj2ARRAY {
my ( $self, $obj ) = @_;
my $json = JSON::MaybeXS->new( convert_blessed => 1 );
return $json->decode( $json->encode($obj)
f, $obj ) = @_;
my $json = JSON::MaybeXS->new( convert_blessed => 1 );
return $json->encode($obj);
}
sub JSON2Obj {
my ( $self, $obj ) = @_;
my $json = JSON::MaybeXS->new( convert_b
lessed => 1 );
return $json->decode($obj);
}
sub Obj2XML {
my ( $self, $obj, $reqname ) = @_;
my $xs = XML::Simple->new(
GroupTags => { 'Items' => 'LineItem', 'Options' => 'O
'Email', 'Phone', 'Mobile',
'Comments', 'Fax', 'Url'
);
sub TO_JSON { return { %{ $_[0] } }; }
no Moo;
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Business::e
', 'ExpiryMonth', 'ExpiryYear',
'StartMonth', 'StartYear', 'IssueNumber', 'CVN'
);
sub TO_JSON { return { %{ $_[0] } }; }
no Moo;
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Business::e
rrayRef [ InstanceOf ['Business::eWAY::RapidAPI::Option'] ],
default => sub { [] }
);
sub TO_JSON { return { %{ $_[0] } }; }
no Moo;
package # hidden from PAUSE
Business::eWAY::RapidAPI::O
Moo;
use MooX::Types::MooseLike::Base 'Str';
has 'Value' => ( is => 'rw', isa => Str );
sub TO_JSON { return { %{ $_[0] } }; }
no Moo;
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Business::e
', 'State', 'PostalCode',
'Country', 'Email', 'Phone', 'Fax'
);
sub TO_JSON { return { %{ $_[0] } }; }
no Moo;
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Business::e
ayRef [ InstanceOf ['Business::eWAY::RapidAPI::LineItem'] ],
default => sub { [] }
);
sub TO_JSON { return { %{ $_[0] } }; }
no Moo;
package # hidden from PAUSE
Business::eWAY::RapidAPI::L
isa => Str )
foreach ( 'SKU', 'Description', 'Quantity', 'UnitCost', 'Tax', 'Total' );
sub TO_JSON { return { %{ $_[0] } }; }
no Moo;
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Business::e
e MooX::Types::MooseLike::Base qw(:all);
has 'AccessCode' => ( is => 'rw', isa => Str );
sub TO_JSON { return { %{ $_[0] } }; }
no Moo;
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Business::e
ddress']
);
sub _build_ShippingAddress { Business::eWAY::RapidAPI::ShippingAddress->new }
sub TO_JSON { return { %{ $_[0] } }; }
no Moo;
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Business::e
I::CardDetails'] );
sub _build_CardDetails { Business::eWAY::RapidAPI::CardDetails->new }
sub TO_JSON { return { %{ $_[0] } }; }
no Moo;
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Business::e
t', 'InvoiceNumber', 'InvoiceDescription',
'InvoiceReference', 'CurrencyCode'
);
sub TO_JSON { return { %{ $_[0] } }; }
no Moo;
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Business::e
ddress']
);
sub _build_ShippingAddress { Business::eWAY::RapidAPI::ShippingAddress->new }
sub TO_JSON { return { %{ $_[0] } }; }
no Moo;
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Business::e