Revision 697
- Date:
- 2018/08/15 21:35:58
- Files:
Legend:
- Added
- Removed
- Modified
-
utf8/plugins/money/lib/money/Provider/Dreamkas.pm
192 192 $MM = $self->_GetLastMoneyCheck( $opts->{order}->id ); 193 193 } 194 194 if ( ref $MM && $MM->session_id && $MM->name eq $opts->{type} ) { 195 $self->{result}{money_movement} = $MM; 195 $self->{result}{money_check} = $MM; 196 196 return $self; 197 197 } 198 198 unless ( $MM ) { … … 293 293 $MM->success( $OP_STATUS{$self->{result}{content}{status}} ); 294 294 $MM->session_id( $self->{result}{content}{id} ); 295 295 $MM->store; 296 $self->{result}{money_movement} = $MM; 296 $self->{result}{money_check} = $MM; 297 297 } else { 298 298 $self->{result}{error} = $self->{result}{status}; 299 299 } … … 341 341 } 342 342 343 343 my $MM; 344 if ( exists $self->{result}{money_movement} ) { 345 $MM = $self->{result}{money_movement}; 346 } elsif ( exists $opts->{money_movement} ) { 347 $MM = $opts->{money_movement}; 344 if ( exists $self->{result}{money_check} ) { 345 $MM = $self->{result}{money_check}; 346 } elsif ( exists $opts->{money_check} ) { 347 $MM = $opts->{money_check}; 348 348 } elsif ( $opts->{operation_id} ) { 349 349 ($MM) = $self->_GetCheckByOperationId( $opts->{operation_id} ); 350 350 } … … 359 359 if ( $self->{result}{code} == 200 ) { 360 360 $MM->success( $OP_STATUS{$self->{result}{content}{status}} ); 361 361 $MM->store; 362 $self->{result}{money_movement} = $MM; 362 $self->{result}{money_check} = $MM; 363 363 if ( $self->{result}{content}{status} eq 'ERROR' ) { 364 364 $self->{result}{error} = $self->{result}{content}{data}{error}{message}; 365 365 $self->{result}{code} = $self->{result}{content}{data}{error}{code};