def parse(signature_string, payload)
      raise InvalidSignature, 'signature cannot be nil' if signature_string.nil?
      raise InvalidSignature, 'payload cannot be nil' if payload.nil?
      if payload =~ /[^A-Za-z0-9+=\/\n]/
        raise InvalidSignature, "payload contains illegal characters"
      end
      _verify_signature(signature_string, payload)
      attributes = Xml.hash_from_xml(Base64.decode64(payload))
      WebhookNotification._new(@gateway, attributes[:notification])
    end
def parse(signature_string, payload)
      raise InvalidSignature, 'signature cannot be nil' if signature_string.nil?
      raise InvalidSignature, 'payload cannot be nil' if payload.nil?
      if payload =~ /[^A-Za-z0-9+=\/\n]/
        raise InvalidSignature, "payload contains illegal characters"
      end
      _verify_signature(signature_string, payload)
      attributes = Xml.hash_from_xml(Base64.decode64(payload))
      WebhookNotification._new(@gateway, attributes[:notification])
    end
:nodoc: