Modified API.pm to for looser Success test and corrected boolean test with undefined variable.
This commit is contained in:
		
							parent
							
								
									925e625e76
								
							
						
					
					
						commit
						c2bf6d6357
					
				
					 2 changed files with 17 additions and 5 deletions
				
			
		
							
								
								
									
										11
									
								
								Changes
									
										
									
									
									
								
							
							
						
						
									
										11
									
								
								Changes
									
										
									
									
									
								
							|  | @ -1,4 +1,15 @@ | |||
| Revision history for Perl extension Business::PayPal::API. | ||||
| Release 0.68 - First hembreed release | ||||
| ------------------------------------- | ||||
| I've moved the module's scm to http://github.com/hembreed/Business-PayPal-API so others may share my pain. The tar ball at CPAN will be updated from there. | ||||
| 
 | ||||
| - API.pm | ||||
|    1. Changed eq 'Success' to =~ /Success/ to accomodate variations introduced | ||||
|       by PayPal. | ||||
|    2. Changed test for duplicates to test for defined variable first. This | ||||
|       was causing errors in 5.10+ perl versions. | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| Release 0.62 - last scottw release | ||||
| ---------------------------- | ||||
|  |  | |||
|  | @ -7,7 +7,7 @@ use warnings; | |||
| use SOAP::Lite 0.67; # +trace => 'all'; | ||||
| use Carp qw(carp); | ||||
| 
 | ||||
| our $VERSION = '0.62'; | ||||
| our $VERSION = '0.69'; | ||||
| our $CVS_VERSION = '$Id: API.pm,v 1.24 2009/07/28 18:00:58 scott Exp $'; | ||||
| our $Debug = 0; | ||||
| 
 | ||||
|  | @ -181,9 +181,10 @@ sub getFieldsList { | |||
|         @response{keys %$fields} = @{$rec}{keys %$fields}; | ||||
| 
 | ||||
|         ## avoid duplicates | ||||
|         next if $trans_id{$response{TransactionID}}; | ||||
|         $trans_id{$response{TransactionID}} = 1; | ||||
| 
 | ||||
| 	    if( defined $response{TransactionID}){ | ||||
| 			$trans_id{$response{TransactionID}}? next : | ||||
| 				$trans_id{$response{TransactionID}} = 1; | ||||
| 		} | ||||
|         push @records, \%response; | ||||
|     } | ||||
| 
 | ||||
|  | @ -243,7 +244,7 @@ sub getBasic { | |||
|         $details->{$field} = $som->valueof("$path/$field") || ''; | ||||
|     } | ||||
| 
 | ||||
|     return $details->{Ack} eq 'Success'; | ||||
|     return $details->{Ack} =~ /Success/; | ||||
| } | ||||
| 
 | ||||
| sub getErrors { | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Danny Hembree
						Danny Hembree