public function execute($data, $value = null) {
        try {
            $config = $this->sanitizeConfig($data);
            if ($value != null)
                $config->value = number_format(floatval($value), 2, '.', '');
            $this->isConciliate($config);
            if (!$this->doRefund($config))
            throw new \Exception('impossible to refund');

            $this->doUpdates($config);
            return true;
        } catch (\Exception $exception) {
            $error = simplexml_load_string($exception->getMessage());
            throw new \Exception((string)$error->error->code);
        }
    }
public function execute($data, $value = null) {
        try {
            $config = $this->sanitizeConfig($data);
            if ($value != null)
                $config->value = number_format(floatval($value), 2, '.', '');
            $this->isConciliate($config);
            if (!$this->doRefund($config))
            throw new \Exception('impossible to refund');

            $this->doUpdates($config);
            return true;
        } catch (\Exception $exception) {
            $error = simplexml_load_string($exception->getMessage());
            throw new \Exception((string)$error->error->code);
        }
    }
public function execute ( $ data , $ value = null ) { try { $ config = $ this -> sanitizeConfig ( $ data ) ; if ( $ value != null ) $ config -> value = number_format ( floatval ( $ value ) , 2 , '.' , '' ) ; $ this -> isConciliate ( $ config ) ; if ( ! $ this -> doRefund ( $ config ) ) throw new \ Exception ( 'impossible to refund' ) ; $ this -> doUpdates ( $ config ) ; return true ; } catch ( \ Exception $ exception ) { $ error = simplexml_load_string ( $ exception -> getMessage ( ) ) ; throw new \ Exception ( ( string ) $ error -> error -> code ) ; } }
Refund one transaction

@param $data
@param $value
@return bool
@throws \Exception
Refund one transaction