public function refund(array $params)
    {
        // transaction identifier must be set
        if(!isset($params['identifier']))
        {
            throw new MonetivoException('$transaction["identifier"] is not set');
        }
        // other parameters like 'amount' and 'description' are optional

        return $this->merchantApi->call('post', 'transactions/' . $params['identifier'] . '/refund', [
            'form_params' => $params
        ])->toArray();
    }
public function refund(array $params)
    {
        // transaction identifier must be set
        if(!isset($params['identifier']))
        {
            throw new MonetivoException('$transaction["identifier"] is not set');
        }
        // other parameters like 'amount' and 'description' are optional

        return $this->merchantApi->call('post', 'transactions/' . $params['identifier'] . '/refund', [
            'form_params' => $params
        ])->toArray();
    }
public function refund ( array $ params ) { // transaction identifier must be set if ( ! isset ( $ params [ 'identifier' ] ) ) { throw new MonetivoException ( '$transaction["identifier"] is not set' ) ; } // other parameters like 'amount' and 'description' are optional return $ this -> merchantApi -> call ( 'post' , 'transactions/' . $ params [ 'identifier' ] . '/refund' , [ 'form_params' => $ params ] ) -> toArray ( ) ; }
Refunds the transaction
@param array $params
@return array
@throws \Monetivo\Exceptions\MonetivoException
Refunds the transaction