diff --git a/lib/Business/PayPal/API/DirectPayments.pm b/lib/Business/PayPal/API/DirectPayments.pm index 353be00..9be878f 100644 --- a/lib/Business/PayPal/API/DirectPayments.pm +++ b/lib/Business/PayPal/API/DirectPayments.pm @@ -258,7 +258,7 @@ Example: ... ); - unless( $resp{Ack} ne 'Success' ) { + unless( $resp{Ack} !~ /Success/ ) { for my $error ( @{$response{Errors}} ) { warn "Error: " . $error->{LongMessage} . "\n"; } diff --git a/lib/Business/PayPal/API/MassPay.pm b/lib/Business/PayPal/API/MassPay.pm index 385b0ef..30f0058 100644 --- a/lib/Business/PayPal/API/MassPay.pm +++ b/lib/Business/PayPal/API/MassPay.pm @@ -155,7 +155,7 @@ Example: UniqueId => "123456", Note => "Enjoy the money. Don't spend it all in one place." } ] ); - unless( $resp{Ack} eq 'Success' ) { + unless( $resp{Ack} !~ /Success/ ) { die "Failed: " . $resp{Errors}[0]{LongMessage} . "\n"; } diff --git a/lib/Business/PayPal/API/ReauthorizationRequest.pm b/lib/Business/PayPal/API/ReauthorizationRequest.pm index e924306..73a2718 100644 --- a/lib/Business/PayPal/API/ReauthorizationRequest.pm +++ b/lib/Business/PayPal/API/ReauthorizationRequest.pm @@ -108,7 +108,7 @@ Example: CurrencyID => 'USD' ); - unless( $resp{Ack} ne 'Success' ) { + unless( $resp{Ack} !~ /Success/ ) { for my $error ( @{$response{Errors}} ) { warn "Error: " . $error->{LongMessage} . "\n"; } diff --git a/lib/Business/PayPal/API/RefundTransaction.pm b/lib/Business/PayPal/API/RefundTransaction.pm index b7f1bb0..d929159 100644 --- a/lib/Business/PayPal/API/RefundTransaction.pm +++ b/lib/Business/PayPal/API/RefundTransaction.pm @@ -123,7 +123,7 @@ Example: RefundType => 'Partial', Amount => '15.00', ); - unless( $resp{Ack} ne 'Success' ) { + unless( $resp{Ack} !~ /Success/ ) { for my $error ( @{$response{Errors}} ) { warn "Error: " . $error->{LongMessage} . "\n"; } diff --git a/lib/Business/PayPal/API/VoidRequest.pm b/lib/Business/PayPal/API/VoidRequest.pm index a601510..0bfb815 100644 --- a/lib/Business/PayPal/API/VoidRequest.pm +++ b/lib/Business/PayPal/API/VoidRequest.pm @@ -101,7 +101,7 @@ Example: my %resp = $pp->DoVoidRequest( AuthorizationID => $trans_id, Note => 'Sorry about that.' ); - unless( $resp{Ack} ne 'Success' ) { + unless( $resp{Ack} !~ /Success/ ) { for my $error ( @{$response{Errors}} ) { warn "Error: " . $error->{LongMessage} . "\n"; }