Skip to content

Commit

Permalink
Import of PBOWEN/Business-OnlinePayment-CyberSource-0.06 from CPAN.
Browse files Browse the repository at this point in the history
gitpan-cpan-distribution: Business-OnlinePayment-CyberSource
gitpan-cpan-version:      0.06
gitpan-cpan-path:         PBOWEN/Business-OnlinePayment-CyberSource-0.06.tar.gz
gitpan-cpan-author:       PBOWEN
gitpan-cpan-maturity:     released
  • Loading branch information
huntsberg authored and Gitpan committed Oct 21, 2014
1 parent 2689029 commit 553de31
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
3 changes: 3 additions & 0 deletions Changes
Expand Up @@ -19,3 +19,6 @@ Revision history for Perl extension Business::OnlinePayment::CyberSource..

0.05 Mon Oct 2 2005
- Set the defaults for the business logic settings using the cybs.ini

0.05 Wed Oct 12 2005
- Allow both line items and grand total. If you use both, the grand total will prevail.
9 changes: 6 additions & 3 deletions CyberSource.pm
Expand Up @@ -12,7 +12,7 @@ require Exporter;
@ISA = qw(Exporter AutoLoader Business::OnlinePayment);
@EXPORT = qw();
@EXPORT_OK = qw();
$VERSION = '0.05';
$VERSION = '0.06';

# ACTION MAP
my @action_list = ('ccAuthService_run', 'ccAuthReversalService_run',
Expand Down Expand Up @@ -361,15 +361,18 @@ sub _set_item_list {
&Carp::croak("Item " . $item->{'number'} . " has no unit_price");
}
}
} elsif (defined($content->{'amount'}) && $content->{'amount'} ne '') {
}
if (defined($content->{'amount'}) && $content->{'amount'} ne '') {
if (defined($content->{'freight'}) && $content->{'freight'} ne '') {
$request->{'purchaseTotals_freightAmount'} = $content->{'freight'};
}
if (defined($content->{'tax'}) && $content->{'tax'} ne '') {
$request->{'purchaseTotals_taxAmount'} = $content->{'tax'};
}
$request->{'purchaseTotals_grandTotalAmount'} = $content->{'amount'};
} else {
}
if ((!defined($content->{'items'}) || scalar($content->{'items'}) < 0) &&
(!defined($content->{'amount'})|| $content->{'amount'} eq '')) {
&Carp::croak("It's impossible to auth without items or amount populated!");
}

Expand Down
2 changes: 1 addition & 1 deletion META.yml
@@ -1,7 +1,7 @@
# http://module-build.sourceforge.net/META-spec.html
#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
name: Business-OnlinePayment-CyberSource
version: 0.05
version: 0.06
version_from: CyberSource.pm
installdirs: site
requires:
Expand Down

0 comments on commit 553de31

Please sign in to comment.