Skip to content

Commit

Permalink
Import of XENO/Business-OnlinePayment-CyberSource-3.000007 from CPAN.
Browse files Browse the repository at this point in the history
gitpan-cpan-distribution: Business-OnlinePayment-CyberSource
gitpan-cpan-version:      3.000007
gitpan-cpan-path:         XENO/Business-OnlinePayment-CyberSource-3.000007.tar.gz
gitpan-cpan-author:       XENO
gitpan-cpan-maturity:     released
  • Loading branch information
xenoterracide authored and Gitpan committed Oct 21, 2014
1 parent ed61f9e commit d09af3a
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 33 deletions.
3 changes: 3 additions & 0 deletions Changes
@@ -1,5 +1,8 @@
Revision history for Business-OnlinePayment-CyberSource

3.000007 2012-10-04
- improve conditional checks for avs, authorization and cvcode

3.000006 2012-10-04
- Add conditionals to only set avs_code and authorization if the appropriate roles are applied to the response object
- Fix some logic errors in client object
Expand Down
12 changes: 6 additions & 6 deletions META.json
Expand Up @@ -61,23 +61,23 @@
"provides" : {
"Business::OnlinePayment::CyberSource" : {
"file" : "lib/Business/OnlinePayment/CyberSource.pm",
"version" : "3.000006"
"version" : "3.000007"
},
"Business::OnlinePayment::CyberSource::Client" : {
"file" : "lib/Business/OnlinePayment/CyberSource/Client.pm",
"version" : "3.000006"
"version" : "3.000007"
},
"Business::OnlinePayment::CyberSource::Role::ErrorReporting" : {
"file" : "lib/Business/OnlinePayment/CyberSource/Role/ErrorReporting.pm",
"version" : "3.000006"
"version" : "3.000007"
},
"Business::OnlinePayment::CyberSource::Role::InputHandling" : {
"file" : "lib/Business/OnlinePayment/CyberSource/Role/InputHandling.pm",
"version" : "3.000006"
"version" : "3.000007"
},
"Business::OnlinePayment::CyberSource::Role::TransactionHandling" : {
"file" : "lib/Business/OnlinePayment/CyberSource/Role/TransactionHandling.pm",
"version" : "3.000006"
"version" : "3.000007"
}
},
"release_status" : "stable",
Expand All @@ -91,6 +91,6 @@
"web" : "https://github.com/hgdev/Business-OnlinePayment-CyberSource"
}
},
"version" : "3.000006"
"version" : "3.000007"
}

12 changes: 6 additions & 6 deletions META.yml
Expand Up @@ -23,19 +23,19 @@ no_index:
provides:
Business::OnlinePayment::CyberSource:
file: lib/Business/OnlinePayment/CyberSource.pm
version: 3.000006
version: 3.000007
Business::OnlinePayment::CyberSource::Client:
file: lib/Business/OnlinePayment/CyberSource/Client.pm
version: 3.000006
version: 3.000007
Business::OnlinePayment::CyberSource::Role::ErrorReporting:
file: lib/Business/OnlinePayment/CyberSource/Role/ErrorReporting.pm
version: 3.000006
version: 3.000007
Business::OnlinePayment::CyberSource::Role::InputHandling:
file: lib/Business/OnlinePayment/CyberSource/Role/InputHandling.pm
version: 3.000006
version: 3.000007
Business::OnlinePayment::CyberSource::Role::TransactionHandling:
file: lib/Business/OnlinePayment/CyberSource/Role/TransactionHandling.pm
version: 3.000006
version: 3.000007
requires:
Business::CyberSource: 0.006000
Business::CyberSource::Client: 0
Expand All @@ -60,4 +60,4 @@ requires:
resources:
bugtracker: https://github.com/hgdev/Business-OnlinePayment-CyberSource/issues
repository: git://github.com/hgdev/Business-OnlinePayment-CyberSource.git
version: 3.000006
version: 3.000007
2 changes: 1 addition & 1 deletion Makefile.PL
Expand Up @@ -44,7 +44,7 @@ my %WriteMakefileArgs = (
"strict" => 0,
"warnings" => 0
},
"VERSION" => "3.000006",
"VERSION" => "3.000007",
"test" => {
"TESTS" => "t/*.t"
}
Expand Down
2 changes: 1 addition & 1 deletion README
Expand Up @@ -3,7 +3,7 @@ NAME
Business::OnlinePayment

VERSION
version 3.000006
version 3.000007

SYNOPSIS
use Business::OnlinePayment;
Expand Down
4 changes: 2 additions & 2 deletions lib/Business/OnlinePayment/CyberSource.pm
Expand Up @@ -14,7 +14,7 @@ use MooseX::Types::Moose qw(Bool HashRef Int);
use MooseX::Types::Common::String qw(NonEmptySimpleStr);

