src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsNotifications/Impl/Message.php
public function getMandatoryField($fieldName)
    {
        $value = $this->getField($fieldName);
        if (is_null($value)) {
            throw new OffAmazonPaymentsNotifications_InvalidMessageException(
                "Error with json message - mandatory field " . $fieldName .
                " cannot be found"
            );
        }
        return $value;
    }
public function getMandatoryField($fieldName)
    {
        $value = $this->getField($fieldName);
        if (is_null($value)) {
            throw new OffAmazonPaymentsNotifications_InvalidMessageException(
                "Error with json message - mandatory field " . $fieldName .
                " cannot be found"
            );
        }
        return $value;
    }
public function getMandatoryField ( $ fieldName ) { $ value = $ this -> getField ( $ fieldName ) ; if ( is_null ( $ value ) ) { throw new OffAmazonPaymentsNotifications_InvalidMessageException ( "Error with json message - mandatory field " . $ fieldName . " cannot be found" ) ; } return $ value ; }
Extract the mandatory field from the message and return the contents

@param string $fieldName name of the field to extract

@throws OffAmazonPaymentsNotifications_InvalidMessageException if not found

@return string field contents if found
Extract the mandatory field from the message and return the contents