Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

rename attribute to _sdbo and add documentation strings

Signed-off-by: Caleb Cushing <xenoterracide@gmail.com>
  • Loading branch information...
commit 4af829244c328bee3551e47cd0816de62da88b40 1 parent 17dfb4f
@xenoterracide authored
View
15 lib/Business/CyberSource/Request.pm
@@ -15,10 +15,11 @@ has _username_token => (
isa => 'SOAP::Data::Builder::Element',
);
-has data_builder => (
+has _sdbo => (
+ documentation => 'SOAP::Data::Builder Object',
required => 1,
is => 'rw',
- isa => 'SOAP::Data::Builder',
+ isa => 'SOAP::Data::Builder', # sdbo is SOAP::Data::Builder object
default => sub {
my $self = shift;
my $sb = SOAP::Data::Builder->new;
@@ -45,36 +46,38 @@ has data_builder => (
);
has username => (
+ documentation => 'your merchantId',
required => 1,
is => 'ro',
isa => 'Str',
default => sub { '' },
trigger => sub {
my ( $self, $username ) = @_;
- my $sb = $self->data_builder;
+ my $sb = $self->_sdbo;
$sb->add_elem(
header => 1,
parent => $self->_username_token,
name => 'wsse:Username',
value => $username,
);
- }
+ },
);
has password => (
+ documentation => 'your SOAP transaction key',
required => 1,
is => 'ro',
isa => 'Str', # actually I wonder if I can validate this more
default => sub { '' },
trigger => sub {
my ( $self, $password ) = @_;
- $self->data_builder->add_elem(
+ $self->_sdbo->add_elem(
header => 1,
parent => $self->_username_token,
name => 'wsse:Password',
value => $password,
);
- }
+ },
);
1;
View
6 lib/Business/CyberSource/Request/Authorization.pm
@@ -19,8 +19,10 @@ sub submit {
proxy => 'https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor',
default_ns => 'urn:schemas-cybersource-com:transaction-data-1.61',
);
- my $ret = $req->requestMessage( $self->data_builder->to_soap_data )->result;
- return $ret;
+
+ my $ret = $req->requestMessage( $self->_sdbo->to_soap_data )->result;
+
+ return 1;
}
__PACKAGE__->meta->make_immutable;
Please sign in to comment.
Something went wrong with that request. Please try again.