# ABSTRACT: CyberSource backend for Business::OnlinePayment
our $VERSION = '3.000006'; # VERSION
our $VERSION = '3.000007'; # VERSION

extends 'Business::OnlinePayment';

Expand Down Expand Up @@ -57,7 +57,7 @@ Business::OnlinePayment::CyberSource - CyberSource backend for Business::OnlineP
=head1 VERSION
version 3.000006
version 3.000007
=head1 SYNOPSIS
Expand Down
28 changes: 17 additions & 11 deletions lib/Business/OnlinePayment/CyberSource/Client.pm
Expand Up @@ -16,7 +16,7 @@ use MooseX::Types::Moose qw(Bool HashRef Int Str);
use MooseX::Types::Common::String qw(NonEmptySimpleStr);

# ABSTRACT: CyberSource Client object for Business::OnlinePayment::CyberSource
our $VERSION = '3.000006'; # VERSION
our $VERSION = '3.000007'; # VERSION

#### Subroutine Definitions ####

Expand Down Expand Up @@ -79,23 +79,29 @@ sub _authorize {
return $request unless $request;

try {
my $response = $self->run_transaction( $request );
my $response = $self->run_transaction( $request );

if ( $response->is_success() ) {
if ( $response->is_accepted() ) {
$self->is_success( 1 );

$self->authorization( $response->auth_code() )
if $response->does( 'Business::CyberSource::Response::Role::Authorization' );

$self->cvv2_response( $response->cv_code() ) if $response->has_cv_code();
}
else {
$self->set_error_message( $response->reason_text() );
}

$self->avs_code( $response->avs_code() )
if $response->does( 'Business::CyberSource::Response::Role::AVS' )
&& $response->has_avs_code;
if ( $response->does(
'Business::CyberSource::Response::Role::Authorization'
)
) {
$self->authorization( $response->auth_code() )
if $response->has_auth_code;

$self->cvv2_response( $response->cv_code() )
if $response->has_cv_code();

$self->avs_code( $response->avs_code() )
if $response->has_avs_code;
}

$self->_fill_fields( $response );
}
Expand Down Expand Up @@ -620,7 +626,7 @@ Business::OnlinePayment::CyberSource::Client - CyberSource Client object for Bu
=head1 VERSION
version 3.000006
version 3.000007
=head1 SYNOPSIS
Expand Down
4 changes: 2 additions & 2 deletions lib/Business/OnlinePayment/CyberSource/Role/ErrorReporting.pm
Expand Up @@ -11,7 +11,7 @@ use MooseX::Types::Moose qw(Str);
use MooseX::Types::Common::String qw(NonEmptySimpleStr);

# ABSTRACT: Error reporting role for BOP::CyberSource
our $VERSION = '3.000006'; # VERSION
our $VERSION = '3.000007'; # VERSION

#### Subroutine Definitions ####

Expand Down Expand Up @@ -51,7 +51,7 @@ Business::OnlinePayment::CyberSource::Role::ErrorReporting - Error reporting rol
=head1 VERSION
version 3.000006
version 3.000007
=head1 SYNOPSIS
Expand Down
4 changes: 2 additions & 2 deletions lib/Business/OnlinePayment/CyberSource/Role/InputHandling.pm
Expand Up @@ -8,7 +8,7 @@ use namespace::autoclean;
use Moose::Role;

# ABSTRACT: Input handling convenience methods for Business::OnlinePayment::CyberSource
our $VERSION = '3.000006'; # VERSION
our $VERSION = '3.000007'; # VERSION

#### Subroutine Definitions ####

Expand Down Expand Up @@ -44,7 +44,7 @@ Business::OnlinePayment::CyberSource::Role::InputHandling - Input handling conve
=head1 VERSION
version 3.000006
version 3.000007
=head1 SYNOPSIS
Expand Down
Expand Up @@ -12,7 +12,7 @@ use Try::Tiny;
use Business::OnlinePayment::CyberSource::Client;

# ABSTRACT: Transaction handling role for BOP::CyberSource
our $VERSION = '3.000006'; # VERSION
our $VERSION = '3.000007'; # VERSION

#### Subroutine Definitions ####

Expand Down Expand Up @@ -203,7 +203,7 @@ Business::OnlinePayment::CyberSource::Role::TransactionHandling - Transaction ha
=head1 VERSION
version 3.000006
version 3.000007
=head1 SYNOPSIS
Expand Down

0 comments on commit d09af3a

Please sign in to comment.