protected function paymentTransactionToRequest(PaymentTransaction $paymentTransaction)
    {
        $requestFields = array();

        foreach (static::$requestFieldsDefinition as $fieldDescription)
        {
            list($fieldName, $propertyPath) = $fieldDescription;

            $fieldValue = PropertyAccessor::getValue($paymentTransaction, $propertyPath);

            if (!empty($fieldValue))
            {
                $requestFields[$fieldName] = $fieldValue;
            }
        }

        return new Request($requestFields);
    }
protected function paymentTransactionToRequest(PaymentTransaction $paymentTransaction)
    {
        $requestFields = array();

        foreach (static::$requestFieldsDefinition as $fieldDescription)
        {
            list($fieldName, $propertyPath) = $fieldDescription;

            $fieldValue = PropertyAccessor::getValue($paymentTransaction, $propertyPath);

            if (!empty($fieldValue))
            {
                $requestFields[$fieldName] = $fieldValue;
            }
        }

        return new Request($requestFields);
    }
protected function paymentTransactionToRequest ( PaymentTransaction $ paymentTransaction ) { $ requestFields = array ( ) ; foreach ( static :: $ requestFieldsDefinition as $ fieldDescription ) { list ( $ fieldName , $ propertyPath ) = $ fieldDescription ; $ fieldValue = PropertyAccessor :: getValue ( $ paymentTransaction , $ propertyPath ) ; if ( ! empty ( $ fieldValue ) ) { $ requestFields [ $ fieldName ] = $ fieldValue ; } } return new Request ( $ requestFields ) ; }
Creates request from payment transaction

@param       PaymentTransaction      $paymentTransaction     Payment transaction for request constructing

@return      Request                                         Request object
Creates request from payment transaction