Minor cleanup, mostly around debugging.

This commit is contained in:
Olaf Alders 2014-03-23 00:40:54 -04:00
parent 3878e90817
commit 2d5812cf10
2 changed files with 13 additions and 11 deletions

View file

@ -4,10 +4,11 @@ use 5.008001;
use strict;
use warnings;
use Data::Printer;
use SOAP::Lite 0.67; # +trace => 'all';
use Carp qw(carp);
our $Debug = 0;
our $Debug = $ENV{WPP_DEBUG} || 0;
## NOTE: This package exists only until I can figure out how to use
## NOTE: SOAP::Lite's WSDL support for complex types and importing
@ -151,9 +152,6 @@ sub doCall {
"\n";
}
# $Soap{$self}->readable( $Debug );
# $Soap{$self}->outputxml( $Debug );
no warnings 'redefine';
local *SOAP::Deserializer::typecast = sub { shift; return shift };
eval {
@ -168,8 +166,7 @@ sub doCall {
if ( $Debug ) {
## FIXME: would be nicer to dump a SOM to XML, but how to do that?
require Data::Dumper;
print STDERR Data::Dumper::Dumper( $som->envelope );
p( $som->envelope );
}
if ( ref( $som ) && $som->fault ) {
@ -580,6 +577,9 @@ sure:
* you're not trying to use your live username and password for
sandbox testing and vice versa.
* you are using a US Business Sandbox account. you may also need to have
"PayPal Payments Pro" enabled.
* if the sandbox works but "live" does not, make sure you've turned
off the 'sandbox' parameter correctly. Otherwise you'll be
passing your PayPal sandbox credentials to PayPal's live site

View file

@ -1,7 +1,9 @@
#!/usr/bin/perl
use strict;
use warnings;
use Test::More;
use Test::Most;
if ( !$ENV{WPP_TEST} || !-f $ENV{WPP_TEST} ) {
plan skip_all =>